From a7422f15201910a05594a8cb1b96688af10a41e3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 5 Jan 2022 08:34:33 +0000 Subject: [PATCH 1/2] feat: update client libraries to support Database operations PiperOrigin-RevId: 419710013 Source-Link: https://github.com/googleapis/googleapis/commit/b7c9d05c60f87c05c8701e67c6ef24699846a42d Source-Link: https://github.com/googleapis/googleapis-gen/commit/ae498279c4e71cd4aa6e0655e92a693df97472c4 Copy-Tag: eyJwIjoiRXJyb3JSZXBvcnRpbmcvLk93bEJvdC55YW1sIiwiaCI6ImFlNDk4Mjc5YzRlNzFjZDRhYTZlMDY1NWU5MmE2OTNkZjk3NDcyYzQifQ== --- .../Clouderrorreporting/V1Beta1/Common.php | Bin 0 -> 2399 bytes .../V1Beta1/ErrorGroupService.php | 42 ++ .../V1Beta1/ErrorStatsService.php | Bin 0 -> 5156 bytes .../V1Beta1/ReportErrorsService.php | 46 ++ .../V1beta1/DeleteEventsRequest.php | 83 +++ .../V1beta1/DeleteEventsResponse.php | 33 ++ .../ErrorReporting/V1beta1/ErrorContext.php | 206 +++++++ .../ErrorReporting/V1beta1/ErrorEvent.php | 207 +++++++ .../ErrorReporting/V1beta1/ErrorGroup.php | 181 ++++++ .../V1beta1/ErrorGroupOrder.php | 76 +++ .../V1beta1/ErrorGroupServiceGrpcClient.php | 66 +++ .../V1beta1/ErrorGroupStats.php | 488 ++++++++++++++++ .../V1beta1/ErrorStatsServiceGrpcClient.php | 81 +++ .../V1beta1/GetGroupRequest.php | 83 +++ .../V1beta1/HttpRequestContext.php | 252 ++++++++ .../V1beta1/ListEventsRequest.php | 289 +++++++++ .../V1beta1/ListEventsResponse.php | 153 +++++ .../V1beta1/ListGroupStatsRequest.php | 493 ++++++++++++++++ .../V1beta1/ListGroupStatsResponse.php | 165 ++++++ .../ErrorReporting/V1beta1/QueryTimeRange.php | 68 +++ .../V1beta1/QueryTimeRange/Period.php | 90 +++ .../V1beta1/QueryTimeRange_Period.php | 16 + .../V1beta1/ReportErrorEventRequest.php | 127 ++++ .../V1beta1/ReportErrorEventResponse.php | 34 ++ .../V1beta1/ReportErrorsServiceGrpcClient.php | 66 +++ .../V1beta1/ReportedErrorEvent.php | 295 ++++++++++ .../V1beta1/ResolutionStatus.php | 78 +++ .../ErrorReporting/V1beta1/ServiceContext.php | 180 ++++++ .../V1beta1/ServiceContextFilter.php | 150 +++++ .../ErrorReporting/V1beta1/SourceLocation.php | 150 +++++ .../ErrorReporting/V1beta1/TimedCount.php | 157 +++++ .../V1beta1/TimedCountAlignment.php | 71 +++ .../ErrorReporting/V1beta1/TrackingIssue.php | 71 +++ .../V1beta1/UpdateGroupRequest.php | 77 +++ .../src/V1beta1/ErrorGroupServiceClient.php | 36 ++ .../src/V1beta1/ErrorStatsServiceClient.php | 36 ++ .../Gapic/ErrorGroupServiceGapicClient.php | 353 +++++++++++ .../Gapic/ErrorStatsServiceGapicClient.php | 547 ++++++++++++++++++ .../Gapic/ReportErrorsServiceGapicClient.php | 328 +++++++++++ .../src/V1beta1/ReportErrorsServiceClient.php | 36 ++ .../v1beta1/src/V1beta1/gapic_metadata.json | 66 +++ .../error_group_service_client_config.json | 45 ++ .../error_group_service_descriptor_config.php | 7 + ...error_group_service_rest_client_config.php | 32 + .../error_stats_service_client_config.json | 50 ++ .../error_stats_service_descriptor_config.php | 28 + ...error_stats_service_rest_client_config.php | 44 ++ .../report_errors_service_client_config.json | 37 ++ ...eport_errors_service_descriptor_config.php | 7 + ...port_errors_service_rest_client_config.php | 20 + .../V1beta1/ErrorGroupServiceClientTest.php | 200 +++++++ .../V1beta1/ErrorStatsServiceClientTest.php | 282 +++++++++ .../V1beta1/ReportErrorsServiceClientTest.php | 144 +++++ 53 files changed, 6872 insertions(+) create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorStatsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..388a6289009cf95b037332cddfd0e9050ff8701c GIT binary patch literal 2399 zcmbVOUvJ|?5GU!MYbUw3XF!UoBDT2`mjljL%L}-aQ`+W2pw~oAav)@3InE~a;dsq@ zU2&ZH&PU)g@W{7-k8%>?l}BdR>$JTFsUa_MoSEOw{N^_^`}vdjEQb4}Nh8WVL5F1U zl87@(V$KBfSx5%yXhb>j*(44^%1uI!+T^6&BaNe0ZyQ|`mU5rkWX#w&q}Gt03&z64 z@>NBpgP|upr>XFqBaP=A z-o$gB?;J?HJpe!Sl7t*8TzCZpKXEz;1D_v8F^ts(e(L7L0e$)V9Y|ObM26 zYLE1>5-u2#S{9>i-w1M_2%gfbrxU`dNO`oU;+6mx(}iaagfPB^dmJks zrjmbGYAa1DOL*Se?*3e`Qa2e&SAp35*Y#6)Jd3_8TI3`#vAL})6l^1tFQ_jP>y>`G zuoMgULVaIUx8Uye3`($&@-Snq`gcK7+Bm0?FiZd{A6!`&Wm4MR%+t!NW=?f$^k6-q z{5ob(wPeO5D+TF{YZlepcn_(Pg5XL&(!Ny3uF~x$(+I|Iha(GE~Y4@|a;1yvS zyxM}bo5$%Sv~ckJbIKDeus;7?xGRe;XR#|@#ayKfbvyrqYvdXA!3))A5m>W z6ZmAVV829w)675T1BISqggQFpJRACM$b2;hRFrdbuF^Ty5Y=A_V9Ypr4VEWVoUx(q zGA*90!3+Qymy3mpgr*AHkW*Z09OG3i8C&oUk{9E&qPkyDD?_T9X34k*tDH`lpl%RX zmKCjStkAXKq|pcmmm7QHOb7Bdl)@mQZj??2nwlj8>y)n-SB(Z0!G|wk>=;-yAoNn)qK4 zXU~dqe~!Nvj8#~A*6-ot;=!*)kQ;cOk{^_^)!LD}u2cB#dp(`TEcBwW$@thpf>rlf zm!sfTmw~+*internalAddGeneratedFile( + ' +ð +Egoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.proto"\\ +GetGroupRequestI + +group_name ( B5àAúA/ +-clouderrorreporting.googleapis.com/ErrorGroup"a +UpdateGroupRequestK +group ( 27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupBàA2û +ErrorGroupServiceÁ +GetGroup<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup">‚Óä“+)/v1beta1/{group_name=projects/*/groups/*}ÚA +group_nameÉ + UpdateGroup?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"@‚Óä“2)/v1beta1/{group.name=projects/*/groups/*}:groupÚAgroupVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB£ +/com.google.devtools.clouderrorreporting.v1beta1BErrorGroupServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php new file mode 100644 index 0000000000000000000000000000000000000000..fdd537f4a0dc755436c095b08343d5715e162542 GIT binary patch literal 5156 zcmcgwOK%%h6vlRwHm9lU+~(ni*VHXEec3cc6uHldJqZzM?Al2S$m%e$ublyVW|+B7 zDODr{5*wB*S+ZlvFJRpz2nkgzxp~_c4wq2~k|NbW`WfJ>NZ#?|k=h^@g|Z z!AWg_I@GrqZD?x`G`3DP&v%(yciY-px7nn=R(Cs|-KKt4(~2c+xwN7g#l@8qXd1X( zzfSX7%XM3AnrqMv=DO`5S8u!B2K9Z{_o?Ul%ywG2jf-oPSr>C+*bJD(0yCighFzyw zu_AzDb!gyOb*e3t=WgNbhQ+Mff&i}-6?m<%6TEik;v5IR0#I*TL7*9Y?J8fRDwlwV zpy5BSyVkbr8ebj%J7ou^?byt=+V&S1|23^?wF8PMJLfjLPMz7Vqj7_hQ>Qa$G>OUQ zp7Jnmv=5yv^AuwGYKsn|zGJn~{h;pK9&`ONPR-|Al=TwNM`q5bWjUPP)MliQ`TPzi zuW8Kh(*D&o&8MvEJ6D9?9ALBetF}ujb1Sec)QyQ4qdoz zE5_)JMvox#*nTs;lJWwdhVL~no=e}6a}p*Swr_Tq_RXsHot{!_TAqz<&Z!`~cl!0d z4^3Wgb4?XoO*q~+!BqHh|6swA&~Y=>)EEcve?9`>IG* zDO|xt;(X4KDhMR;R{(gprf)ednjR9^R|dkq-KG8m&f5xykf>K-oTE0(y4!V_874eE zEbxzq_+iGgVaG`84`2kN8GWRrWC zJ|sMv4&i$qaR||f(y$Ceu8-SQdPKN$HJraMcf?L3$W!7N5^)knJmiBJ;I@)JjHp9$ zd|N;c2FRxD7q&>Zow#bU-2_Q*Lki6TbnaPl8jt}qfOfn7#>!r zBY7n|X^&)(SxDkJq~At%$6hvfV5}FFl7#>}ggZZ2(?$h>yb2Rew`1=N|3}u z8VVUUB<^e*RJ6gM2@{n!HV`B80H7~@z0z^{Opq)9GT3J_k-VIHvWlFCL)2-=*-{+$ zNMYuWIE?W&5{?8fT*y`X#{Xv_m%TU`Cw3F^h)QvO?y6E;qm@ei6a&(qUZqgja8jWt zuYV{`gEib1f1bB4{S|{`G~h#J3WzE@hUq+*0XQVqQ$hN`JJNx^7uT2cQnm53PLHH`OD z2l@;zy=CI8YHBER55}XdFV6yG91bcy5&EePA2_;!(uqe|p_^)S8jgf#8k0Tns1SZt z{*U2Uk+vzLFRHyVlQ14#K{D)Y7mjU7N^jdIZ@>woQYlr;LTPn*#nhJ;7nW}s_$!+C zmtkt_lW}`hUotCbP{g9d$TUoD|ERB+#&R(gKfBq#qlxXEAl3pJm(5b8XjHZ>lmw8T z6pd;@R(DCSu9#KBST@C&sBWQR=qpB1jwF!p$MpGmqrit&t45_NKOC6-b{NJ)Ux>|A zm6kk3K1YuVWHA0ljg?4F7Y6Eq?HIC7nbKFk{`p-zM=tbk`w#n%(AU%-LGJ8kP813MX^>hz6gwpRfziU7}%Gy4cos^MdOA`+ZD#n}z= zTMS0~$xa442KSqWH5}~T5JgY{-jo5J9VEcWHEH_JBR#X*1u}Xy`bE#KGv)>PT<-q; z`>HIxdy~~=>+%kG!E0Nr>H3|yAL5Y1JJlc+oSWRyK4tzeQ;vOfPr8F>ZM@lJUB8uU zQ3or<+}xI@`+Cv3vP-mo$6`OmPcDd;t89TkSY?GPmGC(%t6r=gg|lk%U8`1$&a2_m zmUuUN8h=y5internalAddGeneratedFile( + ' +¤ +Ggoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.protogoogle/protobuf/timestamp.proto"¹ +ReportErrorEventRequestI + project_name ( B3àAúA- ++cloudresourcemanager.googleapis.com/ProjectS +event ( 2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventBàA" +ReportErrorEventResponse"‹ +ReportedErrorEvent3 + +event_time ( 2.google.protobuf.TimestampBàAY +service_context ( 2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextBàA +message ( BàAO +context ( 29.google.devtools.clouderrorreporting.v1beta1.ErrorContextBàA2å +ReportErrorsServiceõ +ReportErrorEventD.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequestE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"T‚Óä“9"0/v1beta1/{project_name=projects/*}/events:report:eventÚAproject_name,eventVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¥ +/com.google.devtools.clouderrorreporting.v1beta1BReportErrorsServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php new file mode 100644 index 000000000000..e92e678b6697 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php @@ -0,0 +1,83 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest + */ +class DeleteEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php new file mode 100644 index 000000000000..53e2ba2358d4 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php @@ -0,0 +1,33 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse + */ +class DeleteEventsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php new file mode 100644 index 000000000000..1c5566968212 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php @@ -0,0 +1,206 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorContext + */ +class ErrorContext extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + */ + protected $http_request = null; + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + */ + protected $report_location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request + * The HTTP request which was processed when the error was + * triggered. + * @type string $user + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null + */ + public function getHttpRequest() + { + return $this->http_request; + } + + public function hasHttpRequest() + { + return isset($this->http_request); + } + + public function clearHttpRequest() + { + unset($this->http_request); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); + $this->http_request = $var; + + return $this; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null + */ + public function getReportLocation() + { + return $this->report_location; + } + + public function hasReportLocation() + { + return isset($this->report_location); + } + + public function clearReportLocation() + { + unset($this->report_location); + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var + * @return $this + */ + public function setReportLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); + $this->report_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php new file mode 100644 index 000000000000..64d7396ca2d5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php @@ -0,0 +1,207 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorEvent + */ +class ErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + */ + protected $event_time = null; + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + */ + protected $service_context = null; + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * The `ServiceContext` for which this error was reported. + * @type string $message + * The stack trace that was reported or logged by the service. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Data about the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php new file mode 100644 index 000000000000..dfc0b18e9187 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php @@ -0,0 +1,181 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroup + */ +class ErrorGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + */ + protected $group_id = ''; + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + */ + private $tracking_issues; + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + */ + protected $resolution_status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * @type string $group_id + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * @type \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $tracking_issues + * Associated tracking issues. + * @type int $resolution_status + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrackingIssues() + { + return $this->tracking_issues; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @param \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrackingIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); + $this->tracking_issues = $arr; + + return $this; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @return int + */ + public function getResolutionStatus() + { + return $this->resolution_status; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @param int $var + * @return $this + */ + public function setResolutionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); + $this->resolution_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php new file mode 100644 index 000000000000..fd726de75f01 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php @@ -0,0 +1,76 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder + */ +class ErrorGroupOrder +{ + /** + * No group order specified. + * + * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; + */ + const GROUP_ORDER_UNSPECIFIED = 0; + /** + * Total count of errors in the given time window in descending order. + * + * Generated from protobuf enum COUNT_DESC = 1; + */ + const COUNT_DESC = 1; + /** + * Timestamp when the group was last seen in the given time window + * in descending order. + * + * Generated from protobuf enum LAST_SEEN_DESC = 2; + */ + const LAST_SEEN_DESC = 2; + /** + * Timestamp when the group was created in descending order. + * + * Generated from protobuf enum CREATED_DESC = 3; + */ + const CREATED_DESC = 3; + /** + * Number of affected users in the given time window in descending order. + * + * Generated from protobuf enum AFFECTED_USERS_DESC = 4; + */ + const AFFECTED_USERS_DESC = 4; + + private static $valueToName = [ + self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', + self::COUNT_DESC => 'COUNT_DESC', + self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', + self::CREATED_DESC => 'CREATED_DESC', + self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php new file mode 100644 index 000000000000..5f5856a4f6d7 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php @@ -0,0 +1,66 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], + $metadata, $options); + } + + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + * @param \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGroup(\Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php new file mode 100644 index 000000000000..7c3bfafa688b --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php @@ -0,0 +1,488 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats + */ +class ErrorGroupStats extends \Google\Protobuf\Internal\Message +{ + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + */ + protected $group = null; + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + */ + protected $affected_users_count = 0; + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + */ + private $timed_counts; + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + */ + protected $first_seen_time = null; + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + */ + protected $last_seen_time = null; + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + */ + private $affected_services; + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + */ + protected $num_affected_services = 0; + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + */ + protected $representative = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Group data that is independent of the filter criteria. + * @type int|string $count + * Approximate total number of events in the given group that match + * the filter criteria. + * @type int|string $affected_users_count + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * @type \Google\Cloud\ErrorReporting\V1beta1\TimedCount[]|\Google\Protobuf\Internal\RepeatedField $timed_counts + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * @type \Google\Protobuf\Timestamp $first_seen_time + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * @type \Google\Protobuf\Timestamp $last_seen_time + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[]|\Google\Protobuf\Internal\RepeatedField $affected_services + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * @type int $num_affected_services + * The total number of services with a non-zero error count for the given + * filter criteria. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @return int|string + */ + public function getAffectedUsersCount() + { + return $this->affected_users_count; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @param int|string $var + * @return $this + */ + public function setAffectedUsersCount($var) + { + GPBUtil::checkInt64($var); + $this->affected_users_count = $var; + + return $this; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimedCounts() + { + return $this->timed_counts; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @param \Google\Cloud\ErrorReporting\V1beta1\TimedCount[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimedCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); + $this->timed_counts = $arr; + + return $this; + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFirstSeenTime() + { + return $this->first_seen_time; + } + + public function hasFirstSeenTime() + { + return isset($this->first_seen_time); + } + + public function clearFirstSeenTime() + { + unset($this->first_seen_time); + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFirstSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->first_seen_time = $var; + + return $this; + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSeenTime() + { + return $this->last_seen_time; + } + + public function hasLastSeenTime() + { + return isset($this->last_seen_time); + } + + public function clearLastSeenTime() + { + unset($this->last_seen_time); + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_seen_time = $var; + + return $this; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAffectedServices() + { + return $this->affected_services; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAffectedServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->affected_services = $arr; + + return $this; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @return int + */ + public function getNumAffectedServices() + { + return $this->num_affected_services; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @param int $var + * @return $this + */ + public function setNumAffectedServices($var) + { + GPBUtil::checkInt32($var); + $this->num_affected_services = $var; + + return $this; + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null + */ + public function getRepresentative() + { + return $this->representative; + } + + public function hasRepresentative() + { + return isset($this->representative); + } + + public function clearRepresentative() + { + unset($this->representative); + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var + * @return $this + */ + public function setRepresentative($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->representative = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php new file mode 100644 index 000000000000..2a17f17379b1 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php @@ -0,0 +1,81 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists the specified events. + * @param \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListEvents(\Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes all error events of a given project. + * @param \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEvents(\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php new file mode 100644 index 000000000000..b08f87708c7a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php @@ -0,0 +1,83 @@ +google.devtools.clouderrorreporting.v1beta1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group_name + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroupName() + { + return $this->group_name; + } + + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroupName($var) + { + GPBUtil::checkString($var, True); + $this->group_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php new file mode 100644 index 000000000000..95c45a2ac88f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php @@ -0,0 +1,252 @@ +google.devtools.clouderrorreporting.v1beta1.HttpRequestContext + */ +class HttpRequestContext extends \Google\Protobuf\Internal\Message +{ + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + */ + protected $method = ''; + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + */ + protected $user_agent = ''; + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + */ + protected $referrer = ''; + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + */ + protected $response_status_code = 0; + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + */ + protected $remote_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * The type of HTTP request, such as `GET`, `POST`, etc. + * @type string $url + * The URL of the request. + * @type string $user_agent + * The user agent information that is provided with the request. + * @type string $referrer + * The referrer information that is provided with the request. + * @type int $response_status_code + * The HTTP response status code for the request. + * @type string $remote_ip + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @return string + */ + public function getReferrer() + { + return $this->referrer; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @param string $var + * @return $this + */ + public function setReferrer($var) + { + GPBUtil::checkString($var, True); + $this->referrer = $var; + + return $this; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @return int + */ + public function getResponseStatusCode() + { + return $this->response_status_code; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @param int $var + * @return $this + */ + public function setResponseStatusCode($var) + { + GPBUtil::checkInt32($var); + $this->response_status_code = $var; + + return $this; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @return string + */ + public function getRemoteIp() + { + return $this->remote_ip; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @param string $var + * @return $this + */ + public function setRemoteIp($var) + { + GPBUtil::checkString($var, True); + $this->remote_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php new file mode 100644 index 000000000000..db3b0b9de9b6 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php @@ -0,0 +1,289 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The group for which events shall be returned. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * @type string $group_id + * Required. The group for which events shall be returned. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * @type string $page_token + * Optional. A `next_page_token` provided by a previous response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The group for which events shall be returned. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Required. The group for which events shall be returned. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php new file mode 100644 index 000000000000..9525e10fe223 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php @@ -0,0 +1,153 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + */ + private $error_events; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[]|\Google\Protobuf\Internal\RepeatedField $error_events + * The error events which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorEvents() + { + return $this->error_events; + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->error_events = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php new file mode 100644 index 000000000000..1b79bfa32d5f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php @@ -0,0 +1,493 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest + */ +class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $group_id; + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timed_count_duration = null; + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment = 0; + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment_time = null; + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order = 0; + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * @type string[]|\Google\Protobuf\Internal\RepeatedField $group_id + * Optional. List all ErrorGroupStats with these IDs. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * @type \Google\Protobuf\Duration $timed_count_duration + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * @type \Google\Protobuf\Timestamp $alignment_time + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * Default is 20. + * @type string $page_token + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->group_id = $arr; + + return $this; + } + + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimedCountDuration() + { + return $this->timed_count_duration; + } + + public function hasTimedCountDuration() + { + return isset($this->timed_count_duration); + } + + public function clearTimedCountDuration() + { + unset($this->timed_count_duration); + } + + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimedCountDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timed_count_duration = $var; + + return $this; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); + $this->alignment = $var; + + return $this; + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getAlignmentTime() + { + return $this->alignment_time; + } + + public function hasAlignmentTime() + { + return isset($this->alignment_time); + } + + public function clearAlignmentTime() + { + unset($this->alignment_time); + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setAlignmentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->alignment_time = $var; + + return $this; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); + $this->order = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php new file mode 100644 index 000000000000..2d7da0448ab3 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php @@ -0,0 +1,165 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse + */ +class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + */ + private $error_group_stats; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[]|\Google\Protobuf\Internal\RepeatedField $error_group_stats + * The error group stats which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorGroupStats() + { + return $this->error_group_stats; + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorGroupStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); + $this->error_group_stats = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php new file mode 100644 index 000000000000..e095a9c2c996 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php @@ -0,0 +1,68 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange + */ +class QueryTimeRange extends \Google\Protobuf\Internal\Message +{ + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + */ + protected $period = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $period + * Restricts the query to the specified time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @return int + */ + public function getPeriod() + { + return $this->period; + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @param int $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); + $this->period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php new file mode 100644 index 000000000000..9aa826cf2d57 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php @@ -0,0 +1,90 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period + */ +class Period +{ + /** + * Do not use. + * + * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; + */ + const PERIOD_UNSPECIFIED = 0; + /** + * Retrieve data for the last hour. + * Recommended minimum timed count duration: 1 min. + * + * Generated from protobuf enum PERIOD_1_HOUR = 1; + */ + const PERIOD_1_HOUR = 1; + /** + * Retrieve data for the last 6 hours. + * Recommended minimum timed count duration: 10 min. + * + * Generated from protobuf enum PERIOD_6_HOURS = 2; + */ + const PERIOD_6_HOURS = 2; + /** + * Retrieve data for the last day. + * Recommended minimum timed count duration: 1 hour. + * + * Generated from protobuf enum PERIOD_1_DAY = 3; + */ + const PERIOD_1_DAY = 3; + /** + * Retrieve data for the last week. + * Recommended minimum timed count duration: 6 hours. + * + * Generated from protobuf enum PERIOD_1_WEEK = 4; + */ + const PERIOD_1_WEEK = 4; + /** + * Retrieve data for the last 30 days. + * Recommended minimum timed count duration: 1 day. + * + * Generated from protobuf enum PERIOD_30_DAYS = 5; + */ + const PERIOD_30_DAYS = 5; + + private static $valueToName = [ + self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', + self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', + self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', + self::PERIOD_1_DAY => 'PERIOD_1_DAY', + self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', + self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Period::class, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange_Period::class); + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php new file mode 100644 index 000000000000..1ab3a0a72ac0 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php @@ -0,0 +1,16 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest + */ +class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event + * Required. The error event to be reported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php new file mode 100644 index 000000000000..14380862c6a8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php @@ -0,0 +1,34 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse + */ +class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php new file mode 100644 index 000000000000..6586dff9b22f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php @@ -0,0 +1,66 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php new file mode 100644 index 000000000000..d92ac7651617 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php @@ -0,0 +1,295 @@ +google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent + */ +class ReportedErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_time = null; + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_context = null; + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * Required. The service context in which this error has occurred. + * @type string $message + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Optional. A description of the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php new file mode 100644 index 000000000000..a50feb043ec5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php @@ -0,0 +1,78 @@ +google.devtools.clouderrorreporting.v1beta1.ResolutionStatus + */ +class ResolutionStatus +{ + /** + * Status is unknown. When left unspecified in requests, it is treated like + * OPEN. + * + * Generated from protobuf enum RESOLUTION_STATUS_UNSPECIFIED = 0; + */ + const RESOLUTION_STATUS_UNSPECIFIED = 0; + /** + * The error group is not being addressed. This is the default for + * new groups. It is also used for errors re-occurring after marked RESOLVED. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * Error Group manually acknowledged, it can have an issue link attached. + * + * Generated from protobuf enum ACKNOWLEDGED = 2; + */ + const ACKNOWLEDGED = 2; + /** + * Error Group manually resolved, more events for this group are not expected + * to occur. + * + * Generated from protobuf enum RESOLVED = 3; + */ + const RESOLVED = 3; + /** + * The error group is muted and excluded by default on group stats requests. + * + * Generated from protobuf enum MUTED = 4; + */ + const MUTED = 4; + + private static $valueToName = [ + self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED', + self::OPEN => 'OPEN', + self::ACKNOWLEDGED => 'ACKNOWLEDGED', + self::RESOLVED => 'RESOLVED', + self::MUTED => 'MUTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php new file mode 100644 index 000000000000..df54f8cfb839 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php @@ -0,0 +1,180 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContext + */ +class ServiceContext extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * @type string $version + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * @type string $resource_type + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php new file mode 100644 index 000000000000..140d3323103d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter + */ +class ServiceContextFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * @type string $version + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * @type string $resource_type + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php new file mode 100644 index 000000000000..f85e34012700 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.SourceLocation + */ +class SourceLocation extends \Google\Protobuf\Internal\Message +{ + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + */ + protected $file_path = ''; + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + */ + protected $line_number = 0; + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + */ + protected $function_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * @type int $line_number + * 1-based. 0 indicates that the line number is unknown. + * @type string $function_name + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @return int + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @param int $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->line_number = $var; + + return $this; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php new file mode 100644 index 000000000000..7605fd7676fd --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php @@ -0,0 +1,157 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCount + */ +class TimedCount extends \Google\Protobuf\Internal\Message +{ + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + */ + protected $count = 0; + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $count + * Approximate number of occurrences in the given time period. + * @type \Google\Protobuf\Timestamp $start_time + * Start of the time period to which `count` refers (included). + * @type \Google\Protobuf\Timestamp $end_time + * End of the time period to which `count` refers (excluded). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php new file mode 100644 index 000000000000..633e74c96e9d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php @@ -0,0 +1,71 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment + */ +class TimedCountAlignment +{ + /** + * No alignment specified. + * + * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + */ + const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the `alignment_time` provided in + * the request. + * The `alignment_time` does not have to be inside the query period but + * even if it is outside, only time periods are returned which overlap + * with the query period. + * A rounded alignment will typically result in a + * different size of the first or the last time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; + */ + const ALIGNMENT_EQUAL_ROUNDED = 1; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the end of the requested time + * period. This can result in a different size of the + * first time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; + */ + const ALIGNMENT_EQUAL_AT_END = 2; + + private static $valueToName = [ + self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', + self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', + self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php new file mode 100644 index 000000000000..b6a97dcab003 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php @@ -0,0 +1,71 @@ +google.devtools.clouderrorreporting.v1beta1.TrackingIssue + */ +class TrackingIssue extends \Google\Protobuf\Internal\Message +{ + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php new file mode 100644 index 000000000000..2475ee41bdc5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php @@ -0,0 +1,77 @@ +google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Required. The group which replaces the resource on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php new file mode 100644 index 000000000000..912e36c93442 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php @@ -0,0 +1,36 @@ +errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); + * } finally { + * $errorGroupServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class ErrorGroupServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $errorGroupNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getErrorGroupNameTemplate() + { + if (self::$errorGroupNameTemplate == null) { + self::$errorGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); + } + + return self::$errorGroupNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'errorGroup' => self::getErrorGroupNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a error_group + * resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted error_group resource. + * + * @experimental + */ + public static function errorGroupName($project, $group) + { + return self::getErrorGroupNameTemplate()->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - errorGroup: projects/{project}/groups/{group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Get the specified group. + * + * Sample code: + * ``` + * $errorGroupServiceClient = new ErrorGroupServiceClient(); + * try { + * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); + * } finally { + * $errorGroupServiceClient->close(); + * } + * ``` + * + * @param string $groupName Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * + * Example: `projects/my-project-123/groups/my-group` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getGroup($groupName, array $optionalArgs = []) + { + $request = new GetGroupRequest(); + $requestParamHeaders = []; + $request->setGroupName($groupName); + $requestParamHeaders['group_name'] = $groupName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + * + * Sample code: + * ``` + * $errorGroupServiceClient = new ErrorGroupServiceClient(); + * try { + * $group = new ErrorGroup(); + * $response = $errorGroupServiceClient->updateGroup($group); + * } finally { + * $errorGroupServiceClient->close(); + * } + * ``` + * + * @param ErrorGroup $group Required. The group which replaces the resource on the server. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateGroup($group, array $optionalArgs = []) + { + $request = new UpdateGroupRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group.name'] = $group->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php new file mode 100644 index 000000000000..a1df856bf9d3 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php @@ -0,0 +1,547 @@ +projectName('[PROJECT]'); + * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class ErrorStatsServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Deletes all error events of a given project. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: `projects/my-project-123`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteEvents($projectName, array $optionalArgs = []) + { + $request = new DeleteEventsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEvents', DeleteEventsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the specified events. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * $groupId = 'group_id'; + * // Iterate over pages of elements + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: `projects/my-project-123`. + * @param string $groupId Required. The group for which events shall be returned. + * @param array $optionalArgs { + * Optional. + * + * @type ServiceContextFilter $serviceFilter + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type QueryTimeRange $timeRange + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listEvents($projectName, $groupId, array $optionalArgs = []) + { + $request = new ListEventsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $request->setGroupId($groupId); + $requestParamHeaders['project_name'] = $projectName; + if (isset($optionalArgs['serviceFilter'])) { + $request->setServiceFilter($optionalArgs['serviceFilter']); + } + + if (isset($optionalArgs['timeRange'])) { + $request->setTimeRange($optionalArgs['timeRange']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEvents', $optionalArgs, ListEventsResponse::class, $request); + } + + /** + * Lists the specified groups. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * + * Examples: `projects/my-project-123`, `projects/5551234`. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $groupId + * Optional. List all ErrorGroupStats with these IDs. + * @type ServiceContextFilter $serviceFilter + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type QueryTimeRange $timeRange + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * @type Duration $timedCountDuration + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} + * @type Timestamp $alignmentTime + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listGroupStats($projectName, array $optionalArgs = []) + { + $request = new ListGroupStatsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $requestParamHeaders['project_name'] = $projectName; + if (isset($optionalArgs['groupId'])) { + $request->setGroupId($optionalArgs['groupId']); + } + + if (isset($optionalArgs['serviceFilter'])) { + $request->setServiceFilter($optionalArgs['serviceFilter']); + } + + if (isset($optionalArgs['timeRange'])) { + $request->setTimeRange($optionalArgs['timeRange']); + } + + if (isset($optionalArgs['timedCountDuration'])) { + $request->setTimedCountDuration($optionalArgs['timedCountDuration']); + } + + if (isset($optionalArgs['alignment'])) { + $request->setAlignment($optionalArgs['alignment']); + } + + if (isset($optionalArgs['alignmentTime'])) { + $request->setAlignmentTime($optionalArgs['alignmentTime']); + } + + if (isset($optionalArgs['order'])) { + $request->setOrder($optionalArgs['order']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGroupStats', $optionalArgs, ListGroupStatsResponse::class, $request); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php new file mode 100644 index 000000000000..d27fe6558b6f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php @@ -0,0 +1,328 @@ +projectName('[PROJECT]'); + * $event = new ReportedErrorEvent(); + * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); + * } finally { + * $reportErrorsServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class ReportErrorsServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Report an individual error event and record the event to a log. + * + * This endpoint accepts **either** an OAuth token, + * **or** an [API key](https://support.google.com/cloud/answer/6158862) + * for authentication. To use an API key, append it to the URL as the value of + * a `key` parameter. For example: + * + * `POST + * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` + * + * **Note:** [Error Reporting](/error-reporting) is a global service built + * on Cloud Logging and doesn't analyze logs stored + * in regional log buckets or logs routed to other Google Cloud projects. + * + * For more information, see + * [Using Error Reporting with regionalized + * logs](/error-reporting/docs/regionalization). + * + * Sample code: + * ``` + * $reportErrorsServiceClient = new ReportErrorsServiceClient(); + * try { + * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]'); + * $event = new ReportedErrorEvent(); + * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); + * } finally { + * $reportErrorsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: // `projects/my-project-123`. + * @param ReportedErrorEvent $event Required. The error event to be reported. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function reportErrorEvent($projectName, $event, array $optionalArgs = []) + { + $request = new ReportErrorEventRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $request->setEvent($event); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReportErrorEvent', ReportErrorEventResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php new file mode 100644 index 000000000000..58f5ceccda4d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php new file mode 100644 index 000000000000..8660657af11a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -0,0 +1,32 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', + 'placeholders' => [ + 'group_name' => [ + 'getters' => [ + 'getGroupName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'put', + 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json new file mode 100644 index 000000000000..0a7501188091 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "DeleteEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroupStats": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php new file mode 100644 index 000000000000..35148865a5eb --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorEvents', + ], + ], + 'ListGroupStats' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorGroupStats', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php new file mode 100644 index 000000000000..57064b872a4e --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -0,0 +1,44 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'DeleteEvents' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'ListGroupStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json new file mode 100644 index 000000000000..701d5afb9615 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ReportErrorEvent": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php new file mode 100644 index 000000000000..52aefb0c1051 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php @@ -0,0 +1,7 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php new file mode 100644 index 000000000000..f2c99ae79229 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php @@ -0,0 +1,20 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ + 'ReportErrorEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', + 'body' => 'event', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php new file mode 100644 index 000000000000..b69bf39bd865 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php @@ -0,0 +1,200 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** + * @return ErrorGroupServiceClient + */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorGroupServiceClient($options); + } + + /** + * @test + */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); + $response = $client->getGroup($formattedGroupName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroupName(); + $this->assertProtobufEquals($formattedGroupName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); + try { + $client->getGroup($formattedGroupName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function updateGroupTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $group = new ErrorGroup(); + $response = $client->updateGroup($group); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function updateGroupExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $group = new ErrorGroup(); + try { + $client->updateGroup($group); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php new file mode 100644 index 000000000000..1db07938aed4 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php @@ -0,0 +1,282 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** + * @return ErrorStatsServiceClient + */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorStatsServiceClient($options); + } + + /** + * @test + */ + public function deleteEventsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DeleteEventsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $response = $client->deleteEvents($formattedProjectName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function deleteEventsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + try { + $client->deleteEvents($formattedProjectName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listEventsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorEventsElement = new ErrorEvent(); + $errorEvents = [ + $errorEventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorEvents($errorEvents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + $response = $client->listEvents($formattedProjectName, $groupId); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listEventsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + try { + $client->listEvents($formattedProjectName, $groupId); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listGroupStatsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorGroupStatsElement = new ErrorGroupStats(); + $errorGroupStats = [ + $errorGroupStatsElement, + ]; + $expectedResponse = new ListGroupStatsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorGroupStats($errorGroupStats); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $response = $client->listGroupStats($formattedProjectName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function listGroupStatsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + try { + $client->listGroupStats($formattedProjectName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php new file mode 100644 index 000000000000..c9a3df25893a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php @@ -0,0 +1,144 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** + * @return ReportErrorsServiceClient + */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReportErrorsServiceClient($options); + } + + /** + * @test + */ + public function reportErrorEventTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportErrorEventResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + $response = $client->reportErrorEvent($formattedProjectName, $event); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function reportErrorEventExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $client->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + try { + $client->reportErrorEvent($formattedProjectName, $event); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From a3e929af0b3d925b180113283b118f13db781331 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 5 Jan 2022 08:35:54 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../src/V1beta1/DeleteEventsRequest.php | 8 +- ErrorReporting/src/V1beta1/ErrorContext.php | 8 +- ErrorReporting/src/V1beta1/ErrorEvent.php | 12 +- ErrorReporting/src/V1beta1/ErrorGroup.php | 46 +- .../src/V1beta1/ErrorGroupServiceClient.php | 14 +- .../V1beta1/ErrorGroupServiceGrpcClient.php | 3 +- .../src/V1beta1/ErrorGroupStats.php | 16 +- .../src/V1beta1/ErrorStatsServiceClient.php | 14 +- .../V1beta1/ErrorStatsServiceGrpcClient.php | 3 +- .../Gapic/ErrorGroupServiceGapicClient.php | 192 +++--- .../Gapic/ErrorStatsServiceGapicClient.php | 366 ++++++------ .../Gapic/ReportErrorsServiceGapicClient.php | 135 +++-- .../src/V1beta1/GetGroupRequest.php | 8 +- .../src/V1beta1/ListEventsRequest.php | 16 +- .../src/V1beta1/ListEventsResponse.php | 4 +- .../src/V1beta1/ListGroupStatsRequest.php | 48 +- .../src/V1beta1/ListGroupStatsResponse.php | 4 +- .../src/V1beta1/ReportErrorEventRequest.php | 28 +- .../src/V1beta1/ReportErrorsServiceClient.php | 14 +- .../V1beta1/ReportErrorsServiceGrpcClient.php | 15 +- .../src/V1beta1/ReportedErrorEvent.php | 12 +- .../src}/V1beta1/ResolutionStatus.php | 0 ErrorReporting/src/V1beta1/TimedCount.php | 8 +- .../src/V1beta1/UpdateGroupRequest.php | 4 +- .../src/V1beta1/gapic_metadata.json | 0 .../error_group_service_client_config.json | 82 +-- .../error_group_service_descriptor_config.php | 3 +- ...error_group_service_rest_client_config.php | 22 +- .../error_stats_service_client_config.json | 92 +-- .../error_stats_service_descriptor_config.php | 8 +- ...error_stats_service_rest_client_config.php | 11 +- .../report_errors_service_client_config.json | 66 +-- ...eport_errors_service_descriptor_config.php | 3 +- .../V1beta1/ErrorGroupServiceClientTest.php | 108 ++-- .../V1beta1/ErrorStatsServiceClientTest.php | 156 +++-- .../V1beta1/ReportErrorsServiceClientTest.php | 53 +- .../Clouderrorreporting/V1Beta1/Common.php | Bin 2399 -> 0 bytes .../V1Beta1/ErrorGroupService.php | 42 -- .../V1Beta1/ErrorStatsService.php | Bin 5156 -> 0 bytes .../V1Beta1/ReportErrorsService.php | 46 -- .../V1beta1/DeleteEventsRequest.php | 83 --- .../V1beta1/DeleteEventsResponse.php | 33 -- .../ErrorReporting/V1beta1/ErrorContext.php | 206 ------- .../ErrorReporting/V1beta1/ErrorEvent.php | 207 ------- .../ErrorReporting/V1beta1/ErrorGroup.php | 181 ------ .../V1beta1/ErrorGroupOrder.php | 76 --- .../V1beta1/ErrorGroupServiceGrpcClient.php | 66 --- .../V1beta1/ErrorGroupStats.php | 488 ---------------- .../V1beta1/ErrorStatsServiceGrpcClient.php | 81 --- .../V1beta1/GetGroupRequest.php | 83 --- .../V1beta1/HttpRequestContext.php | 252 -------- .../V1beta1/ListEventsRequest.php | 289 --------- .../V1beta1/ListEventsResponse.php | 153 ----- .../V1beta1/ListGroupStatsRequest.php | 493 ---------------- .../V1beta1/ListGroupStatsResponse.php | 165 ------ .../ErrorReporting/V1beta1/QueryTimeRange.php | 68 --- .../V1beta1/QueryTimeRange/Period.php | 90 --- .../V1beta1/QueryTimeRange_Period.php | 16 - .../V1beta1/ReportErrorEventRequest.php | 127 ---- .../V1beta1/ReportErrorEventResponse.php | 34 -- .../V1beta1/ReportErrorsServiceGrpcClient.php | 66 --- .../V1beta1/ReportedErrorEvent.php | 295 ---------- .../ErrorReporting/V1beta1/ServiceContext.php | 180 ------ .../V1beta1/ServiceContextFilter.php | 150 ----- .../ErrorReporting/V1beta1/SourceLocation.php | 150 ----- .../ErrorReporting/V1beta1/TimedCount.php | 157 ----- .../V1beta1/TimedCountAlignment.php | 71 --- .../ErrorReporting/V1beta1/TrackingIssue.php | 71 --- .../V1beta1/UpdateGroupRequest.php | 77 --- .../src/V1beta1/ErrorGroupServiceClient.php | 36 -- .../src/V1beta1/ErrorStatsServiceClient.php | 36 -- .../Gapic/ErrorGroupServiceGapicClient.php | 353 ----------- .../Gapic/ErrorStatsServiceGapicClient.php | 547 ------------------ .../Gapic/ReportErrorsServiceGapicClient.php | 328 ----------- .../src/V1beta1/ReportErrorsServiceClient.php | 36 -- .../error_group_service_client_config.json | 45 -- .../error_group_service_descriptor_config.php | 7 - ...error_group_service_rest_client_config.php | 32 - .../error_stats_service_client_config.json | 50 -- .../error_stats_service_descriptor_config.php | 28 - ...error_stats_service_rest_client_config.php | 44 -- .../report_errors_service_client_config.json | 37 -- ...eport_errors_service_descriptor_config.php | 7 - ...port_errors_service_rest_client_config.php | 20 - .../V1beta1/ErrorGroupServiceClientTest.php | 200 ------- .../V1beta1/ErrorStatsServiceClientTest.php | 282 --------- .../V1beta1/ReportErrorsServiceClientTest.php | 144 ----- 87 files changed, 787 insertions(+), 7523 deletions(-) rename {owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting => ErrorReporting/src}/V1beta1/ResolutionStatus.php (100%) rename {owl-bot-staging/ErrorReporting/v1beta1 => ErrorReporting}/src/V1beta1/gapic_metadata.json (100%) delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorStatsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php diff --git a/ErrorReporting/src/V1beta1/DeleteEventsRequest.php b/ErrorReporting/src/V1beta1/DeleteEventsRequest.php index bed9aab68a03..569af58e9632 100644 --- a/ErrorReporting/src/V1beta1/DeleteEventsRequest.php +++ b/ErrorReporting/src/V1beta1/DeleteEventsRequest.php @@ -17,7 +17,7 @@ class DeleteEventsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -34,7 +34,7 @@ class DeleteEventsRequest extends \Google\Protobuf\Internal\Message * * @type string $project_name * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -47,7 +47,7 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -62,7 +62,7 @@ public function getProjectName() /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. diff --git a/ErrorReporting/src/V1beta1/ErrorContext.php b/ErrorReporting/src/V1beta1/ErrorContext.php index 118262d3c6de..c0576795415f 100644 --- a/ErrorReporting/src/V1beta1/ErrorContext.php +++ b/ErrorReporting/src/V1beta1/ErrorContext.php @@ -85,11 +85,11 @@ public function __construct($data = NULL) { * triggered. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext + * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null */ public function getHttpRequest() { - return isset($this->http_request) ? $this->http_request : null; + return $this->http_request; } public function hasHttpRequest() @@ -166,11 +166,11 @@ public function setUser($var) * caught. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation + * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null */ public function getReportLocation() { - return isset($this->report_location) ? $this->report_location : null; + return $this->report_location; } public function hasReportLocation() diff --git a/ErrorReporting/src/V1beta1/ErrorEvent.php b/ErrorReporting/src/V1beta1/ErrorEvent.php index 09a749ecda32..e669ad322242 100644 --- a/ErrorReporting/src/V1beta1/ErrorEvent.php +++ b/ErrorReporting/src/V1beta1/ErrorEvent.php @@ -71,11 +71,11 @@ public function __construct($data = NULL) { * by the Error Reporting system is used. * * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getEventTime() { - return isset($this->event_time) ? $this->event_time : null; + return $this->event_time; } public function hasEventTime() @@ -109,11 +109,11 @@ public function setEventTime($var) * The `ServiceContext` for which this error was reported. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null */ public function getServiceContext() { - return isset($this->service_context) ? $this->service_context : null; + return $this->service_context; } public function hasServiceContext() @@ -171,11 +171,11 @@ public function setMessage($var) * Data about the context in which the error occurred. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null */ public function getContext() { - return isset($this->context) ? $this->context : null; + return $this->context; } public function hasContext() diff --git a/ErrorReporting/src/V1beta1/ErrorGroup.php b/ErrorReporting/src/V1beta1/ErrorGroup.php index 74afe7c771c6..e0e886ba0d60 100644 --- a/ErrorReporting/src/V1beta1/ErrorGroup.php +++ b/ErrorReporting/src/V1beta1/ErrorGroup.php @@ -17,7 +17,7 @@ class ErrorGroup extends \Google\Protobuf\Internal\Message { /** * The group resource name. - * Example: projects/my-project-123/groups/my-groupid + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw * * Generated from protobuf field string name = 1; */ @@ -35,6 +35,13 @@ class ErrorGroup extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; */ private $tracking_issues; + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + */ + private $resolution_status = 0; /** * Constructor. @@ -44,12 +51,15 @@ class ErrorGroup extends \Google\Protobuf\Internal\Message * * @type string $name * The group resource name. - * Example: projects/my-project-123/groups/my-groupid + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw * @type string $group_id * Group IDs are unique for a given project. If the same kind of error * occurs in different service contexts, it will receive the same group ID. * @type \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $tracking_issues * Associated tracking issues. + * @type int $resolution_status + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN * } */ public function __construct($data = NULL) { @@ -59,7 +69,7 @@ public function __construct($data = NULL) { /** * The group resource name. - * Example: projects/my-project-123/groups/my-groupid + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw * * Generated from protobuf field string name = 1; * @return string @@ -71,7 +81,7 @@ public function getName() /** * The group resource name. - * Example: projects/my-project-123/groups/my-groupid + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw * * Generated from protobuf field string name = 1; * @param string $var @@ -139,5 +149,33 @@ public function setTrackingIssues($var) return $this; } + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @return int + */ + public function getResolutionStatus() + { + return $this->resolution_status; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @param int $var + * @return $this + */ + public function setResolutionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); + $this->resolution_status = $var; + + return $this; + } + } diff --git a/ErrorReporting/src/V1beta1/ErrorGroupServiceClient.php b/ErrorReporting/src/V1beta1/ErrorGroupServiceClient.php index 8c172060c747..98be81eef2d3 100644 --- a/ErrorReporting/src/V1beta1/ErrorGroupServiceClient.php +++ b/ErrorReporting/src/V1beta1/ErrorGroupServiceClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -28,11 +28,9 @@ use Google\Cloud\ErrorReporting\V1beta1\Gapic\ErrorGroupServiceGapicClient; -/** - * {@inheritdoc} - */ +/** {@inheritdoc} */ class ErrorGroupServiceClient extends ErrorGroupServiceGapicClient { - // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ErrorGroupServiceGapicClient} class. + // This class is intentionally empty, and is intended to hold manual additions to + // the generated {@see ErrorGroupServiceGapicClient} class. } diff --git a/ErrorReporting/src/V1beta1/ErrorGroupServiceGrpcClient.php b/ErrorReporting/src/V1beta1/ErrorGroupServiceGrpcClient.php index 9c17dc7ebf45..5f5856a4f6d7 100644 --- a/ErrorReporting/src/V1beta1/ErrorGroupServiceGrpcClient.php +++ b/ErrorReporting/src/V1beta1/ErrorGroupServiceGrpcClient.php @@ -2,7 +2,7 @@ // GENERATED CODE -- DO NOT EDIT! // Original file comments: -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// namespace Google\Cloud\ErrorReporting\V1beta1; /** diff --git a/ErrorReporting/src/V1beta1/ErrorGroupStats.php b/ErrorReporting/src/V1beta1/ErrorGroupStats.php index d0a6029e95ae..169528ce2cca 100644 --- a/ErrorReporting/src/V1beta1/ErrorGroupStats.php +++ b/ErrorReporting/src/V1beta1/ErrorGroupStats.php @@ -160,11 +160,11 @@ public function __construct($data = NULL) { * Group data that is independent of the filter criteria. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null */ public function getGroup() { - return isset($this->group) ? $this->group : null; + return $this->group; } public function hasGroup() @@ -308,11 +308,11 @@ public function setTimedCounts($var) * time_range that was specified in the request. * * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getFirstSeenTime() { - return isset($this->first_seen_time) ? $this->first_seen_time : null; + return $this->first_seen_time; } public function hasFirstSeenTime() @@ -348,11 +348,11 @@ public function setFirstSeenTime($var) * that was specified in the request. * * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getLastSeenTime() { - return isset($this->last_seen_time) ? $this->last_seen_time : null; + return $this->last_seen_time; } public function hasLastSeenTime() @@ -448,11 +448,11 @@ public function setNumAffectedServices($var) * insight into the characteristics of the group as a whole. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null */ public function getRepresentative() { - return isset($this->representative) ? $this->representative : null; + return $this->representative; } public function hasRepresentative() diff --git a/ErrorReporting/src/V1beta1/ErrorStatsServiceClient.php b/ErrorReporting/src/V1beta1/ErrorStatsServiceClient.php index ed4b0dcbc380..8960d2046073 100644 --- a/ErrorReporting/src/V1beta1/ErrorStatsServiceClient.php +++ b/ErrorReporting/src/V1beta1/ErrorStatsServiceClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -28,11 +28,9 @@ use Google\Cloud\ErrorReporting\V1beta1\Gapic\ErrorStatsServiceGapicClient; -/** - * {@inheritdoc} - */ +/** {@inheritdoc} */ class ErrorStatsServiceClient extends ErrorStatsServiceGapicClient { - // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ErrorStatsServiceGapicClient} class. + // This class is intentionally empty, and is intended to hold manual additions to + // the generated {@see ErrorStatsServiceGapicClient} class. } diff --git a/ErrorReporting/src/V1beta1/ErrorStatsServiceGrpcClient.php b/ErrorReporting/src/V1beta1/ErrorStatsServiceGrpcClient.php index 1f1fa534dc06..2a17f17379b1 100644 --- a/ErrorReporting/src/V1beta1/ErrorStatsServiceGrpcClient.php +++ b/ErrorReporting/src/V1beta1/ErrorStatsServiceGrpcClient.php @@ -2,7 +2,7 @@ // GENERATED CODE -- DO NOT EDIT! // Original file comments: -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// namespace Google\Cloud\ErrorReporting\V1beta1; /** diff --git a/ErrorReporting/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php b/ErrorReporting/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php index 252a01018fe1..95c5c5a8e95e 100644 --- a/ErrorReporting/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php +++ b/ErrorReporting/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_group_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -29,6 +29,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; + use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; @@ -48,17 +49,17 @@ * ``` * $errorGroupServiceClient = new ErrorGroupServiceClient(); * try { - * $group = new ErrorGroup(); - * $response = $errorGroupServiceClient->updateGroup($group); + * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); * } finally { * $errorGroupServiceClient->close(); * } * ``` * - * Many parameters require resource names to be formatted in a particular way. To assist - * with these names, this class includes a format method for each type of name, and additionally - * a parseName method to extract the individual identifiers contained within formatted names - * that are returned by the API. + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. * * @experimental */ @@ -92,23 +93,25 @@ class ErrorGroupServiceGapicClient public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; + private static $errorGroupNameTemplate; + private static $pathTemplateMap; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__.'/../resources/error_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__.'/../resources/error_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__.'/../resources/error_group_service_grpc_config.json', + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__.'/../resources/error_group_service_rest_client_config.php', + 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', ], ], ]; @@ -116,7 +119,7 @@ private static function getClientDefaults() private static function getErrorGroupNameTemplate() { - if (null == self::$errorGroupNameTemplate) { + if (self::$errorGroupNameTemplate == null) { self::$errorGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); } @@ -125,7 +128,7 @@ private static function getErrorGroupNameTemplate() private static function getPathTemplateMap() { - if (null == self::$pathTemplateMap) { + if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'errorGroup' => self::getErrorGroupNameTemplate(), ]; @@ -135,13 +138,14 @@ private static function getPathTemplateMap() } /** - * Formats a string containing the fully-qualified path to represent - * a error_group resource. + * Formats a string containing the fully-qualified path to represent a error_group + * resource. * * @param string $project * @param string $group * * @return string The formatted error_group resource. + * * @experimental */ public static function errorGroupName($project, $group) @@ -156,12 +160,13 @@ public static function errorGroupName($project, $group) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern - * - errorGroup: projects/{project}/groups/{group}. + * - errorGroup: projects/{project}/groups/{group} * - * The optional $template argument can be supplied to specify a particular pattern, and must - * match one of the templates listed above. If no $template argument is provided, or if the - * $template argument does not match one of the templates listed, then parseName will check - * each of the supported templates, and return the first match. + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. * * @param string $formattedName The formatted name string * @param string $template Optional name of template to match @@ -169,12 +174,12 @@ public static function errorGroupName($project, $group) * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. + * * @experimental */ public static function parseName($formattedName, $template = null) { $templateMap = self::getPathTemplateMap(); - if ($template) { if (!isset($templateMap[$template])) { throw new ValidationException("Template name $template does not exist"); @@ -190,6 +195,7 @@ public static function parseName($formattedName, $template = null) // Swallow the exception to continue trying other path templates } } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); } @@ -197,7 +203,7 @@ public static function parseName($formattedName, $template = null) * Constructor. * * @param array $options { - * Optional. Options for configuring the service API wrapper. + * Optional. Options for configuring the service API wrapper. * * @type string $serviceAddress * **Deprecated**. This option will be removed in a future major release. Please @@ -214,38 +220,42 @@ public static function parseName($formattedName, $template = null) * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these * objects are provided, any settings in $credentialsConfig will be ignored. * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the client. - * For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . * @type bool $disableRetries * Determines whether or not retries defined by the client configuration should be * disabled. Defaults to `false`. * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either a - * path to a JSON file, or a PHP array containing the decoded JSON data. - * By default this settings points to the default client config file, which is provided - * in the resources folder. + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string `rest` - * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already instantiated - * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this - * object is provided, any settings in $transportConfig, and any `$apiEndpoint` - * setting, will be ignored. + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For * example: * $transportConfig = [ * 'grpc' => [...], - * 'rest' => [...] + * 'rest' => [...], * ]; * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. * } * * @throws ValidationException + * * @experimental */ public function __construct(array $options = []) @@ -255,108 +265,92 @@ public function __construct(array $options = []) } /** - * Replace the data for the specified group. - * Fails if the group does not exist. + * Get the specified group. * * Sample code: * ``` * $errorGroupServiceClient = new ErrorGroupServiceClient(); * try { - * $group = new ErrorGroup(); - * $response = $errorGroupServiceClient->updateGroup($group); + * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); * } finally { * $errorGroupServiceClient->close(); * } * ``` * - * @param ErrorGroup $group Required. The group which replaces the resource on the server. - * @param array $optionalArgs { - * Optional. + * @param string $groupName Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * + * Example: `projects/my-project-123/groups/my-group` + * @param array $optionalArgs { + * Optional. * * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup * * @throws ApiException if the remote call fails + * * @experimental */ - public function updateGroup($group, array $optionalArgs = []) + public function getGroup($groupName, array $optionalArgs = []) { - $request = new UpdateGroupRequest(); - $request->setGroup($group); - - $requestParams = new RequestParamsHeaderDescriptor([ - 'group.name' => $request->getGroup()->getName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->startCall( - 'UpdateGroup', - ErrorGroup::class, - $optionalArgs, - $request - )->wait(); + $request = new GetGroupRequest(); + $requestParamHeaders = []; + $request->setGroupName($groupName); + $requestParamHeaders['group_name'] = $groupName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); } /** - * Get the specified group. + * Replace the data for the specified group. + * Fails if the group does not exist. * * Sample code: * ``` * $errorGroupServiceClient = new ErrorGroupServiceClient(); * try { - * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); - * $response = $errorGroupServiceClient->getGroup($formattedGroupName); + * $group = new ErrorGroup(); + * $response = $errorGroupServiceClient->updateGroup($group); * } finally { * $errorGroupServiceClient->close(); * } * ``` * - * @param string $groupName The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * - * Example: `projects/my-project-123/groups/my-group` - * @param array $optionalArgs { - * Optional. + * @param ErrorGroup $group Required. The group which replaces the resource on the server. + * @param array $optionalArgs { + * Optional. * * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup * * @throws ApiException if the remote call fails + * * @experimental */ - public function getGroup($groupName, array $optionalArgs = []) + public function updateGroup($group, array $optionalArgs = []) { - $request = new GetGroupRequest(); - $request->setGroupName($groupName); - - $requestParams = new RequestParamsHeaderDescriptor([ - 'group_name' => $request->getGroupName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->startCall( - 'GetGroup', - ErrorGroup::class, - $optionalArgs, - $request - )->wait(); + $request = new UpdateGroupRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group.name'] = $group->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); } } diff --git a/ErrorReporting/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/ErrorReporting/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php index e5743462a0b9..5222e7ba942d 100644 --- a/ErrorReporting/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php +++ b/ErrorReporting/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -29,6 +29,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; + use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; @@ -44,8 +45,11 @@ use Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange; use Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter; use Google\Protobuf\Duration; + use Google\Protobuf\Timestamp; + + /** * Service Description: An API for retrieving and managing error statistics as well as data for * individual events. @@ -63,10 +67,10 @@ * } * ``` * - * Many parameters require resource names to be formatted in a particular way. To assist - * with these names, this class includes a format method for each type of name, and additionally - * a parseName method to extract the individual identifiers contained within formatted names - * that are returned by the API. + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. * * @experimental */ @@ -100,23 +104,25 @@ class ErrorStatsServiceGapicClient public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; + private static $projectNameTemplate; + private static $pathTemplateMap; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__.'/../resources/error_stats_service_client_config.json', - 'descriptorsConfigPath' => __DIR__.'/../resources/error_stats_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__.'/../resources/error_stats_service_grpc_config.json', + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__.'/../resources/error_stats_service_rest_client_config.php', + 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', ], ], ]; @@ -124,7 +130,7 @@ private static function getClientDefaults() private static function getProjectNameTemplate() { - if (null == self::$projectNameTemplate) { + if (self::$projectNameTemplate == null) { self::$projectNameTemplate = new PathTemplate('projects/{project}'); } @@ -133,7 +139,7 @@ private static function getProjectNameTemplate() private static function getPathTemplateMap() { - if (null == self::$pathTemplateMap) { + if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'project' => self::getProjectNameTemplate(), ]; @@ -143,12 +149,13 @@ private static function getPathTemplateMap() } /** - * Formats a string containing the fully-qualified path to represent - * a project resource. + * Formats a string containing the fully-qualified path to represent a project + * resource. * * @param string $project * * @return string The formatted project resource. + * * @experimental */ public static function projectName($project) @@ -162,12 +169,13 @@ public static function projectName($project) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern - * - project: projects/{project}. + * - project: projects/{project} * - * The optional $template argument can be supplied to specify a particular pattern, and must - * match one of the templates listed above. If no $template argument is provided, or if the - * $template argument does not match one of the templates listed, then parseName will check - * each of the supported templates, and return the first match. + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. * * @param string $formattedName The formatted name string * @param string $template Optional name of template to match @@ -175,12 +183,12 @@ public static function projectName($project) * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. + * * @experimental */ public static function parseName($formattedName, $template = null) { $templateMap = self::getPathTemplateMap(); - if ($template) { if (!isset($templateMap[$template])) { throw new ValidationException("Template name $template does not exist"); @@ -196,6 +204,7 @@ public static function parseName($formattedName, $template = null) // Swallow the exception to continue trying other path templates } } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); } @@ -203,7 +212,7 @@ public static function parseName($formattedName, $template = null) * Constructor. * * @param array $options { - * Optional. Options for configuring the service API wrapper. + * Optional. Options for configuring the service API wrapper. * * @type string $serviceAddress * **Deprecated**. This option will be removed in a future major release. Please @@ -220,38 +229,42 @@ public static function parseName($formattedName, $template = null) * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these * objects are provided, any settings in $credentialsConfig will be ignored. * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the client. - * For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . * @type bool $disableRetries * Determines whether or not retries defined by the client configuration should be * disabled. Defaults to `false`. * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either a - * path to a JSON file, or a PHP array containing the decoded JSON data. - * By default this settings points to the default client config file, which is provided - * in the resources folder. + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string `rest` - * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already instantiated - * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this - * object is provided, any settings in $transportConfig, and any `$apiEndpoint` - * setting, will be ignored. + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For * example: * $transportConfig = [ * 'grpc' => [...], - * 'rest' => [...] + * 'rest' => [...], * ]; * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. * } * * @throws ValidationException + * * @experimental */ public function __construct(array $options = []) @@ -275,66 +288,57 @@ public function __construct(array $options = []) * ``` * * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). + * * Example: `projects/my-project-123`. * @param array $optionalArgs { - * Optional. + * Optional. * * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse * * @throws ApiException if the remote call fails + * * @experimental */ public function deleteEvents($projectName, array $optionalArgs = []) { $request = new DeleteEventsRequest(); + $requestParamHeaders = []; $request->setProjectName($projectName); - - $requestParams = new RequestParamsHeaderDescriptor([ - 'project_name' => $request->getProjectName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->startCall( - 'DeleteEvents', - DeleteEventsResponse::class, - $optionalArgs, - $request - )->wait(); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEvents', DeleteEventsResponse::class, $optionalArgs, $request)->wait(); } /** - * Lists the specified groups. + * Lists the specified events. * * Sample code: * ``` * $errorStatsServiceClient = new ErrorStatsServiceClient(); * try { * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * $groupId = 'group_id'; * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); * foreach ($pagedResponse->iteratePages() as $page) { * foreach ($page as $element) { * // doSomethingWith($element); * } * } - * - * * // Alternatively: - * * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); * foreach ($pagedResponse->iterateAllElements() as $element) { * // doSomethingWith($element); * } @@ -343,134 +347,92 @@ public function deleteEvents($projectName, array $optionalArgs = []) * } * ``` * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as projects/ plus the - * Google Cloud - * Platform project ID. + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). * - * Example: projects/my-project-123. - * @param array $optionalArgs { - * Optional. + * Example: `projects/my-project-123`. + * @param string $groupId Required. The group for which events shall be returned. + * @param array $optionalArgs { + * Optional. * - * @type string[] $groupId - * Optional. List all ErrorGroupStats with these IDs. * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. * @type QueryTimeRange $timeRange - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * @type Duration $timedCountDuration - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} - * @type Timestamp $alignmentTime - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\ApiCore\PagedListResponse * * @throws ApiException if the remote call fails + * * @experimental */ - public function listGroupStats($projectName, array $optionalArgs = []) + public function listEvents($projectName, $groupId, array $optionalArgs = []) { - $request = new ListGroupStatsRequest(); + $request = new ListEventsRequest(); + $requestParamHeaders = []; $request->setProjectName($projectName); - if (isset($optionalArgs['groupId'])) { - $request->setGroupId($optionalArgs['groupId']); - } + $request->setGroupId($groupId); + $requestParamHeaders['project_name'] = $projectName; if (isset($optionalArgs['serviceFilter'])) { $request->setServiceFilter($optionalArgs['serviceFilter']); } + if (isset($optionalArgs['timeRange'])) { $request->setTimeRange($optionalArgs['timeRange']); } - if (isset($optionalArgs['timedCountDuration'])) { - $request->setTimedCountDuration($optionalArgs['timedCountDuration']); - } - if (isset($optionalArgs['alignment'])) { - $request->setAlignment($optionalArgs['alignment']); - } - if (isset($optionalArgs['alignmentTime'])) { - $request->setAlignmentTime($optionalArgs['alignmentTime']); - } - if (isset($optionalArgs['order'])) { - $request->setOrder($optionalArgs['order']); - } + if (isset($optionalArgs['pageSize'])) { $request->setPageSize($optionalArgs['pageSize']); } + if (isset($optionalArgs['pageToken'])) { $request->setPageToken($optionalArgs['pageToken']); } - $requestParams = new RequestParamsHeaderDescriptor([ - 'project_name' => $request->getProjectName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->getPagedListResponse( - 'ListGroupStats', - $optionalArgs, - ListGroupStatsResponse::class, - $request - ); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEvents', $optionalArgs, ListEventsResponse::class, $request); } /** - * Lists the specified events. + * Lists the specified groups. * * Sample code: * ``` * $errorStatsServiceClient = new ErrorStatsServiceClient(); * try { * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * $groupId = ''; * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); * foreach ($pagedResponse->iteratePages() as $page) { * foreach ($page as $element) { * // doSomethingWith($element); * } * } - * - * * // Alternatively: - * * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); * foreach ($pagedResponse->iterateAllElements() as $element) { * // doSomethingWith($element); * } @@ -480,73 +442,109 @@ public function listGroupStats($projectName, array $optionalArgs = []) * ``` * * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * @param string $groupId Required. The group for which events shall be returned. + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * + * Examples: `projects/my-project-123`, `projects/5551234`. * @param array $optionalArgs { - * Optional. + * Optional. * + * @type string[] $groupId + * Optional. List all ErrorGroupStats with these IDs. * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. * @type QueryTimeRange $timeRange - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * @type Duration $timedCountDuration + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} + * @type Timestamp $alignmentTime + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\ApiCore\PagedListResponse * * @throws ApiException if the remote call fails + * * @experimental */ - public function listEvents($projectName, $groupId, array $optionalArgs = []) + public function listGroupStats($projectName, array $optionalArgs = []) { - $request = new ListEventsRequest(); + $request = new ListGroupStatsRequest(); + $requestParamHeaders = []; $request->setProjectName($projectName); - $request->setGroupId($groupId); + $requestParamHeaders['project_name'] = $projectName; + if (isset($optionalArgs['groupId'])) { + $request->setGroupId($optionalArgs['groupId']); + } + if (isset($optionalArgs['serviceFilter'])) { $request->setServiceFilter($optionalArgs['serviceFilter']); } + if (isset($optionalArgs['timeRange'])) { $request->setTimeRange($optionalArgs['timeRange']); } + + if (isset($optionalArgs['timedCountDuration'])) { + $request->setTimedCountDuration($optionalArgs['timedCountDuration']); + } + + if (isset($optionalArgs['alignment'])) { + $request->setAlignment($optionalArgs['alignment']); + } + + if (isset($optionalArgs['alignmentTime'])) { + $request->setAlignmentTime($optionalArgs['alignmentTime']); + } + + if (isset($optionalArgs['order'])) { + $request->setOrder($optionalArgs['order']); + } + if (isset($optionalArgs['pageSize'])) { $request->setPageSize($optionalArgs['pageSize']); } + if (isset($optionalArgs['pageToken'])) { $request->setPageToken($optionalArgs['pageToken']); } - $requestParams = new RequestParamsHeaderDescriptor([ - 'project_name' => $request->getProjectName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->getPagedListResponse( - 'ListEvents', - $optionalArgs, - ListEventsResponse::class, - $request - ); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGroupStats', $optionalArgs, ListGroupStatsResponse::class, $request); } } diff --git a/ErrorReporting/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/ErrorReporting/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php index 0c79b7f8f107..09351fa42cb3 100644 --- a/ErrorReporting/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php +++ b/ErrorReporting/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -29,15 +29,16 @@ use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; + use Google\ApiCore\PathTemplate; use Google\ApiCore\RequestParamsHeaderDescriptor; use Google\ApiCore\RetrySettings; use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventRequest; use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse; -use Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent; /** * Service Description: An API for reporting error events. @@ -56,10 +57,10 @@ * } * ``` * - * Many parameters require resource names to be formatted in a particular way. To assist - * with these names, this class includes a format method for each type of name, and additionally - * a parseName method to extract the individual identifiers contained within formatted names - * that are returned by the API. + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. * * @experimental */ @@ -93,23 +94,25 @@ class ReportErrorsServiceGapicClient public static $serviceScopes = [ 'https://www.googleapis.com/auth/cloud-platform', ]; + private static $projectNameTemplate; + private static $pathTemplateMap; private static function getClientDefaults() { return [ 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__.'/../resources/report_errors_service_client_config.json', - 'descriptorsConfigPath' => __DIR__.'/../resources/report_errors_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__.'/../resources/report_errors_service_grpc_config.json', + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__.'/../resources/report_errors_service_rest_client_config.php', + 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', ], ], ]; @@ -117,7 +120,7 @@ private static function getClientDefaults() private static function getProjectNameTemplate() { - if (null == self::$projectNameTemplate) { + if (self::$projectNameTemplate == null) { self::$projectNameTemplate = new PathTemplate('projects/{project}'); } @@ -126,7 +129,7 @@ private static function getProjectNameTemplate() private static function getPathTemplateMap() { - if (null == self::$pathTemplateMap) { + if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'project' => self::getProjectNameTemplate(), ]; @@ -136,12 +139,13 @@ private static function getPathTemplateMap() } /** - * Formats a string containing the fully-qualified path to represent - * a project resource. + * Formats a string containing the fully-qualified path to represent a project + * resource. * * @param string $project * * @return string The formatted project resource. + * * @experimental */ public static function projectName($project) @@ -155,12 +159,13 @@ public static function projectName($project) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern - * - project: projects/{project}. + * - project: projects/{project} * - * The optional $template argument can be supplied to specify a particular pattern, and must - * match one of the templates listed above. If no $template argument is provided, or if the - * $template argument does not match one of the templates listed, then parseName will check - * each of the supported templates, and return the first match. + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. * * @param string $formattedName The formatted name string * @param string $template Optional name of template to match @@ -168,12 +173,12 @@ public static function projectName($project) * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. + * * @experimental */ public static function parseName($formattedName, $template = null) { $templateMap = self::getPathTemplateMap(); - if ($template) { if (!isset($templateMap[$template])) { throw new ValidationException("Template name $template does not exist"); @@ -189,6 +194,7 @@ public static function parseName($formattedName, $template = null) // Swallow the exception to continue trying other path templates } } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); } @@ -196,7 +202,7 @@ public static function parseName($formattedName, $template = null) * Constructor. * * @param array $options { - * Optional. Options for configuring the service API wrapper. + * Optional. Options for configuring the service API wrapper. * * @type string $serviceAddress * **Deprecated**. This option will be removed in a future major release. Please @@ -213,38 +219,42 @@ public static function parseName($formattedName, $template = null) * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these * objects are provided, any settings in $credentialsConfig will be ignored. * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the client. - * For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . * @type bool $disableRetries * Determines whether or not retries defined by the client configuration should be * disabled. Defaults to `false`. * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either a - * path to a JSON file, or a PHP array containing the decoded JSON data. - * By default this settings points to the default client config file, which is provided - * in the resources folder. + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string `rest` - * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already instantiated - * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this - * object is provided, any settings in $transportConfig, and any `$apiEndpoint` - * setting, will be ignored. + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $serviceAddress setting, will be ignored. * @type array $transportConfig * Configuration options that will be used to construct the transport. Options for * each supported transport type should be passed in a key for that transport. For * example: * $transportConfig = [ * 'grpc' => [...], - * 'rest' => [...] + * 'rest' => [...], * ]; * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. * } * * @throws ValidationException + * * @experimental */ public function __construct(array $options = []) @@ -254,7 +264,7 @@ public function __construct(array $options = []) } /** - * Report an individual error event. + * Report an individual error event and record the event to a log. * * This endpoint accepts **either** an OAuth token, * **or** an [API key](https://support.google.com/cloud/answer/6158862) @@ -262,7 +272,15 @@ public function __construct(array $options = []) * a `key` parameter. For example: * * `POST - * https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456` + * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` + * + * **Note:** [Error Reporting](https://cloud.google.com/error-reporting) is a global service built + * on Cloud Logging and doesn't analyze logs stored + * in regional log buckets or logs routed to other Google Cloud projects. + * + * For more information, see + * [Using Error Reporting with regionalized + * logs](https://cloud.google.com/error-reporting/docs/regionalization). * * Sample code: * ``` @@ -277,44 +295,37 @@ public function __construct(array $options = []) * ``` * * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectId}`, where `{projectId}` is the * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). Example: - * `projects/my-project-123`. + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: // `projects/my-project-123`. * @param ReportedErrorEvent $event Required. The error event to be reported. * @param array $optionalArgs { - * Optional. + * Optional. * * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array - * of retry settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry + * settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. * } * * @return \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse * * @throws ApiException if the remote call fails + * * @experimental */ public function reportErrorEvent($projectName, $event, array $optionalArgs = []) { $request = new ReportErrorEventRequest(); + $requestParamHeaders = []; $request->setProjectName($projectName); $request->setEvent($event); - - $requestParams = new RequestParamsHeaderDescriptor([ - 'project_name' => $request->getProjectName(), - ]); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - - return $this->startCall( - 'ReportErrorEvent', - ReportErrorEventResponse::class, - $optionalArgs, - $request - )->wait(); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReportErrorEvent', ReportErrorEventResponse::class, $optionalArgs, $request)->wait(); } } diff --git a/ErrorReporting/src/V1beta1/GetGroupRequest.php b/ErrorReporting/src/V1beta1/GetGroupRequest.php index 0a211b05ae0f..ff1cd7cd9f32 100644 --- a/ErrorReporting/src/V1beta1/GetGroupRequest.php +++ b/ErrorReporting/src/V1beta1/GetGroupRequest.php @@ -16,7 +16,7 @@ class GetGroupRequest extends \Google\Protobuf\Internal\Message { /** - * The group resource name. Written as + * Required. The group resource name. Written as * `projects/{projectID}/groups/{group_name}`. Call * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) * to return a list of groups belonging to this project. @@ -33,7 +33,7 @@ class GetGroupRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $group_name - * The group resource name. Written as + * Required. The group resource name. Written as * `projects/{projectID}/groups/{group_name}`. Call * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) * to return a list of groups belonging to this project. @@ -46,7 +46,7 @@ public function __construct($data = NULL) { } /** - * The group resource name. Written as + * Required. The group resource name. Written as * `projects/{projectID}/groups/{group_name}`. Call * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) * to return a list of groups belonging to this project. @@ -61,7 +61,7 @@ public function getGroupName() } /** - * The group resource name. Written as + * Required. The group resource name. Written as * `projects/{projectID}/groups/{group_name}`. Call * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) * to return a list of groups belonging to this project. diff --git a/ErrorReporting/src/V1beta1/ListEventsRequest.php b/ErrorReporting/src/V1beta1/ListEventsRequest.php index a0bc89136e48..8cfb0d4c9725 100644 --- a/ErrorReporting/src/V1beta1/ListEventsRequest.php +++ b/ErrorReporting/src/V1beta1/ListEventsRequest.php @@ -17,7 +17,7 @@ class ListEventsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -68,7 +68,7 @@ class ListEventsRequest extends \Google\Protobuf\Internal\Message * * @type string $project_name * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -95,7 +95,7 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -110,7 +110,7 @@ public function getProjectName() /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectID}`, where `{projectID}` is the * [Google Cloud Platform project * ID](https://support.google.com/cloud/answer/6158840). * Example: `projects/my-project-123`. @@ -159,11 +159,11 @@ public function setGroupId($var) * Data for all service contexts is returned if this field is not specified. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null */ public function getServiceFilter() { - return isset($this->service_filter) ? $this->service_filter : null; + return $this->service_filter; } public function hasServiceFilter() @@ -199,11 +199,11 @@ public function setServiceFilter($var) * in the response will specify the beginning of this time range. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null */ public function getTimeRange() { - return isset($this->time_range) ? $this->time_range : null; + return $this->time_range; } public function hasTimeRange() diff --git a/ErrorReporting/src/V1beta1/ListEventsResponse.php b/ErrorReporting/src/V1beta1/ListEventsResponse.php index bfdb73f74d41..f57645164dcf 100644 --- a/ErrorReporting/src/V1beta1/ListEventsResponse.php +++ b/ErrorReporting/src/V1beta1/ListEventsResponse.php @@ -117,11 +117,11 @@ public function setNextPageToken($var) * The timestamp specifies the start time to which the request was restricted. * * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getTimeRangeBegin() { - return isset($this->time_range_begin) ? $this->time_range_begin : null; + return $this->time_range_begin; } public function hasTimeRangeBegin() diff --git a/ErrorReporting/src/V1beta1/ListGroupStatsRequest.php b/ErrorReporting/src/V1beta1/ListGroupStatsRequest.php index 4dc10076b409..247c1c100bd1 100644 --- a/ErrorReporting/src/V1beta1/ListGroupStatsRequest.php +++ b/ErrorReporting/src/V1beta1/ListGroupStatsRequest.php @@ -17,10 +17,10 @@ class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the Google Cloud Platform project. Written - * as projects/ plus the - * Google Cloud - * Platform project ID. - * Example: projects/my-project-123. + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -104,10 +104,10 @@ class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message * * @type string $project_name * Required. The resource name of the Google Cloud Platform project. Written - * as projects/ plus the - * Google Cloud - * Platform project ID. - * Example: projects/my-project-123. + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. * @type string[]|\Google\Protobuf\Internal\RepeatedField $group_id * Optional. List all ErrorGroupStats with these IDs. * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter @@ -151,10 +151,10 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Google Cloud Platform project. Written - * as projects/ plus the - * Google Cloud - * Platform project ID. - * Example: projects/my-project-123. + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -166,10 +166,10 @@ public function getProjectName() /** * Required. The resource name of the Google Cloud Platform project. Written - * as projects/ plus the - * Google Cloud - * Platform project ID. - * Example: projects/my-project-123. + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -215,11 +215,11 @@ public function setGroupId($var) * Data for all service contexts is returned if this field is not specified. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null */ public function getServiceFilter() { - return isset($this->service_filter) ? $this->service_filter : null; + return $this->service_filter; } public function hasServiceFilter() @@ -260,11 +260,11 @@ public function setServiceFilter($var) * ErrorGroupStats with zero occurrences are returned. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null */ public function getTimeRange() { - return isset($this->time_range) ? $this->time_range : null; + return $this->time_range; } public function hasTimeRange() @@ -304,11 +304,11 @@ public function setTimeRange($var) * If not set, no timed counts are returned. * * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration + * @return \Google\Protobuf\Duration|null */ public function getTimedCountDuration() { - return isset($this->timed_count_duration) ? $this->timed_count_duration : null; + return $this->timed_count_duration; } public function hasTimedCountDuration() @@ -370,11 +370,11 @@ public function setAlignment($var) * alignment is chosen. Default is 00:00 UTC. * * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getAlignmentTime() { - return isset($this->alignment_time) ? $this->alignment_time : null; + return $this->alignment_time; } public function hasAlignmentTime() diff --git a/ErrorReporting/src/V1beta1/ListGroupStatsResponse.php b/ErrorReporting/src/V1beta1/ListGroupStatsResponse.php index af3990345a47..06c7bb67a3f5 100644 --- a/ErrorReporting/src/V1beta1/ListGroupStatsResponse.php +++ b/ErrorReporting/src/V1beta1/ListGroupStatsResponse.php @@ -126,11 +126,11 @@ public function setNextPageToken($var) * has been deleted. * * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getTimeRangeBegin() { - return isset($this->time_range_begin) ? $this->time_range_begin : null; + return $this->time_range_begin; } public function hasTimeRangeBegin() diff --git a/ErrorReporting/src/V1beta1/ReportErrorEventRequest.php b/ErrorReporting/src/V1beta1/ReportErrorEventRequest.php index 903ee9a1ecc4..8de6dc3a08f9 100644 --- a/ErrorReporting/src/V1beta1/ReportErrorEventRequest.php +++ b/ErrorReporting/src/V1beta1/ReportErrorEventRequest.php @@ -17,10 +17,10 @@ class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectId}`, where `{projectId}` is the * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). Example: - * `projects/my-project-123`. + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -40,10 +40,10 @@ class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message * * @type string $project_name * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectId}`, where `{projectId}` is the * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). Example: - * `projects/my-project-123`. + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event * Required. The error event to be reported. * } @@ -55,10 +55,10 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectId}`, where `{projectId}` is the * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). Example: - * `projects/my-project-123`. + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -70,10 +70,10 @@ public function getProjectName() /** * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/` plus the + * as `projects/{projectId}`, where `{projectId}` is the * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). Example: - * `projects/my-project-123`. + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. * * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -91,11 +91,11 @@ public function setProjectName($var) * Required. The error event to be reported. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null */ public function getEvent() { - return isset($this->event) ? $this->event : null; + return $this->event; } public function hasEvent() diff --git a/ErrorReporting/src/V1beta1/ReportErrorsServiceClient.php b/ErrorReporting/src/V1beta1/ReportErrorsServiceClient.php index e0d5d4e897c1..9b3a67581c71 100644 --- a/ErrorReporting/src/V1beta1/ReportErrorsServiceClient.php +++ b/ErrorReporting/src/V1beta1/ReportErrorsServiceClient.php @@ -17,9 +17,9 @@ /* * GENERATED CODE WARNING - * This file was generated from the file - * https://github.com/google/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto - * and updates to that file get reflected here through a refresh process. + * Generated by gapic-generator-php from the file + * https://github.com/googleapis/googleapis/blob/master/google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto + * Updates to the above are reflected here through a refresh process. * * @experimental */ @@ -28,11 +28,9 @@ use Google\Cloud\ErrorReporting\V1beta1\Gapic\ReportErrorsServiceGapicClient; -/** - * {@inheritdoc} - */ +/** {@inheritdoc} */ class ReportErrorsServiceClient extends ReportErrorsServiceGapicClient { - // This class is intentionally empty, and is intended to hold manual - // additions to the generated {@see ReportErrorsServiceGapicClient} class. + // This class is intentionally empty, and is intended to hold manual additions to + // the generated {@see ReportErrorsServiceGapicClient} class. } diff --git a/ErrorReporting/src/V1beta1/ReportErrorsServiceGrpcClient.php b/ErrorReporting/src/V1beta1/ReportErrorsServiceGrpcClient.php index ae0957983d5f..f29acd0d28ad 100644 --- a/ErrorReporting/src/V1beta1/ReportErrorsServiceGrpcClient.php +++ b/ErrorReporting/src/V1beta1/ReportErrorsServiceGrpcClient.php @@ -2,7 +2,7 @@ // GENERATED CODE -- DO NOT EDIT! // Original file comments: -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// namespace Google\Cloud\ErrorReporting\V1beta1; /** @@ -34,7 +33,7 @@ public function __construct($hostname, $opts, $channel = null) { } /** - * Report an individual error event. + * Report an individual error event and record the event to a log. * * This endpoint accepts **either** an OAuth token, * **or** an [API key](https://support.google.com/cloud/answer/6158862) @@ -42,7 +41,15 @@ public function __construct($hostname, $opts, $channel = null) { * a `key` parameter. For example: * * `POST - * https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456` + * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` + * + * **Note:** [Error Reporting](https://cloud.google.com/error-reporting) is a global service built + * on Cloud Logging and doesn't analyze logs stored + * in regional log buckets or logs routed to other Google Cloud projects. + * + * For more information, see + * [Using Error Reporting with regionalized + * logs](https://cloud.google.com/error-reporting/docs/regionalization). * @param \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventRequest $argument input argument * @param array $metadata metadata * @param array $options call options diff --git a/ErrorReporting/src/V1beta1/ReportedErrorEvent.php b/ErrorReporting/src/V1beta1/ReportedErrorEvent.php index 2d56e3262104..7f04857ddc66 100644 --- a/ErrorReporting/src/V1beta1/ReportedErrorEvent.php +++ b/ErrorReporting/src/V1beta1/ReportedErrorEvent.php @@ -115,11 +115,11 @@ public function __construct($data = NULL) { * Error Reporting system will be used. * * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getEventTime() { - return isset($this->event_time) ? $this->event_time : null; + return $this->event_time; } public function hasEventTime() @@ -153,11 +153,11 @@ public function setEventTime($var) * Required. The service context in which this error has occurred. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null */ public function getServiceContext() { - return isset($this->service_context) ? $this->service_context : null; + return $this->service_context; } public function hasServiceContext() @@ -259,11 +259,11 @@ public function setMessage($var) * Optional. A description of the context in which the error occurred. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null */ public function getContext() { - return isset($this->context) ? $this->context : null; + return $this->context; } public function hasContext() diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/ErrorReporting/src/V1beta1/ResolutionStatus.php similarity index 100% rename from owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php rename to ErrorReporting/src/V1beta1/ResolutionStatus.php diff --git a/ErrorReporting/src/V1beta1/TimedCount.php b/ErrorReporting/src/V1beta1/TimedCount.php index 852b13da2b5b..e0a3875fd5a5 100644 --- a/ErrorReporting/src/V1beta1/TimedCount.php +++ b/ErrorReporting/src/V1beta1/TimedCount.php @@ -85,11 +85,11 @@ public function setCount($var) * Start of the time period to which `count` refers (included). * * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getStartTime() { - return isset($this->start_time) ? $this->start_time : null; + return $this->start_time; } public function hasStartTime() @@ -121,11 +121,11 @@ public function setStartTime($var) * End of the time period to which `count` refers (excluded). * * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @return \Google\Protobuf\Timestamp + * @return \Google\Protobuf\Timestamp|null */ public function getEndTime() { - return isset($this->end_time) ? $this->end_time : null; + return $this->end_time; } public function hasEndTime() diff --git a/ErrorReporting/src/V1beta1/UpdateGroupRequest.php b/ErrorReporting/src/V1beta1/UpdateGroupRequest.php index bcb5ee437bfa..7863ea9d1138 100644 --- a/ErrorReporting/src/V1beta1/UpdateGroupRequest.php +++ b/ErrorReporting/src/V1beta1/UpdateGroupRequest.php @@ -41,11 +41,11 @@ public function __construct($data = NULL) { * Required. The group which replaces the resource on the server. * * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null */ public function getGroup() { - return isset($this->group) ? $this->group : null; + return $this->group; } public function hasGroup() diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json b/ErrorReporting/src/V1beta1/gapic_metadata.json similarity index 100% rename from owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json rename to ErrorReporting/src/V1beta1/gapic_metadata.json diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_client_config.json b/ErrorReporting/src/V1beta1/resources/error_group_service_client_config.json index 8799b344139c..40af7ebab8d5 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_client_config.json +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_client_config.json @@ -1,45 +1,45 @@ { - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService": { - "retry_codes": { - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "no_retry_codes": [] - }, - "retry_params": { - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetGroup": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGroup": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } } - }, - "methods": { - "UpdateGroup": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGroup": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } } - } } diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php index 3a89cb7b4ca8..2e9c68889066 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php @@ -2,7 +2,6 @@ return [ 'interfaces' => [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ - ], + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [], ], ]; diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php index 5813382303e8..8660657af11a 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -3,6 +3,17 @@ return [ 'interfaces' => [ 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', + 'placeholders' => [ + 'group_name' => [ + 'getters' => [ + 'getGroupName', + ], + ], + ], + ], 'UpdateGroup' => [ 'method' => 'put', 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', @@ -16,17 +27,6 @@ ], ], ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', - 'placeholders' => [ - 'group_name' => [ - 'getters' => [ - 'getGroupName', - ], - ], - ], - ], ], ], ]; diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_client_config.json b/ErrorReporting/src/V1beta1/resources/error_stats_service_client_config.json index 7c848682a0ff..0a7501188091 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_client_config.json +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_client_config.json @@ -1,50 +1,50 @@ { - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { - "retry_codes": { - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "no_retry_codes": [] - }, - "retry_params": { - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "DeleteEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroupStats": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } } - }, - "methods": { - "DeleteEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroupStats": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } } - } } diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php index 3e892a7ac884..35148865a5eb 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php @@ -3,24 +3,24 @@ return [ 'interfaces' => [ 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'ListGroupStats' => [ + 'ListEvents' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', 'requestPageTokenSetMethod' => 'setPageToken', 'requestPageSizeGetMethod' => 'getPageSize', 'requestPageSizeSetMethod' => 'setPageSize', 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorGroupStats', + 'resourcesGetMethod' => 'getErrorEvents', ], ], - 'ListEvents' => [ + 'ListGroupStats' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', 'requestPageTokenSetMethod' => 'setPageToken', 'requestPageSizeGetMethod' => 'getPageSize', 'requestPageSizeSetMethod' => 'setPageSize', 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorEvents', + 'resourcesGetMethod' => 'getErrorGroupStats', ], ], ], diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php index 7be9586f8a7d..57064b872a4e 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -14,9 +14,9 @@ ], ], ], - 'ListGroupStats' => [ + 'ListEvents' => [ 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', 'placeholders' => [ 'project_name' => [ 'getters' => [ @@ -24,10 +24,13 @@ ], ], ], + 'queryParams' => [ + 'group_id', + ], ], - 'ListEvents' => [ + 'ListGroupStats' => [ 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', 'placeholders' => [ 'project_name' => [ 'getters' => [ diff --git a/ErrorReporting/src/V1beta1/resources/report_errors_service_client_config.json b/ErrorReporting/src/V1beta1/resources/report_errors_service_client_config.json index 55b9ca628b6c..701d5afb9615 100644 --- a/ErrorReporting/src/V1beta1/resources/report_errors_service_client_config.json +++ b/ErrorReporting/src/V1beta1/resources/report_errors_service_client_config.json @@ -1,37 +1,37 @@ { - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ReportErrorEvent": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } } - }, - "methods": { - "ReportErrorEvent": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } } - } } diff --git a/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php index f24982788ee1..52aefb0c1051 100644 --- a/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php @@ -2,7 +2,6 @@ return [ 'interfaces' => [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ - ], + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [], ], ]; diff --git a/ErrorReporting/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php b/ErrorReporting/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php index 45c745c160dc..e945dcc4cdab 100644 --- a/ErrorReporting/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php +++ b/ErrorReporting/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php @@ -22,18 +22,19 @@ namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; -use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupServiceClient; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; + use Google\ApiCore\Testing\MockTransport; use Google\Cloud\ErrorReporting\V1beta1\ErrorGroup; -use Google\Protobuf\Any; +use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupServiceClient; use Google\Rpc\Code; use stdClass; /** * @group errorreporting + * * @group gapic */ class ErrorGroupServiceClientTest extends GeneratedTest @@ -51,9 +52,7 @@ private function createTransport($deserialize = null) */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class) - ->disableOriginalConstructor() - ->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } /** @@ -64,20 +63,19 @@ private function createClient(array $options = []) $options += [ 'credentials' => $this->createCredentials(), ]; - return new ErrorGroupServiceClient($options); } /** * @test */ - public function updateGroupTest() + public function getGroupTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $name = 'name3373707'; $groupId = 'groupId506361563'; @@ -85,59 +83,50 @@ public function updateGroupTest() $expectedResponse->setName($name); $expectedResponse->setGroupId($groupId); $transport->addResponse($expectedResponse); - // Mock request - $group = new ErrorGroup(); - - $response = $client->updateGroup($group); + $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); + $response = $client->getGroup($formattedGroupName); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); - - $actualValue = $actualRequestObject->getGroup(); - - $this->assertProtobufEquals($group, $actualValue); - + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroupName(); + $this->assertProtobufEquals($formattedGroupName, $actualValue); $this->assertTrue($transport->isExhausted()); } /** * @test */ - public function updateGroupExceptionTest() + public function getGroupExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request - $group = new ErrorGroup(); - + $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); try { - $client->updateGroup($group); + $client->getGroup($formattedGroupName); // If the $client method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); @@ -146,13 +135,13 @@ public function updateGroupExceptionTest() /** * @test */ - public function getGroupTest() + public function updateGroupTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $name = 'name3373707'; $groupId = 'groupId506361563'; @@ -160,59 +149,50 @@ public function getGroupTest() $expectedResponse->setName($name); $expectedResponse->setGroupId($groupId); $transport->addResponse($expectedResponse); - // Mock request - $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); - - $response = $client->getGroup($formattedGroupName); + $group = new ErrorGroup(); + $response = $client->updateGroup($group); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); - - $actualValue = $actualRequestObject->getGroupName(); - - $this->assertProtobufEquals($formattedGroupName, $actualValue); - + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); $this->assertTrue($transport->isExhausted()); } /** * @test */ - public function getGroupExceptionTest() + public function updateGroupExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request - $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); - + $group = new ErrorGroup(); try { - $client->getGroup($formattedGroupName); + $client->updateGroup($group); // If the $client method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); diff --git a/ErrorReporting/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php b/ErrorReporting/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php index 0f1e4238ddfc..7d3c9f890b9f 100644 --- a/ErrorReporting/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php +++ b/ErrorReporting/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php @@ -22,22 +22,23 @@ namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; -use Google\Cloud\ErrorReporting\V1beta1\ErrorStatsServiceClient; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; + use Google\ApiCore\Testing\MockTransport; use Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse; use Google\Cloud\ErrorReporting\V1beta1\ErrorEvent; use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats; +use Google\Cloud\ErrorReporting\V1beta1\ErrorStatsServiceClient; use Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse; use Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse; -use Google\Protobuf\Any; use Google\Rpc\Code; use stdClass; /** * @group errorreporting + * * @group gapic */ class ErrorStatsServiceClientTest extends GeneratedTest @@ -55,9 +56,7 @@ private function createTransport($deserialize = null) */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class) - ->disableOriginalConstructor() - ->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } /** @@ -68,7 +67,6 @@ private function createClient(array $options = []) $options += [ 'credentials' => $this->createCredentials(), ]; - return new ErrorStatsServiceClient($options); } @@ -78,17 +76,15 @@ private function createClient(array $options = []) public function deleteEventsTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $expectedResponse = new DeleteEventsResponse(); $transport->addResponse($expectedResponse); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - $response = $client->deleteEvents($formattedProjectName); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -96,11 +92,8 @@ public function deleteEventsTest() $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); } @@ -110,25 +103,22 @@ public function deleteEventsTest() public function deleteEventsExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - try { $client->deleteEvents($formattedProjectName); // If the $client method call did not throw, fail the test @@ -137,7 +127,6 @@ public function deleteEventsExceptionTest() $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); @@ -146,77 +135,74 @@ public function deleteEventsExceptionTest() /** * @test */ - public function listGroupStatsTest() + public function listEventsTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $nextPageToken = ''; - $errorGroupStatsElement = new ErrorGroupStats(); - $errorGroupStats = [$errorGroupStatsElement]; - $expectedResponse = new ListGroupStatsResponse(); + $errorEventsElement = new ErrorEvent(); + $errorEvents = [ + $errorEventsElement, + ]; + $expectedResponse = new ListEventsResponse(); $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorGroupStats($errorGroupStats); + $expectedResponse->setErrorEvents($errorEvents); $transport->addResponse($expectedResponse); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - - $response = $client->listGroupStats($formattedProjectName); + $groupId = 'groupId506361563'; + $response = $client->listEvents($formattedProjectName, $groupId); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); - + $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); - + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); $this->assertTrue($transport->isExhausted()); } /** * @test */ - public function listGroupStatsExceptionTest() + public function listEventsExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - + $groupId = 'groupId506361563'; try { - $client->listGroupStats($formattedProjectName); + $client->listEvents($formattedProjectName, $groupId); // If the $client method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); @@ -225,82 +211,70 @@ public function listGroupStatsExceptionTest() /** * @test */ - public function listEventsTest() + public function listGroupStatsTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $nextPageToken = ''; - $errorEventsElement = new ErrorEvent(); - $errorEvents = [$errorEventsElement]; - $expectedResponse = new ListEventsResponse(); + $errorGroupStatsElement = new ErrorGroupStats(); + $errorGroupStats = [ + $errorGroupStatsElement, + ]; + $expectedResponse = new ListGroupStatsResponse(); $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorEvents($errorEvents); + $expectedResponse->setErrorGroupStats($errorGroupStats); $transport->addResponse($expectedResponse); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - - $response = $client->listEvents($formattedProjectName, $groupId); + $response = $client->listGroupStats($formattedProjectName); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); - + $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); - + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getGroupId(); - - $this->assertProtobufEquals($groupId, $actualValue); $this->assertTrue($transport->isExhausted()); } /** * @test */ - public function listEventsExceptionTest() + public function listGroupStatsExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - try { - $client->listEvents($formattedProjectName, $groupId); + $client->listGroupStats($formattedProjectName); // If the $client method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); diff --git a/ErrorReporting/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php b/ErrorReporting/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php index 24761374fc65..136f0c9cc58e 100644 --- a/ErrorReporting/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php +++ b/ErrorReporting/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php @@ -22,19 +22,21 @@ namespace Google\Cloud\ErrorReporting\Tests\Unit\V1beta1; -use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; + use Google\ApiCore\Testing\MockTransport; -use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse; use Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent; -use Google\Protobuf\Any; +use Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse; +use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; +use Google\Cloud\ErrorReporting\V1beta1\ServiceContext; use Google\Rpc\Code; use stdClass; /** * @group errorreporting + * * @group gapic */ class ReportErrorsServiceClientTest extends GeneratedTest @@ -52,9 +54,7 @@ private function createTransport($deserialize = null) */ private function createCredentials() { - return $this->getMockBuilder(CredentialsWrapper::class) - ->disableOriginalConstructor() - ->getMock(); + return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } /** @@ -65,7 +65,6 @@ private function createClient(array $options = []) $options += [ 'credentials' => $this->createCredentials(), ]; - return new ReportErrorsServiceClient($options); } @@ -75,18 +74,20 @@ private function createClient(array $options = []) public function reportErrorEventTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - // Mock response $expectedResponse = new ReportErrorEventResponse(); $transport->addResponse($expectedResponse); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); $event = new ReportedErrorEvent(); - + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); $response = $client->reportErrorEvent($formattedProjectName, $event); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -94,14 +95,10 @@ public function reportErrorEventTest() $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $this->assertTrue($transport->isExhausted()); } @@ -111,26 +108,27 @@ public function reportErrorEventTest() public function reportErrorEventExceptionTest() { $transport = $this->createTransport(); - $client = $this->createClient(['transport' => $transport]); - + $client = $this->createClient([ + 'transport' => $transport, + ]); $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); $status->code = Code::DATA_LOSS; $status->details = 'internal error'; - - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); - // Mock request $formattedProjectName = $client->projectName('[PROJECT]'); $event = new ReportedErrorEvent(); - + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); try { $client->reportErrorEvent($formattedProjectName, $event); // If the $client method call did not throw, fail the test @@ -139,7 +137,6 @@ public function reportErrorEventExceptionTest() $this->assertEquals($status->code, $ex->getCode()); $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); } - // Call popReceivedCalls to ensure the stub is exhausted $transport->popReceivedCalls(); $this->assertTrue($transport->isExhausted()); diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php deleted file mode 100644 index 388a6289009cf95b037332cddfd0e9050ff8701c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2399 zcmbVOUvJ|?5GU!MYbUw3XF!UoBDT2`mjljL%L}-aQ`+W2pw~oAav)@3InE~a;dsq@ zU2&ZH&PU)g@W{7-k8%>?l}BdR>$JTFsUa_MoSEOw{N^_^`}vdjEQb4}Nh8WVL5F1U zl87@(V$KBfSx5%yXhb>j*(44^%1uI!+T^6&BaNe0ZyQ|`mU5rkWX#w&q}Gt03&z64 z@>NBpgP|upr>XFqBaP=A z-o$gB?;J?HJpe!Sl7t*8TzCZpKXEz;1D_v8F^ts(e(L7L0e$)V9Y|ObM26 zYLE1>5-u2#S{9>i-w1M_2%gfbrxU`dNO`oU;+6mx(}iaagfPB^dmJks zrjmbGYAa1DOL*Se?*3e`Qa2e&SAp35*Y#6)Jd3_8TI3`#vAL})6l^1tFQ_jP>y>`G zuoMgULVaIUx8Uye3`($&@-Snq`gcK7+Bm0?FiZd{A6!`&Wm4MR%+t!NW=?f$^k6-q z{5ob(wPeO5D+TF{YZlepcn_(Pg5XL&(!Ny3uF~x$(+I|Iha(GE~Y4@|a;1yvS zyxM}bo5$%Sv~ckJbIKDeus;7?xGRe;XR#|@#ayKfbvyrqYvdXA!3))A5m>W z6ZmAVV829w)675T1BISqggQFpJRACM$b2;hRFrdbuF^Ty5Y=A_V9Ypr4VEWVoUx(q zGA*90!3+Qymy3mpgr*AHkW*Z09OG3i8C&oUk{9E&qPkyDD?_T9X34k*tDH`lpl%RX zmKCjStkAXKq|pcmmm7QHOb7Bdl)@mQZj??2nwlj8>y)n-SB(Z0!G|wk>=;-yAoNn)qK4 zXU~dqe~!Nvj8#~A*6-ot;=!*)kQ;cOk{^_^)!LD}u2cB#dp(`TEcBwW$@thpf>rlf zm!sfTmw~+*internalAddGeneratedFile( - ' -ð -Egoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.proto"\\ -GetGroupRequestI - -group_name ( B5àAúA/ --clouderrorreporting.googleapis.com/ErrorGroup"a -UpdateGroupRequestK -group ( 27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupBàA2û -ErrorGroupServiceÁ -GetGroup<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup">‚Óä“+)/v1beta1/{group_name=projects/*/groups/*}ÚA -group_nameÉ - UpdateGroup?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"@‚Óä“2)/v1beta1/{group.name=projects/*/groups/*}:groupÚAgroupVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB£ -/com.google.devtools.clouderrorreporting.v1beta1BErrorGroupServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php deleted file mode 100644 index fdd537f4a0dc755436c095b08343d5715e162542..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5156 zcmcgwOK%%h6vlRwHm9lU+~(ni*VHXEec3cc6uHldJqZzM?Al2S$m%e$ublyVW|+B7 zDODr{5*wB*S+ZlvFJRpz2nkgzxp~_c4wq2~k|NbW`WfJ>NZ#?|k=h^@g|Z z!AWg_I@GrqZD?x`G`3DP&v%(yciY-px7nn=R(Cs|-KKt4(~2c+xwN7g#l@8qXd1X( zzfSX7%XM3AnrqMv=DO`5S8u!B2K9Z{_o?Ul%ywG2jf-oPSr>C+*bJD(0yCighFzyw zu_AzDb!gyOb*e3t=WgNbhQ+Mff&i}-6?m<%6TEik;v5IR0#I*TL7*9Y?J8fRDwlwV zpy5BSyVkbr8ebj%J7ou^?byt=+V&S1|23^?wF8PMJLfjLPMz7Vqj7_hQ>Qa$G>OUQ zp7Jnmv=5yv^AuwGYKsn|zGJn~{h;pK9&`ONPR-|Al=TwNM`q5bWjUPP)MliQ`TPzi zuW8Kh(*D&o&8MvEJ6D9?9ALBetF}ujb1Sec)QyQ4qdoz zE5_)JMvox#*nTs;lJWwdhVL~no=e}6a}p*Swr_Tq_RXsHot{!_TAqz<&Z!`~cl!0d z4^3Wgb4?XoO*q~+!BqHh|6swA&~Y=>)EEcve?9`>IG* zDO|xt;(X4KDhMR;R{(gprf)ednjR9^R|dkq-KG8m&f5xykf>K-oTE0(y4!V_874eE zEbxzq_+iGgVaG`84`2kN8GWRrWC zJ|sMv4&i$qaR||f(y$Ceu8-SQdPKN$HJraMcf?L3$W!7N5^)knJmiBJ;I@)JjHp9$ zd|N;c2FRxD7q&>Zow#bU-2_Q*Lki6TbnaPl8jt}qfOfn7#>!r zBY7n|X^&)(SxDkJq~At%$6hvfV5}FFl7#>}ggZZ2(?$h>yb2Rew`1=N|3}u z8VVUUB<^e*RJ6gM2@{n!HV`B80H7~@z0z^{Opq)9GT3J_k-VIHvWlFCL)2-=*-{+$ zNMYuWIE?W&5{?8fT*y`X#{Xv_m%TU`Cw3F^h)QvO?y6E;qm@ei6a&(qUZqgja8jWt zuYV{`gEib1f1bB4{S|{`G~h#J3WzE@hUq+*0XQVqQ$hN`JJNx^7uT2cQnm53PLHH`OD z2l@;zy=CI8YHBER55}XdFV6yG91bcy5&EePA2_;!(uqe|p_^)S8jgf#8k0Tns1SZt z{*U2Uk+vzLFRHyVlQ14#K{D)Y7mjU7N^jdIZ@>woQYlr;LTPn*#nhJ;7nW}s_$!+C zmtkt_lW}`hUotCbP{g9d$TUoD|ERB+#&R(gKfBq#qlxXEAl3pJm(5b8XjHZ>lmw8T z6pd;@R(DCSu9#KBST@C&sBWQR=qpB1jwF!p$MpGmqrit&t45_NKOC6-b{NJ)Ux>|A zm6kk3K1YuVWHA0ljg?4F7Y6Eq?HIC7nbKFk{`p-zM=tbk`w#n%(AU%-LGJ8kP813MX^>hz6gwpRfziU7}%Gy4cos^MdOA`+ZD#n}z= zTMS0~$xa442KSqWH5}~T5JgY{-jo5J9VEcWHEH_JBR#X*1u}Xy`bE#KGv)>PT<-q; z`>HIxdy~~=>+%kG!E0Nr>H3|yAL5Y1JJlc+oSWRyK4tzeQ;vOfPr8F>ZM@lJUB8uU zQ3or<+}xI@`+Cv3vP-mo$6`OmPcDd;t89TkSY?GPmGC(%t6r=gg|lk%U8`1$&a2_m zmUuUN8h=y5internalAddGeneratedFile( - ' -¤ -Ggoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.protogoogle/protobuf/timestamp.proto"¹ -ReportErrorEventRequestI - project_name ( B3àAúA- -+cloudresourcemanager.googleapis.com/ProjectS -event ( 2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventBàA" -ReportErrorEventResponse"‹ -ReportedErrorEvent3 - -event_time ( 2.google.protobuf.TimestampBàAY -service_context ( 2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextBàA -message ( BàAO -context ( 29.google.devtools.clouderrorreporting.v1beta1.ErrorContextBàA2å -ReportErrorsServiceõ -ReportErrorEventD.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequestE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"T‚Óä“9"0/v1beta1/{project_name=projects/*}/events:report:eventÚAproject_name,eventVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¥ -/com.google.devtools.clouderrorreporting.v1beta1BReportErrorsServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php deleted file mode 100644 index e92e678b6697..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest - */ -class DeleteEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php deleted file mode 100644 index 53e2ba2358d4..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse - */ -class DeleteEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php deleted file mode 100644 index 1c5566968212..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php +++ /dev/null @@ -1,206 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorContext - */ -class ErrorContext extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - */ - protected $http_request = null; - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - */ - protected $user = ''; - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - */ - protected $report_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request - * The HTTP request which was processed when the error was - * triggered. - * @type string $user - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null - */ - public function getHttpRequest() - { - return $this->http_request; - } - - public function hasHttpRequest() - { - return isset($this->http_request); - } - - public function clearHttpRequest() - { - unset($this->http_request); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); - $this->http_request = $var; - - return $this; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null - */ - public function getReportLocation() - { - return $this->report_location; - } - - public function hasReportLocation() - { - return isset($this->report_location); - } - - public function clearReportLocation() - { - unset($this->report_location); - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var - * @return $this - */ - public function setReportLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); - $this->report_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php deleted file mode 100644 index 64d7396ca2d5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php +++ /dev/null @@ -1,207 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorEvent - */ -class ErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - */ - protected $event_time = null; - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - */ - protected $service_context = null; - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * The `ServiceContext` for which this error was reported. - * @type string $message - * The stack trace that was reported or logged by the service. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Data about the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php deleted file mode 100644 index dfc0b18e9187..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php +++ /dev/null @@ -1,181 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroup - */ -class ErrorGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - */ - protected $group_id = ''; - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - */ - private $tracking_issues; - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - */ - protected $resolution_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * @type string $group_id - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * @type \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $tracking_issues - * Associated tracking issues. - * @type int $resolution_status - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrackingIssues() - { - return $this->tracking_issues; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @param \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrackingIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); - $this->tracking_issues = $arr; - - return $this; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @return int - */ - public function getResolutionStatus() - { - return $this->resolution_status; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @param int $var - * @return $this - */ - public function setResolutionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); - $this->resolution_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php deleted file mode 100644 index fd726de75f01..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php +++ /dev/null @@ -1,76 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder - */ -class ErrorGroupOrder -{ - /** - * No group order specified. - * - * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; - */ - const GROUP_ORDER_UNSPECIFIED = 0; - /** - * Total count of errors in the given time window in descending order. - * - * Generated from protobuf enum COUNT_DESC = 1; - */ - const COUNT_DESC = 1; - /** - * Timestamp when the group was last seen in the given time window - * in descending order. - * - * Generated from protobuf enum LAST_SEEN_DESC = 2; - */ - const LAST_SEEN_DESC = 2; - /** - * Timestamp when the group was created in descending order. - * - * Generated from protobuf enum CREATED_DESC = 3; - */ - const CREATED_DESC = 3; - /** - * Number of affected users in the given time window in descending order. - * - * Generated from protobuf enum AFFECTED_USERS_DESC = 4; - */ - const AFFECTED_USERS_DESC = 4; - - private static $valueToName = [ - self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', - self::COUNT_DESC => 'COUNT_DESC', - self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', - self::CREATED_DESC => 'CREATED_DESC', - self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php deleted file mode 100644 index 5f5856a4f6d7..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php +++ /dev/null @@ -1,66 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], - $metadata, $options); - } - - /** - * Replace the data for the specified group. - * Fails if the group does not exist. - * @param \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGroup(\Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php deleted file mode 100644 index 7c3bfafa688b..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php +++ /dev/null @@ -1,488 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats - */ -class ErrorGroupStats extends \Google\Protobuf\Internal\Message -{ - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - */ - protected $group = null; - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - */ - protected $affected_users_count = 0; - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - */ - private $timed_counts; - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - */ - protected $first_seen_time = null; - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - */ - protected $last_seen_time = null; - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - */ - private $affected_services; - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - */ - protected $num_affected_services = 0; - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - */ - protected $representative = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Group data that is independent of the filter criteria. - * @type int|string $count - * Approximate total number of events in the given group that match - * the filter criteria. - * @type int|string $affected_users_count - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * @type \Google\Cloud\ErrorReporting\V1beta1\TimedCount[]|\Google\Protobuf\Internal\RepeatedField $timed_counts - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * @type \Google\Protobuf\Timestamp $first_seen_time - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * @type \Google\Protobuf\Timestamp $last_seen_time - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[]|\Google\Protobuf\Internal\RepeatedField $affected_services - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * @type int $num_affected_services - * The total number of services with a non-zero error count for the given - * filter criteria. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @return int|string - */ - public function getAffectedUsersCount() - { - return $this->affected_users_count; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @param int|string $var - * @return $this - */ - public function setAffectedUsersCount($var) - { - GPBUtil::checkInt64($var); - $this->affected_users_count = $var; - - return $this; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimedCounts() - { - return $this->timed_counts; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @param \Google\Cloud\ErrorReporting\V1beta1\TimedCount[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimedCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); - $this->timed_counts = $arr; - - return $this; - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFirstSeenTime() - { - return $this->first_seen_time; - } - - public function hasFirstSeenTime() - { - return isset($this->first_seen_time); - } - - public function clearFirstSeenTime() - { - unset($this->first_seen_time); - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFirstSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->first_seen_time = $var; - - return $this; - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSeenTime() - { - return $this->last_seen_time; - } - - public function hasLastSeenTime() - { - return isset($this->last_seen_time); - } - - public function clearLastSeenTime() - { - unset($this->last_seen_time); - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_seen_time = $var; - - return $this; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAffectedServices() - { - return $this->affected_services; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAffectedServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->affected_services = $arr; - - return $this; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @return int - */ - public function getNumAffectedServices() - { - return $this->num_affected_services; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @param int $var - * @return $this - */ - public function setNumAffectedServices($var) - { - GPBUtil::checkInt32($var); - $this->num_affected_services = $var; - - return $this; - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null - */ - public function getRepresentative() - { - return $this->representative; - } - - public function hasRepresentative() - { - return isset($this->representative); - } - - public function clearRepresentative() - { - unset($this->representative); - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var - * @return $this - */ - public function setRepresentative($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->representative = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php deleted file mode 100644 index 2a17f17379b1..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php +++ /dev/null @@ -1,81 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists the specified events. - * @param \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListEvents(\Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes all error events of a given project. - * @param \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEvents(\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php deleted file mode 100644 index b08f87708c7a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group_name - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroupName() - { - return $this->group_name; - } - - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroupName($var) - { - GPBUtil::checkString($var, True); - $this->group_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php deleted file mode 100644 index 95c45a2ac88f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php +++ /dev/null @@ -1,252 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.HttpRequestContext - */ -class HttpRequestContext extends \Google\Protobuf\Internal\Message -{ - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - */ - protected $method = ''; - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - */ - protected $user_agent = ''; - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - */ - protected $referrer = ''; - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - */ - protected $response_status_code = 0; - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - */ - protected $remote_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $method - * The type of HTTP request, such as `GET`, `POST`, etc. - * @type string $url - * The URL of the request. - * @type string $user_agent - * The user agent information that is provided with the request. - * @type string $referrer - * The referrer information that is provided with the request. - * @type int $response_status_code - * The HTTP response status code for the request. - * @type string $remote_ip - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @param string $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkString($var, True); - $this->method = $var; - - return $this; - } - - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @return string - */ - public function getReferrer() - { - return $this->referrer; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @param string $var - * @return $this - */ - public function setReferrer($var) - { - GPBUtil::checkString($var, True); - $this->referrer = $var; - - return $this; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @return int - */ - public function getResponseStatusCode() - { - return $this->response_status_code; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @param int $var - * @return $this - */ - public function setResponseStatusCode($var) - { - GPBUtil::checkInt32($var); - $this->response_status_code = $var; - - return $this; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @return string - */ - public function getRemoteIp() - { - return $this->remote_ip; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @param string $var - * @return $this - */ - public function setRemoteIp($var) - { - GPBUtil::checkString($var, True); - $this->remote_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php deleted file mode 100644 index db3b0b9de9b6..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The group for which events shall be returned. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * @type string $group_id - * Required. The group for which events shall be returned. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * @type string $page_token - * Optional. A `next_page_token` provided by a previous response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The group for which events shall be returned. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Required. The group for which events shall be returned. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php deleted file mode 100644 index 9525e10fe223..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php +++ /dev/null @@ -1,153 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - */ - private $error_events; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[]|\Google\Protobuf\Internal\RepeatedField $error_events - * The error events which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorEvents() - { - return $this->error_events; - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->error_events = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php deleted file mode 100644 index 1b79bfa32d5f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php +++ /dev/null @@ -1,493 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest - */ -class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $group_id; - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timed_count_duration = null; - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment = 0; - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment_time = null; - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order = 0; - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * @type string[]|\Google\Protobuf\Internal\RepeatedField $group_id - * Optional. List all ErrorGroupStats with these IDs. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * @type \Google\Protobuf\Duration $timed_count_duration - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * @type \Google\Protobuf\Timestamp $alignment_time - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * Default is 20. - * @type string $page_token - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupId($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->group_id = $arr; - - return $this; - } - - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimedCountDuration() - { - return $this->timed_count_duration; - } - - public function hasTimedCountDuration() - { - return isset($this->timed_count_duration); - } - - public function clearTimedCountDuration() - { - unset($this->timed_count_duration); - } - - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimedCountDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timed_count_duration = $var; - - return $this; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); - $this->alignment = $var; - - return $this; - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getAlignmentTime() - { - return $this->alignment_time; - } - - public function hasAlignmentTime() - { - return isset($this->alignment_time); - } - - public function clearAlignmentTime() - { - unset($this->alignment_time); - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setAlignmentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->alignment_time = $var; - - return $this; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOrder() - { - return $this->order; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); - $this->order = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php deleted file mode 100644 index 2d7da0448ab3..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse - */ -class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - */ - private $error_group_stats; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[]|\Google\Protobuf\Internal\RepeatedField $error_group_stats - * The error group stats which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorGroupStats() - { - return $this->error_group_stats; - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[]|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorGroupStats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); - $this->error_group_stats = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php deleted file mode 100644 index e095a9c2c996..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php +++ /dev/null @@ -1,68 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange - */ -class QueryTimeRange extends \Google\Protobuf\Internal\Message -{ - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - */ - protected $period = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $period - * Restricts the query to the specified time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @return int - */ - public function getPeriod() - { - return $this->period; - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @param int $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); - $this->period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php deleted file mode 100644 index 9aa826cf2d57..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php +++ /dev/null @@ -1,90 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period - */ -class Period -{ - /** - * Do not use. - * - * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; - */ - const PERIOD_UNSPECIFIED = 0; - /** - * Retrieve data for the last hour. - * Recommended minimum timed count duration: 1 min. - * - * Generated from protobuf enum PERIOD_1_HOUR = 1; - */ - const PERIOD_1_HOUR = 1; - /** - * Retrieve data for the last 6 hours. - * Recommended minimum timed count duration: 10 min. - * - * Generated from protobuf enum PERIOD_6_HOURS = 2; - */ - const PERIOD_6_HOURS = 2; - /** - * Retrieve data for the last day. - * Recommended minimum timed count duration: 1 hour. - * - * Generated from protobuf enum PERIOD_1_DAY = 3; - */ - const PERIOD_1_DAY = 3; - /** - * Retrieve data for the last week. - * Recommended minimum timed count duration: 6 hours. - * - * Generated from protobuf enum PERIOD_1_WEEK = 4; - */ - const PERIOD_1_WEEK = 4; - /** - * Retrieve data for the last 30 days. - * Recommended minimum timed count duration: 1 day. - * - * Generated from protobuf enum PERIOD_30_DAYS = 5; - */ - const PERIOD_30_DAYS = 5; - - private static $valueToName = [ - self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', - self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', - self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', - self::PERIOD_1_DAY => 'PERIOD_1_DAY', - self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', - self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Period::class, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange_Period::class); - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php deleted file mode 100644 index 1ab3a0a72ac0..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php +++ /dev/null @@ -1,16 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest - */ -class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event - * Required. The error event to be reported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php deleted file mode 100644 index 14380862c6a8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse - */ -class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php deleted file mode 100644 index 6586dff9b22f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php +++ /dev/null @@ -1,66 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php deleted file mode 100644 index d92ac7651617..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php +++ /dev/null @@ -1,295 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent - */ -class ReportedErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_time = null; - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_context = null; - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message = ''; - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * Required. The service context in which this error has occurred. - * @type string $message - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Optional. A description of the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php deleted file mode 100644 index df54f8cfb839..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php +++ /dev/null @@ -1,180 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContext - */ -class ServiceContext extends \Google\Protobuf\Internal\Message -{ - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - */ - protected $service = ''; - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * @type string $version - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * @type string $resource_type - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php deleted file mode 100644 index 140d3323103d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter - */ -class ServiceContextFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * @type string $version - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * @type string $resource_type - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php deleted file mode 100644 index f85e34012700..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.SourceLocation - */ -class SourceLocation extends \Google\Protobuf\Internal\Message -{ - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - */ - protected $file_path = ''; - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - */ - protected $line_number = 0; - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - */ - protected $function_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * @type int $line_number - * 1-based. 0 indicates that the line number is unknown. - * @type string $function_name - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @return int - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @param int $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->line_number = $var; - - return $this; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @return string - */ - public function getFunctionName() - { - return $this->function_name; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @param string $var - * @return $this - */ - public function setFunctionName($var) - { - GPBUtil::checkString($var, True); - $this->function_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php deleted file mode 100644 index 7605fd7676fd..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php +++ /dev/null @@ -1,157 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCount - */ -class TimedCount extends \Google\Protobuf\Internal\Message -{ - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - */ - protected $count = 0; - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $count - * Approximate number of occurrences in the given time period. - * @type \Google\Protobuf\Timestamp $start_time - * Start of the time period to which `count` refers (included). - * @type \Google\Protobuf\Timestamp $end_time - * End of the time period to which `count` refers (excluded). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php deleted file mode 100644 index 633e74c96e9d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php +++ /dev/null @@ -1,71 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment - */ -class TimedCountAlignment -{ - /** - * No alignment specified. - * - * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - */ - const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the `alignment_time` provided in - * the request. - * The `alignment_time` does not have to be inside the query period but - * even if it is outside, only time periods are returned which overlap - * with the query period. - * A rounded alignment will typically result in a - * different size of the first or the last time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; - */ - const ALIGNMENT_EQUAL_ROUNDED = 1; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the end of the requested time - * period. This can result in a different size of the - * first time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; - */ - const ALIGNMENT_EQUAL_AT_END = 2; - - private static $valueToName = [ - self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', - self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', - self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php deleted file mode 100644 index b6a97dcab003..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php +++ /dev/null @@ -1,71 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TrackingIssue - */ -class TrackingIssue extends \Google\Protobuf\Internal\Message -{ - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php deleted file mode 100644 index 2475ee41bdc5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Required. The group which replaces the resource on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php deleted file mode 100644 index 912e36c93442..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ -errorGroupName('[PROJECT]', '[GROUP]'); - * $response = $errorGroupServiceClient->getGroup($formattedGroupName); - * } finally { - * $errorGroupServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class ErrorGroupServiceGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $errorGroupNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getErrorGroupNameTemplate() - { - if (self::$errorGroupNameTemplate == null) { - self::$errorGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); - } - - return self::$errorGroupNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'errorGroup' => self::getErrorGroupNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a error_group - * resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted error_group resource. - * - * @experimental - */ - public static function errorGroupName($project, $group) - { - return self::getErrorGroupNameTemplate()->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - errorGroup: projects/{project}/groups/{group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Get the specified group. - * - * Sample code: - * ``` - * $errorGroupServiceClient = new ErrorGroupServiceClient(); - * try { - * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); - * $response = $errorGroupServiceClient->getGroup($formattedGroupName); - * } finally { - * $errorGroupServiceClient->close(); - * } - * ``` - * - * @param string $groupName Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * - * Example: `projects/my-project-123/groups/my-group` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getGroup($groupName, array $optionalArgs = []) - { - $request = new GetGroupRequest(); - $requestParamHeaders = []; - $request->setGroupName($groupName); - $requestParamHeaders['group_name'] = $groupName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Replace the data for the specified group. - * Fails if the group does not exist. - * - * Sample code: - * ``` - * $errorGroupServiceClient = new ErrorGroupServiceClient(); - * try { - * $group = new ErrorGroup(); - * $response = $errorGroupServiceClient->updateGroup($group); - * } finally { - * $errorGroupServiceClient->close(); - * } - * ``` - * - * @param ErrorGroup $group Required. The group which replaces the resource on the server. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateGroup($group, array $optionalArgs = []) - { - $request = new UpdateGroupRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group.name'] = $group->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php deleted file mode 100644 index a1df856bf9d3..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php +++ /dev/null @@ -1,547 +0,0 @@ -projectName('[PROJECT]'); - * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class ErrorStatsServiceGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Deletes all error events of a given project. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: `projects/my-project-123`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteEvents($projectName, array $optionalArgs = []) - { - $request = new DeleteEventsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $requestParamHeaders['project_name'] = $projectName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEvents', DeleteEventsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the specified events. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * $groupId = 'group_id'; - * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: `projects/my-project-123`. - * @param string $groupId Required. The group for which events shall be returned. - * @param array $optionalArgs { - * Optional. - * - * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type QueryTimeRange $timeRange - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listEvents($projectName, $groupId, array $optionalArgs = []) - { - $request = new ListEventsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $request->setGroupId($groupId); - $requestParamHeaders['project_name'] = $projectName; - if (isset($optionalArgs['serviceFilter'])) { - $request->setServiceFilter($optionalArgs['serviceFilter']); - } - - if (isset($optionalArgs['timeRange'])) { - $request->setTimeRange($optionalArgs['timeRange']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEvents', $optionalArgs, ListEventsResponse::class, $request); - } - - /** - * Lists the specified groups. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * - * Examples: `projects/my-project-123`, `projects/5551234`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $groupId - * Optional. List all ErrorGroupStats with these IDs. - * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type QueryTimeRange $timeRange - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * @type Duration $timedCountDuration - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} - * @type Timestamp $alignmentTime - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listGroupStats($projectName, array $optionalArgs = []) - { - $request = new ListGroupStatsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $requestParamHeaders['project_name'] = $projectName; - if (isset($optionalArgs['groupId'])) { - $request->setGroupId($optionalArgs['groupId']); - } - - if (isset($optionalArgs['serviceFilter'])) { - $request->setServiceFilter($optionalArgs['serviceFilter']); - } - - if (isset($optionalArgs['timeRange'])) { - $request->setTimeRange($optionalArgs['timeRange']); - } - - if (isset($optionalArgs['timedCountDuration'])) { - $request->setTimedCountDuration($optionalArgs['timedCountDuration']); - } - - if (isset($optionalArgs['alignment'])) { - $request->setAlignment($optionalArgs['alignment']); - } - - if (isset($optionalArgs['alignmentTime'])) { - $request->setAlignmentTime($optionalArgs['alignmentTime']); - } - - if (isset($optionalArgs['order'])) { - $request->setOrder($optionalArgs['order']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGroupStats', $optionalArgs, ListGroupStatsResponse::class, $request); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php deleted file mode 100644 index d27fe6558b6f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php +++ /dev/null @@ -1,328 +0,0 @@ -projectName('[PROJECT]'); - * $event = new ReportedErrorEvent(); - * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); - * } finally { - * $reportErrorsServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class ReportErrorsServiceGapicClient -{ - use GapicClientTrait; - - /** - * The name of the service. - */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; - - /** - * The default address of the service. - */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** - * The default port of the service. - */ - const DEFAULT_SERVICE_PORT = 443; - - /** - * The name of the code generator, to be included in the agent header. - */ - const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'serviceAddress' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $serviceAddress - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $serviceAddress setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Report an individual error event and record the event to a log. - * - * This endpoint accepts **either** an OAuth token, - * **or** an [API key](https://support.google.com/cloud/answer/6158862) - * for authentication. To use an API key, append it to the URL as the value of - * a `key` parameter. For example: - * - * `POST - * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` - * - * **Note:** [Error Reporting](/error-reporting) is a global service built - * on Cloud Logging and doesn't analyze logs stored - * in regional log buckets or logs routed to other Google Cloud projects. - * - * For more information, see - * [Using Error Reporting with regionalized - * logs](/error-reporting/docs/regionalization). - * - * Sample code: - * ``` - * $reportErrorsServiceClient = new ReportErrorsServiceClient(); - * try { - * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]'); - * $event = new ReportedErrorEvent(); - * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); - * } finally { - * $reportErrorsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: // `projects/my-project-123`. - * @param ReportedErrorEvent $event Required. The error event to be reported. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a - * {@see Google\ApiCore\RetrySettings} object, or an associative array of retry - * settings parameters. See the documentation on - * {@see Google\ApiCore\RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function reportErrorEvent($projectName, $event, array $optionalArgs = []) - { - $request = new ReportErrorEventRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $request->setEvent($event); - $requestParamHeaders['project_name'] = $projectName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReportErrorEvent', ReportErrorEventResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php deleted file mode 100644 index 58f5ceccda4d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php deleted file mode 100644 index 8660657af11a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php +++ /dev/null @@ -1,32 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', - 'placeholders' => [ - 'group_name' => [ - 'getters' => [ - 'getGroupName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'put', - 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json deleted file mode 100644 index 0a7501188091..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "DeleteEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroupStats": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php deleted file mode 100644 index 35148865a5eb..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorEvents', - ], - ], - 'ListGroupStats' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorGroupStats', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php deleted file mode 100644 index 57064b872a4e..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ /dev/null @@ -1,44 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'DeleteEvents' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'ListGroupStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json deleted file mode 100644 index 701d5afb9615..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ReportErrorEvent": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php deleted file mode 100644 index 52aefb0c1051..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php +++ /dev/null @@ -1,7 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php deleted file mode 100644 index f2c99ae79229..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php +++ /dev/null @@ -1,20 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ - 'ReportErrorEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', - 'body' => 'event', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php deleted file mode 100644 index b69bf39bd865..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php +++ /dev/null @@ -1,200 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** - * @return ErrorGroupServiceClient - */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorGroupServiceClient($options); - } - - /** - * @test - */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); - $response = $client->getGroup($formattedGroupName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroupName(); - $this->assertProtobufEquals($formattedGroupName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedGroupName = $client->errorGroupName('[PROJECT]', '[GROUP]'); - try { - $client->getGroup($formattedGroupName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function updateGroupTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $group = new ErrorGroup(); - $response = $client->updateGroup($group); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function updateGroupExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $group = new ErrorGroup(); - try { - $client->updateGroup($group); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php deleted file mode 100644 index 1db07938aed4..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php +++ /dev/null @@ -1,282 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** - * @return ErrorStatsServiceClient - */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorStatsServiceClient($options); - } - - /** - * @test - */ - public function deleteEventsTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DeleteEventsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $response = $client->deleteEvents($formattedProjectName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function deleteEventsExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - try { - $client->deleteEvents($formattedProjectName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listEventsTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorEventsElement = new ErrorEvent(); - $errorEvents = [ - $errorEventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorEvents($errorEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - $response = $client->listEvents($formattedProjectName, $groupId); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listEventsExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - try { - $client->listEvents($formattedProjectName, $groupId); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listGroupStatsTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorGroupStatsElement = new ErrorGroupStats(); - $errorGroupStats = [ - $errorGroupStatsElement, - ]; - $expectedResponse = new ListGroupStatsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorGroupStats($errorGroupStats); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $response = $client->listGroupStats($formattedProjectName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function listGroupStatsExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - try { - $client->listGroupStats($formattedProjectName); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php deleted file mode 100644 index c9a3df25893a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php +++ /dev/null @@ -1,144 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** - * @return ReportErrorsServiceClient - */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReportErrorsServiceClient($options); - } - - /** - * @test - */ - public function reportErrorEventTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportErrorEventResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - $response = $client->reportErrorEvent($formattedProjectName, $event); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** - * @test - */ - public function reportErrorEventExceptionTest() - { - $transport = $this->createTransport(); - $client = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $client->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - try { - $client->reportErrorEvent($formattedProjectName, $event); - // If the $client method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}