From 6edae2e8fdf1d6fee23e14ca03cb6913fbb1f5ab Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 19 Dec 2024 05:00:05 +0000 Subject: [PATCH 1/2] docs: update documentation for various messages PiperOrigin-RevId: 707746489 Source-Link: https://github.com/googleapis/googleapis/commit/09d410360ef6b9d92bda174d5b213a921546ee99 Source-Link: https://github.com/googleapis/googleapis-gen/commit/63936c204dd0e8ae326c37dfaffd9873b5635946 Copy-Tag: eyJwIjoiU2VydmljZUhlYWx0aC8uT3dsQm90LnlhbWwiLCJoIjoiNjM5MzZjMjA0ZGQwZThhZTMyNmMzN2RmYWZmZDk4NzNiNTYzNTk0NiJ9 --- .../Cloud/Servicehealth/V1/EventResources.php | Bin 0 -> 6502 bytes .../Cloud/Servicehealth/V1/EventService.php | 39 ++ .../Google/Cloud/ServiceHealth/V1/Asset.php | 113 +++ .../Google/Cloud/ServiceHealth/V1/Event.php | 605 ++++++++++++++++ .../V1/Event/DetailedCategory.php | 67 ++ .../ServiceHealth/V1/Event/DetailedState.php | 104 +++ .../ServiceHealth/V1/Event/EventCategory.php | 58 ++ .../ServiceHealth/V1/Event/Relevance.php | 90 +++ .../Cloud/ServiceHealth/V1/Event/State.php | 66 ++ .../Cloud/ServiceHealth/V1/EventImpact.php | 121 ++++ .../Cloud/ServiceHealth/V1/EventUpdate.php | 213 ++++++ .../Cloud/ServiceHealth/V1/EventView.php | 63 ++ .../ServiceHealth/V1/GetEventRequest.php | 107 +++ .../V1/GetOrganizationEventRequest.php | 117 ++++ .../V1/GetOrganizationImpactRequest.php | 117 ++++ .../ServiceHealth/V1/ListEventsRequest.php | 324 +++++++++ .../ServiceHealth/V1/ListEventsResponse.php | 147 ++++ .../V1/ListOrganizationEventsRequest.php | 330 +++++++++ .../V1/ListOrganizationEventsResponse.php | 147 ++++ .../V1/ListOrganizationImpactsRequest.php | 293 ++++++++ .../V1/ListOrganizationImpactsResponse.php | 156 +++++ .../Cloud/ServiceHealth/V1/Location.php | 67 ++ .../ServiceHealth/V1/OrganizationEvent.php | 595 ++++++++++++++++ .../V1/OrganizationEvent/DetailedCategory.php | 67 ++ .../V1/OrganizationEvent/DetailedState.php | 104 +++ .../V1/OrganizationEvent/EventCategory.php | 58 ++ .../V1/OrganizationEvent/State.php | 67 ++ .../V1/OrganizationEventView.php | 63 ++ .../ServiceHealth/V1/OrganizationImpact.php | 222 ++++++ .../Google/Cloud/ServiceHealth/V1/Product.php | 101 +++ .../V1/ServiceHealthClient/get_event.php | 77 ++ .../V1/ServiceHealthClient/get_location.php | 57 ++ .../get_organization_event.php | 84 +++ .../get_organization_impact.php | 84 +++ .../V1/ServiceHealthClient/list_events.php | 83 +++ .../V1/ServiceHealthClient/list_locations.php | 62 ++ .../list_organization_events.php | 85 +++ .../list_organization_impacts.php | 83 +++ .../v1/src/V1/Client/ServiceHealthClient.php | 523 ++++++++++++++ .../v1/src/V1/gapic_metadata.json | 58 ++ .../service_health_client_config.json | 86 +++ .../service_health_descriptor_config.php | 165 +++++ .../service_health_rest_client_config.php | 119 ++++ .../V1/Client/ServiceHealthClientTest.php | 655 ++++++++++++++++++ 44 files changed, 6842 insertions(+) create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventService.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Asset.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php create mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php create mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php create mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php create mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json create mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php create mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php create mode 100644 owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php b/owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php new file mode 100644 index 0000000000000000000000000000000000000000..77bc3d3abbeb4761cd2aad43c83b45cc6d71351c GIT binary patch literal 6502 zcmeHMPjlPG6)z}DA|LgKf@GIg?F2?VwW6kENT*Ir*KQyZWYN$hhoqEA!Wj-kt|ZhH z!2+OMC!<3TogR8@KR_=%w3C@0d+0alB{Tg5Ir{_j&|dnmi-iD^vcSZ-RR{jhc6`Ogh(UHbj+SPkPgR3N5qnP=IO{75Gx}|rMgtB zwVr;+*geY_Ii}UXsfEHZaeS}3BRg+<%ervJk+j2fEEJ}cd@MQE zm;_gsB#Ss>Yxs!j?E;+pPn{W_Q$|LoY>+{JkDTadhG`WF7gk+>Tqeq$8ePhFN87-F zI{N8owk&nykDnNx)0BSS_fZ+sYsa_BwecSO_Z_(Z4f0C7&4e;E88e||%$()6Z+e*e z$jI`PWEr{rruT~GC&oAHaD&(c`4350q?spf!8JF1(}E=IB=(lRRu;Zi;-UzPj^PYQ zI!1?aY(Y#zvhQUFCRlpm;*AFJ9&Wp1(|VDX2F|Sk1pG3kedD3CnC$Q)yDoHO=sNG0VEmwl6RfjcSEe5nXhn-xf0H6Y^j7*GE zBo4<;Z%GR~$$TWmG%6yNAz_gLIn!~Mr{h$eOeDLST#DKDAuNwa$XLWqC!#B{PemBQ zO;{P}mP?J)rZk{33HIteNHXxQn}X>Te3Q&?b2WK>X8aAur0xTtmo0}0tws~dL7WWx zOk^#Z$U{gC$*-MmP{s8~qVi){rAf^5Ond{j)dRKG?iQ7{TB$cb>F(EB4YjD1HMNxb zp11;Wtya`ZI3*R6`;g*U;UnCE+af!0am$s3;?b3b(@8R)^P<8 zYZVf{nyHv;dQ)xHs|N_a;4b8iZAyMKO ze>`Ue1dh;sa=yDnKkfV?{gl4~*r;2_`q22CiZbxm!O;6t4E==f!P%!vW=fA)Y^~2? z>kZsMYk6gEe4cQ8KQJozMVPrC%nchL-Or|2JVkY#-xplh0C;(l(buDsDPweIaDa~E z(Ggxn#|boYHXSD;ah({ZgCgi#XZ3NDDH-q5b)O=`%utE7DEK(1Mn2pqJ zfh1yH@n1MEM#1h+{+9q7Rl|1JK5UX-jj=-(F?6i*_xeW+T?|7fMk$(ZKw_jHldg@I z8Z^NcT@?gZH#+W^&q$!n6vRzfIx+@$QE{=a1o07EJ2S}h^b*EzEx&U`{HgW_IG-*h z|4slgXp}v|dX0z={e%?g34B#nQB>x?Td+<$ihu>-7J59ih~7KV53#vkpy}@Rz4Aw} zULnl6+_xWuI&;snQ8tDAZvk$*W(D&w9JlgB+#b-ly(`X3>aQn;l~4@dyCQ~DR$avN zO99@v%y2KZO$hB4*0I`{zHa;d?z~HXyP)^r2N?7zdw2qrLJ8o7Xx?*I{@VvTM~3|E0!iT3L?9U|cd#0Y zr03qb50Tv_BzyuBx8Vl6Z#dA@k0<*2El364?I|s-h+X+6tOrKR`_*bHw)CrdYu$iwxZ1>vi_0eRwI#T9*%YS8-d8cWgB|s&Be%Cn9l)=4 zZLC!svmtz1VO=c0bi~H|*bHZH7Efoq!4Ea_qr*oN-~SrBU7^?Z8G3D>X|ZejpVMCe zG6%VT^7kF@UY}p=vl$({*?$?67(}5!F$#qcNTGmJlq1N6R`#r(SwZlkO3Vc_exeqb nT|pl%Vd>|X_wV^P((kZa`M@QinternalAddGeneratedFile( + ' +¼ +1google/cloud/servicehealth/v1/event_service.protogoogle.cloud.servicehealth.v1google/api/client.proto3google/cloud/servicehealth/v1/event_resources.proto2ª + + ServiceHealth® + +ListEvents0.google.cloud.servicehealth.v1.ListEventsRequest1.google.cloud.servicehealth.v1.ListEventsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/events› +GetEvent..google.cloud.servicehealth.v1.GetEventRequest$.google.cloud.servicehealth.v1.Event"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/events/*}ã +ListOrganizationEvents<.google.cloud.servicehealth.v1.ListOrganizationEventsRequest=.google.cloud.servicehealth.v1.ListOrganizationEventsResponse"LÚAparent‚Óä“=;/v1/{parent=organizations/*/locations/*}/organizationEventsÐ +GetOrganizationEvent:.google.cloud.servicehealth.v1.GetOrganizationEventRequest0.google.cloud.servicehealth.v1.OrganizationEvent"JÚAname‚Óä“=;/v1/{name=organizations/*/locations/*/organizationEvents/*}ç +ListOrganizationImpacts=.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest>.google.cloud.servicehealth.v1.ListOrganizationImpactsResponse"MÚAparent‚Óä“>google.cloud.servicehealth.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Full name of the resource as defined in + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * + * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_name = ''; + /** + * Output only. Type of the asset. Example: + * `"cloudresourcemanager.googleapis.com/Project"` + * + * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset_name + * Output only. Full name of the resource as defined in + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * @type string $asset_type + * Output only. Type of the asset. Example: + * `"cloudresourcemanager.googleapis.com/Project"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Full name of the resource as defined in + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * + * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetName() + { + return $this->asset_name; + } + + /** + * Output only. Full name of the resource as defined in + * [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + * + * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetName($var) + { + GPBUtil::checkString($var, True); + $this->asset_name = $var; + + return $this; + } + + /** + * Output only. Type of the asset. Example: + * `"cloudresourcemanager.googleapis.com/Project"` + * + * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetType() + { + return $this->asset_type; + } + + /** + * Output only. Type of the asset. Example: + * `"cloudresourcemanager.googleapis.com/Project"` + * + * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetType($var) + { + GPBUtil::checkString($var, True); + $this->asset_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php new file mode 100644 index 000000000000..336de26837bd --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php @@ -0,0 +1,605 @@ +google.cloud.servicehealth.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including project and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $title = ''; + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $category = 0; + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $detailed_category = 0; + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $detailed_state = 0; + /** + * Google Cloud products and locations impacted by the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; + */ + private $event_impacts; + /** + * Output only. Communicates why a given event is deemed relevant in the + * context of a given project. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $relevance = 0; + /** + * Output only. Event updates are correspondence from Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $updates; + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent_event = ''; + /** + * Output only. The time when the event was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The time when the next update can be expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including project and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * @type string $title + * Output only. Brief description for the event. + * @type string $description + * Output only. Free-form, human-readable description. + * @type int $category + * Output only. The category of the event. + * @type int $detailed_category + * Output only. The detailed category of the event. + * @type int $state + * Output only. The current state of the event. + * @type int $detailed_state + * Output only. The current detailed state of the incident. + * @type array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $event_impacts + * Google Cloud products and locations impacted by the event. + * @type int $relevance + * Output only. Communicates why a given event is deemed relevant in the + * context of a given project. + * @type array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $updates + * Output only. Event updates are correspondence from Google. + * @type string $parent_event + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the event was last modified. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The start time of the event, if applicable. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The end time of the event, if applicable. + * @type \Google\Protobuf\Timestamp $next_update_time + * Output only. The time when the next update can be expected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including project and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including project and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\EventCategory::class); + $this->category = $var; + + return $this; + } + + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDetailedCategory() + { + return $this->detailed_category; + } + + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDetailedCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\DetailedCategory::class); + $this->detailed_category = $var; + + return $this; + } + + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDetailedState() + { + return $this->detailed_state; + } + + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDetailedState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\DetailedState::class); + $this->detailed_state = $var; + + return $this; + } + + /** + * Google Cloud products and locations impacted by the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventImpacts() + { + return $this->event_impacts; + } + + /** + * Google Cloud products and locations impacted by the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; + * @param array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventImpacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventImpact::class); + $this->event_impacts = $arr; + + return $this; + } + + /** + * Output only. Communicates why a given event is deemed relevant in the + * context of a given project. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRelevance() + { + return $this->relevance; + } + + /** + * Output only. Communicates why a given event is deemed relevant in the + * context of a given project. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRelevance($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\Relevance::class); + $this->relevance = $var; + + return $this; + } + + /** + * Output only. Event updates are correspondence from Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpdates() + { + return $this->updates; + } + + /** + * Output only. Event updates are correspondence from Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpdates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventUpdate::class); + $this->updates = $arr; + + return $this; + } + + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParentEvent() + { + return $this->parent_event; + } + + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParentEvent($var) + { + GPBUtil::checkString($var, True); + $this->parent_event = $var; + + return $this; + } + + /** + * Output only. The time when the event was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the event was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The time when the next update can be expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextUpdateTime() + { + return $this->next_update_time; + } + + public function hasNextUpdateTime() + { + return isset($this->next_update_time); + } + + public function clearNextUpdateTime() + { + unset($this->next_update_time); + } + + /** + * Output only. The time when the next update can be expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php new file mode 100644 index 000000000000..3434b8f3f669 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php @@ -0,0 +1,67 @@ +google.cloud.servicehealth.v1.Event.DetailedCategory + */ +class DetailedCategory +{ + /** + * Unspecified detailed category. + * + * Generated from protobuf enum DETAILED_CATEGORY_UNSPECIFIED = 0; + */ + const DETAILED_CATEGORY_UNSPECIFIED = 0; + /** + * Indicates an event with category INCIDENT has a confirmed impact to at + * least one Google Cloud product. + * + * Generated from protobuf enum CONFIRMED_INCIDENT = 1; + */ + const CONFIRMED_INCIDENT = 1; + /** + * Indicates an event with category INCIDENT is under investigation to + * determine if it has a confirmed impact on any Google Cloud products. + * + * Generated from protobuf enum EMERGING_INCIDENT = 2; + */ + const EMERGING_INCIDENT = 2; + + private static $valueToName = [ + self::DETAILED_CATEGORY_UNSPECIFIED => 'DETAILED_CATEGORY_UNSPECIFIED', + self::CONFIRMED_INCIDENT => 'CONFIRMED_INCIDENT', + self::EMERGING_INCIDENT => 'EMERGING_INCIDENT', + ]; + + 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(DetailedCategory::class, \Google\Cloud\ServiceHealth\V1\Event_DetailedCategory::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php new file mode 100644 index 000000000000..339b648a3a18 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php @@ -0,0 +1,104 @@ +google.cloud.servicehealth.v1.Event.DetailedState + */ +class DetailedState +{ + /** + * Unspecified detail state. + * + * Generated from protobuf enum DETAILED_STATE_UNSPECIFIED = 0; + */ + const DETAILED_STATE_UNSPECIFIED = 0; + /** + * Google engineers are actively investigating the event to determine the + * impact. + * + * Generated from protobuf enum EMERGING = 1; + */ + const EMERGING = 1; + /** + * The incident is confirmed and impacting at least one Google Cloud + * product. Ongoing status updates will be provided until it is resolved. + * + * Generated from protobuf enum CONFIRMED = 2; + */ + const CONFIRMED = 2; + /** + * The incident is no longer affecting any Google Cloud product, and there + * will be no further updates. + * + * Generated from protobuf enum RESOLVED = 3; + */ + const RESOLVED = 3; + /** + * The incident was merged into a parent incident. All further updates will + * be published to the parent only. The `parent_event` field contains the + * name of the parent. + * + * Generated from protobuf enum MERGED = 4; + */ + const MERGED = 4; + /** + * The incident was automatically closed because of the following reasons: + * * The impact of the incident could not be confirmed. + * * The incident was intermittent or resolved itself. + * The incident does not have a resolution because no action or + * investigation happened. If it is intermittent, the incident may reopen. + * + * Generated from protobuf enum AUTO_CLOSED = 9; + */ + const AUTO_CLOSED = 9; + /** + * Upon investigation, Google engineers concluded that the incident is not + * affecting a Google Cloud product. This state can change if the incident + * is reviewed again. + * + * Generated from protobuf enum FALSE_POSITIVE = 10; + */ + const FALSE_POSITIVE = 10; + + private static $valueToName = [ + self::DETAILED_STATE_UNSPECIFIED => 'DETAILED_STATE_UNSPECIFIED', + self::EMERGING => 'EMERGING', + self::CONFIRMED => 'CONFIRMED', + self::RESOLVED => 'RESOLVED', + self::MERGED => 'MERGED', + self::AUTO_CLOSED => 'AUTO_CLOSED', + self::FALSE_POSITIVE => 'FALSE_POSITIVE', + ]; + + 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(DetailedState::class, \Google\Cloud\ServiceHealth\V1\Event_DetailedState::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php new file mode 100644 index 000000000000..4c023cfada0a --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php @@ -0,0 +1,58 @@ +google.cloud.servicehealth.v1.Event.EventCategory + */ +class EventCategory +{ + /** + * Unspecified category. + * + * Generated from protobuf enum EVENT_CATEGORY_UNSPECIFIED = 0; + */ + const EVENT_CATEGORY_UNSPECIFIED = 0; + /** + * Event category for service outage or degradation. + * + * Generated from protobuf enum INCIDENT = 2; + */ + const INCIDENT = 2; + + private static $valueToName = [ + self::EVENT_CATEGORY_UNSPECIFIED => 'EVENT_CATEGORY_UNSPECIFIED', + self::INCIDENT => 'INCIDENT', + ]; + + 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(EventCategory::class, \Google\Cloud\ServiceHealth\V1\Event_EventCategory::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php new file mode 100644 index 000000000000..57024463276d --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php @@ -0,0 +1,90 @@ +google.cloud.servicehealth.v1.Event.Relevance + */ +class Relevance +{ + /** + * Unspecified relevance. + * + * Generated from protobuf enum RELEVANCE_UNSPECIFIED = 0; + */ + const RELEVANCE_UNSPECIFIED = 0; + /** + * The relevance of the incident to the project is unknown. + * + * Generated from protobuf enum UNKNOWN = 2; + */ + const UNKNOWN = 2; + /** + * The incident does not impact the project. + * + * Generated from protobuf enum NOT_IMPACTED = 6; + */ + const NOT_IMPACTED = 6; + /** + * The incident is associated with a Google Cloud product your project uses, + * but the incident may not be impacting your project. For example, the + * incident may be impacting a Google Cloud product that your project uses, + * but in a location that your project does not use. + * + * Generated from protobuf enum PARTIALLY_RELATED = 7; + */ + const PARTIALLY_RELATED = 7; + /** + * The incident has a direct connection with your project and impacts a + * Google Cloud product in a location your project uses. + * + * Generated from protobuf enum RELATED = 8; + */ + const RELATED = 8; + /** + * The incident is verified to be impacting your project. + * + * Generated from protobuf enum IMPACTED = 9; + */ + const IMPACTED = 9; + + private static $valueToName = [ + self::RELEVANCE_UNSPECIFIED => 'RELEVANCE_UNSPECIFIED', + self::UNKNOWN => 'UNKNOWN', + self::NOT_IMPACTED => 'NOT_IMPACTED', + self::PARTIALLY_RELATED => 'PARTIALLY_RELATED', + self::RELATED => 'RELATED', + self::IMPACTED => 'IMPACTED', + ]; + + 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(Relevance::class, \Google\Cloud\ServiceHealth\V1\Event_Relevance::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php new file mode 100644 index 000000000000..59ecd9bdaf7b --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php @@ -0,0 +1,66 @@ +google.cloud.servicehealth.v1.Event.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Event is actively affecting a Google Cloud product and will continue to + * receive updates. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Event is no longer affecting the Google Cloud product or has been merged + * with another event. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CLOSED => 'CLOSED', + ]; + + 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(State::class, \Google\Cloud\ServiceHealth\V1\Event_State::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php new file mode 100644 index 000000000000..62486978ae8a --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php @@ -0,0 +1,121 @@ +google.cloud.servicehealth.v1.EventImpact + */ +class EventImpact extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud product impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; + */ + protected $product = null; + /** + * Location impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; + */ + protected $location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ServiceHealth\V1\Product $product + * Google Cloud product impacted by the event. + * @type \Google\Cloud\ServiceHealth\V1\Location $location + * Location impacted by the event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud product impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; + * @return \Google\Cloud\ServiceHealth\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Google Cloud product impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; + * @param \Google\Cloud\ServiceHealth\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * Location impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; + * @return \Google\Cloud\ServiceHealth\V1\Location|null + */ + public function getLocation() + { + return $this->location; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * Location impacted by the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; + * @param \Google\Cloud\ServiceHealth\V1\Location $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Location::class); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php new file mode 100644 index 000000000000..e5d74427a913 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php @@ -0,0 +1,213 @@ +google.cloud.servicehealth.v1.EventUpdate + */ +class EventUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Brief title for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $title = ''; + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. Symptoms of the event, if available. + * + * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $symptom = ''; + /** + * Output only. Workaround steps to remediate the event impact, if available. + * + * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workaround = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the update was posted. + * @type string $title + * Output only. Brief title for the event. + * @type string $description + * Output only. Free-form, human-readable description. + * @type string $symptom + * Output only. Symptoms of the event, if available. + * @type string $workaround + * Output only. Workaround steps to remediate the event impact, if available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Brief title for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Output only. Brief title for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Symptoms of the event, if available. + * + * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSymptom() + { + return $this->symptom; + } + + /** + * Output only. Symptoms of the event, if available. + * + * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSymptom($var) + { + GPBUtil::checkString($var, True); + $this->symptom = $var; + + return $this; + } + + /** + * Output only. Workaround steps to remediate the event impact, if available. + * + * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkaround() + { + return $this->workaround; + } + + /** + * Output only. Workaround steps to remediate the event impact, if available. + * + * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkaround($var) + { + GPBUtil::checkString($var, True); + $this->workaround = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php new file mode 100644 index 000000000000..84f5a108d068 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php @@ -0,0 +1,63 @@ +google.cloud.servicehealth.v1.EventView + */ +class EventView +{ + /** + * Unspecified event view. Default to `EVENT_VIEW_BASIC`. + * + * Generated from protobuf enum EVENT_VIEW_UNSPECIFIED = 0; + */ + const EVENT_VIEW_UNSPECIFIED = 0; + /** + * Includes all fields except `updates`. This view is the default for + * ListEvents API. + * + * Generated from protobuf enum EVENT_VIEW_BASIC = 1; + */ + const EVENT_VIEW_BASIC = 1; + /** + * Includes all event fields. + * + * Generated from protobuf enum EVENT_VIEW_FULL = 2; + */ + const EVENT_VIEW_FULL = 2; + + private static $valueToName = [ + self::EVENT_VIEW_UNSPECIFIED => 'EVENT_VIEW_UNSPECIFIED', + self::EVENT_VIEW_BASIC => 'EVENT_VIEW_BASIC', + self::EVENT_VIEW_FULL => 'EVENT_VIEW_FULL', + ]; + + 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/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php new file mode 100644 index 000000000000..ad4b0340679f --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php @@ -0,0 +1,107 @@ +google.cloud.servicehealth.v1.GetEventRequest + */ +class GetEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique name of the event in this scope including project + * and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * `project_id` - Project ID of the project that contains the event.
+ * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Unique name of the event in this scope including project + * and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * + * `project_id` - Project ID of the project that contains the event.
+ * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. Please see + * {@see ServiceHealthClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\GetEventRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique name of the event in this scope including project + * and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * `project_id` - Project ID of the project that contains the event.
+ * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique name of the event in this scope including project + * and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * `project_id` - Project ID of the project that contains the event.
+ * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique name of the event in this scope including project + * and location using the form + * `projects/{project_id}/locations/{location}/events/{event_id}`. + * `project_id` - Project ID of the project that contains the event.
+ * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php new file mode 100644 index 000000000000..153cc3856dfb --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php @@ -0,0 +1,117 @@ +google.cloud.servicehealth.v1.GetOrganizationEventRequest + */ +class GetOrganizationEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique name of the event in this scope including organization and + * event ID using the form + * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Unique name of the event in this scope including organization and + * event ID using the form + * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + * + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `event_id` - Organization event ID to retrieve. Please see + * {@see ServiceHealthClient::organizationEventName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\GetOrganizationEventRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique name of the event in this scope including organization and + * event ID using the form + * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `event_id` - Organization event ID to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique name of the event in this scope including organization and + * event ID using the form + * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique name of the event in this scope including organization and + * event ID using the form + * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php new file mode 100644 index 000000000000..bda3b054602c --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php @@ -0,0 +1,117 @@ +google.cloud.servicehealth.v1.GetOrganizationImpactRequest + */ +class GetOrganizationImpactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource using the form + * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource using the form + * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + * + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). Please see + * {@see ServiceHealthClient::organizationImpactName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\GetOrganizationImpactRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource using the form + * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource using the form + * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource using the form + * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php new file mode 100644 index 000000000000..74f9cdb89ba1 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php @@ -0,0 +1,324 @@ +google.cloud.servicehealth.v1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value using the form + * `projects/{project_id}/locations/{location}/events`. + * `project_id` - ID of the project for which to list service health + * events. + * `location` - The location to get the service health events from. + * To retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are 1 to 100, inclusive. (The default value is 10.) If more results + * are available, the service returns a next_page_token that you can use to + * get the next page of results in subsequent list requests. The service may + * return fewer events than the requested page_size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListEvents` call to retrieve the + * next page of results. When paginating, all other parameters provided to + * `ListEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms:
+ * * field=value for `category` and `state`
+ * * field <, >, <=, or >= value for `update_time`
+ * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + * `event_impacts.product.product_name:"Eventarc"` + *
+ * Multiple filter queries are separated by spaces. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time`, `event_impacts.product.product_name` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Event fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value using the form + * `projects/{project_id}/locations/{location}/events`. + * + * `project_id` - ID of the project for which to list service health + * events. + * `location` - The location to get the service health events from. + * To retrieve service health events of category = INCIDENT, use `location` = + * `global`. Please see + * {@see ServiceHealthClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\ListEventsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value using the form + * `projects/{project_id}/locations/{location}/events`. + * `project_id` - ID of the project for which to list service health + * events. + * `location` - The location to get the service health events from. + * To retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * @type int $page_size + * Optional. The maximum number of events that should be returned. Acceptable + * values are 1 to 100, inclusive. (The default value is 10.) If more results + * are available, the service returns a next_page_token that you can use to + * get the next page of results in subsequent list requests. The service may + * return fewer events than the requested page_size. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListEvents` call to retrieve the + * next page of results. When paginating, all other parameters provided to + * `ListEvents` must match the call that provided the page token. + * @type string $filter + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms:
+ * * field=value for `category` and `state`
+ * * field <, >, <=, or >= value for `update_time`
+ * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + * `event_impacts.product.product_name:"Eventarc"` + *
+ * Multiple filter queries are separated by spaces. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time`, `event_impacts.product.product_name` + * @type int $view + * Optional. Event fields to include in response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value using the form + * `projects/{project_id}/locations/{location}/events`. + * `project_id` - ID of the project for which to list service health + * events. + * `location` - The location to get the service health events from. + * To retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value using the form + * `projects/{project_id}/locations/{location}/events`. + * `project_id` - ID of the project for which to list service health + * events. + * `location` - The location to get the service health events from. + * To retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are 1 to 100, inclusive. (The default value is 10.) If more results + * are available, the service returns a next_page_token that you can use to + * get the next page of results in subsequent list requests. The service may + * return fewer events than the requested page_size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are 1 to 100, inclusive. (The default value is 10.) If more results + * are available, the service returns a next_page_token that you can use to + * get the next page of results in subsequent list requests. The service may + * return fewer events than the requested page_size. + * + * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListEvents` call to retrieve the + * next page of results. When paginating, all other parameters provided to + * `ListEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListEvents` call to retrieve the + * next page of results. When paginating, all other parameters provided to + * `ListEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms:
+ * * field=value for `category` and `state`
+ * * field <, >, <=, or >= value for `update_time`
+ * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + * `event_impacts.product.product_name:"Eventarc"` + *
+ * Multiple filter queries are separated by spaces. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time`, `event_impacts.product.product_name` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms:
+ * * field=value for `category` and `state`
+ * * field <, >, <=, or >= value for `update_time`
+ * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + * `event_impacts.product.product_name:"Eventarc"` + *
+ * Multiple filter queries are separated by spaces. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time`, `event_impacts.product.product_name` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Event fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Event fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\EventView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php new file mode 100644 index 000000000000..1a1f66ef88ab --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php @@ -0,0 +1,147 @@ +google.cloud.servicehealth.v1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. List of events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $events; + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as page_token to retrieve + * the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ServiceHealth\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * Output only. List of events. + * @type string $next_page_token + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as page_token to retrieve + * the next page. + * If this field is not present, there are no subsequent results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. List of events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Output only. List of events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as page_token to retrieve + * the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as page_token to retrieve + * the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php new file mode 100644 index 000000000000..084a6059a37e --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php @@ -0,0 +1,330 @@ +google.cloud.servicehealth.v1.ListOrganizationEventsRequest + */ +class ListOrganizationEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. (The default value is `10`.) If more + * results are available, the service returns a `next_page_token` that you can + * use to get the next page of results in subsequent list requests. The + * service may return fewer events than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListOrganizationEvents` call to + * retrieve the next page of results. + * When paginating, all other parameters provided to + * `ListOrganizationEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms: + * * field=value for `category` and `state` + * * field <, >, <=, or >= value for `update_time` + * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + * Multiple filter queries are space-separated. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. OrganizationEvent fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents`. + * + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. Please see + * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\ListOrganizationEventsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * @type int $page_size + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. (The default value is `10`.) If more + * results are available, the service returns a `next_page_token` that you can + * use to get the next page of results in subsequent list requests. The + * service may return fewer events than the requested `page_size`. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListOrganizationEvents` call to + * retrieve the next page of results. + * When paginating, all other parameters provided to + * `ListOrganizationEvents` must match the call that provided the page token. + * @type string $filter + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms: + * * field=value for `category` and `state` + * * field <, >, <=, or >= value for `update_time` + * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + * Multiple filter queries are space-separated. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time` + * @type int $view + * Optional. OrganizationEvent fields to include in response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. (The default value is `10`.) If more + * results are available, the service returns a `next_page_token` that you can + * use to get the next page of results in subsequent list requests. The + * service may return fewer events than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. (The default value is `10`.) If more + * results are available, the service returns a `next_page_token` that you can + * use to get the next page of results in subsequent list requests. The + * service may return fewer events than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListOrganizationEvents` call to + * retrieve the next page of results. + * When paginating, all other parameters provided to + * `ListOrganizationEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * Provide Page token returned by a previous `ListOrganizationEvents` call to + * retrieve the next page of results. + * When paginating, all other parameters provided to + * `ListOrganizationEvents` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms: + * * field=value for `category` and `state` + * * field <, >, <=, or >= value for `update_time` + * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + * Multiple filter queries are space-separated. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression takes the following forms: + * * field=value for `category` and `state` + * * field <, >, <=, or >= value for `update_time` + * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + * Multiple filter queries are space-separated. Example: + * `category=INCIDENT state=ACTIVE`. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `category`, `state`, + * `update_time` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. OrganizationEvent fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. OrganizationEvent fields to include in response. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEventView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php new file mode 100644 index 000000000000..81b50e7246da --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php @@ -0,0 +1,147 @@ +google.cloud.servicehealth.v1.ListOrganizationEventsResponse + */ +class ListOrganizationEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. List of organization events affecting an organization. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $organization_events; + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ServiceHealth\V1\OrganizationEvent>|\Google\Protobuf\Internal\RepeatedField $organization_events + * Output only. List of organization events affecting an organization. + * @type string $next_page_token + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. List of organization events affecting an organization. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrganizationEvents() + { + return $this->organization_events; + } + + /** + * Output only. List of organization events affecting an organization. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\OrganizationEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrganizationEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\OrganizationEvent::class); + $this->organization_events = $arr; + + return $this; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php new file mode 100644 index 000000000000..07bee44080ca --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php @@ -0,0 +1,293 @@ +google.cloud.servicehealth.v1.ListOrganizationImpactsRequest + */ +class ListOrganizationImpactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. The default value is `10`. + * If more results are available, the service returns a + * `next_page_token` that can be used to get the next page of results in + * subsequent list requests. The service may return fewer + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * Provide `page_token` returned by a previous `ListOrganizationImpacts` call + * to retrieve the next page of results. + * When paginating, all other parameters provided to `ListOrganizationImpacts` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression is in the form of `field:value` for checking if a + * repeated field contains a value. + * Example: + * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + * To get your `{organization_id}`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * Multiple filter queries are separated by spaces. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `events`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts`. + * + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). Please see + * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\ServiceHealth\V1\ListOrganizationImpactsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * @type int $page_size + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. The default value is `10`. + * If more results are available, the service returns a + * `next_page_token` that can be used to get the next page of results in + * subsequent list requests. The service may return fewer + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * than the requested `page_size`. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Provide `page_token` returned by a previous `ListOrganizationImpacts` call + * to retrieve the next page of results. + * When paginating, all other parameters provided to `ListOrganizationImpacts` + * must match the call that provided the page token. + * @type string $filter + * Optional. A filter expression that filters resources listed in the + * response. The expression is in the form of `field:value` for checking if a + * repeated field contains a value. + * Example: + * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + * To get your `{organization_id}`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * Multiple filter queries are separated by spaces. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `events`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts`. + * `organization_id` - ID (number) of the project that contains the event. To + * get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. The default value is `10`. + * If more results are available, the service returns a + * `next_page_token` that can be used to get the next page of results in + * subsequent list requests. The service may return fewer + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of events that should be returned. Acceptable + * values are `1` to `100`, inclusive. The default value is `10`. + * If more results are available, the service returns a + * `next_page_token` that can be used to get the next page of results in + * subsequent list requests. The service may return fewer + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * than the requested `page_size`. + * + * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. + * Provide `page_token` returned by a previous `ListOrganizationImpacts` call + * to retrieve the next page of results. + * When paginating, all other parameters provided to `ListOrganizationImpacts` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * Provide `page_token` returned by a previous `ListOrganizationImpacts` call + * to retrieve the next page of results. + * When paginating, all other parameters provided to `ListOrganizationImpacts` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression is in the form of `field:value` for checking if a + * repeated field contains a value. + * Example: + * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + * To get your `{organization_id}`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * Multiple filter queries are separated by spaces. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `events`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter expression that filters resources listed in the + * response. The expression is in the form of `field:value` for checking if a + * repeated field contains a value. + * Example: + * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + * To get your `{organization_id}`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + * Multiple filter queries are separated by spaces. + * By default, each expression is an AND expression. However, you can include + * AND and OR expressions explicitly. + * Filter is supported for the following fields: `events`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php new file mode 100644 index 000000000000..51d8ed1f7a3c --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php @@ -0,0 +1,156 @@ +google.cloud.servicehealth.v1.ListOrganizationImpactsResponse + */ +class ListOrganizationImpactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. List of + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * for an organization affected by service health events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $organization_impacts; + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ServiceHealth\V1\OrganizationImpact>|\Google\Protobuf\Internal\RepeatedField $organization_impacts + * Output only. List of + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * for an organization affected by service health events. + * @type string $next_page_token + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. List of + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * for an organization affected by service health events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrganizationImpacts() + { + return $this->organization_impacts; + } + + /** + * Output only. List of + * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + * for an organization affected by service health events. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\OrganizationImpact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrganizationImpacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\OrganizationImpact::class); + $this->organization_impacts = $arr; + + return $this; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. The continuation token, used to page through large result + * sets. Provide this value in a subsequent request as `page_token` to + * retrieve the next page. + * If this field is not present, there are no subsequent results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php new file mode 100644 index 000000000000..84713b672fcc --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php @@ -0,0 +1,67 @@ +google.cloud.servicehealth.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * Location impacted by the event. Example: `"us-central1"` + * + * Generated from protobuf field string location_name = 1; + */ + protected $location_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location_name + * Location impacted by the event. Example: `"us-central1"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Location impacted by the event. Example: `"us-central1"` + * + * Generated from protobuf field string location_name = 1; + * @return string + */ + public function getLocationName() + { + return $this->location_name; + } + + /** + * Location impacted by the event. Example: `"us-central1"` + * + * Generated from protobuf field string location_name = 1; + * @param string $var + * @return $this + */ + public function setLocationName($var) + { + GPBUtil::checkString($var, True); + $this->location_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php new file mode 100644 index 000000000000..3ce8b071737d --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php @@ -0,0 +1,595 @@ +google.cloud.servicehealth.v1.OrganizationEvent + */ +class OrganizationEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including organization ID and location using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. + * `organization_id` - see [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from.
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $title = ''; + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $category = 0; + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $detailed_category = 0; + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $detailed_state = 0; + /** + * Output only. Represents the Google Cloud products and locations impacted by + * the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $event_impacts; + /** + * Output only. Incident-only field. Event updates are correspondence from + * Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $updates; + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent_event = ''; + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Incident-only field. The time when the next update can be + * expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including organization ID and location using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. + * `organization_id` - see [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from.
+ * `event_id` - Organization event ID to retrieve. + * @type string $title + * Output only. Brief description for the event. + * @type string $description + * Output only. Free-form, human-readable description. + * @type int $category + * Output only. The category of the event. + * @type int $detailed_category + * Output only. The detailed category of the event. + * @type int $state + * Output only. The current state of the event. + * @type int $detailed_state + * Output only. The current detailed state of the incident. + * @type array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $event_impacts + * Output only. Represents the Google Cloud products and locations impacted by + * the event. + * @type array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $updates + * Output only. Incident-only field. Event updates are correspondence from + * Google. + * @type string $parent_event + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the update was posted. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The start time of the event, if applicable. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The end time of the event, if applicable. + * @type \Google\Protobuf\Timestamp $next_update_time + * Output only. Incident-only field. The time when the next update can be + * expected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including organization ID and location using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. + * `organization_id` - see [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from.
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. Name of the event. Unique name of the event in + * this scope including organization ID and location using the form + * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. + * `organization_id` - see [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `location` - The location to get the service health events from.
+ * `event_id` - Organization event ID to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Output only. Brief description for the event. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Free-form, human-readable description. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * Output only. The category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\EventCategory::class); + $this->category = $var; + + return $this; + } + + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDetailedCategory() + { + return $this->detailed_category; + } + + /** + * Output only. The detailed category of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDetailedCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\DetailedCategory::class); + $this->detailed_category = $var; + + return $this; + } + + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the event. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDetailedState() + { + return $this->detailed_state; + } + + /** + * Output only. The current detailed state of the incident. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDetailedState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\DetailedState::class); + $this->detailed_state = $var; + + return $this; + } + + /** + * Output only. Represents the Google Cloud products and locations impacted by + * the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventImpacts() + { + return $this->event_impacts; + } + + /** + * Output only. Represents the Google Cloud products and locations impacted by + * the event. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventImpacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventImpact::class); + $this->event_impacts = $arr; + + return $this; + } + + /** + * Output only. Incident-only field. Event updates are correspondence from + * Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpdates() + { + return $this->updates; + } + + /** + * Output only. Incident-only field. Event updates are correspondence from + * Google. + * + * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpdates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventUpdate::class); + $this->updates = $arr; + + return $this; + } + + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParentEvent() + { + return $this->parent_event; + } + + /** + * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + * name of the parent event. All further updates will be published to the + * parent event. + * + * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParentEvent($var) + { + GPBUtil::checkString($var, True); + $this->parent_event = $var; + + return $this; + } + + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the update was posted. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The start time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The end time of the event, if applicable. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Incident-only field. The time when the next update can be + * expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextUpdateTime() + { + return $this->next_update_time; + } + + public function hasNextUpdateTime() + { + return isset($this->next_update_time); + } + + public function clearNextUpdateTime() + { + unset($this->next_update_time); + } + + /** + * Output only. Incident-only field. The time when the next update can be + * expected. + * + * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php new file mode 100644 index 000000000000..c9beabfdc6d5 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php @@ -0,0 +1,67 @@ +google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory + */ +class DetailedCategory +{ + /** + * Unspecified detailed category. + * + * Generated from protobuf enum DETAILED_CATEGORY_UNSPECIFIED = 0; + */ + const DETAILED_CATEGORY_UNSPECIFIED = 0; + /** + * Indicates an event with category INCIDENT has a confirmed impact to at + * least one Google Cloud product. + * + * Generated from protobuf enum CONFIRMED_INCIDENT = 1; + */ + const CONFIRMED_INCIDENT = 1; + /** + * Indicates an event with category INCIDENT is under investigation to + * determine if it has a confirmed impact on any Google Cloud products. + * + * Generated from protobuf enum EMERGING_INCIDENT = 2; + */ + const EMERGING_INCIDENT = 2; + + private static $valueToName = [ + self::DETAILED_CATEGORY_UNSPECIFIED => 'DETAILED_CATEGORY_UNSPECIFIED', + self::CONFIRMED_INCIDENT => 'CONFIRMED_INCIDENT', + self::EMERGING_INCIDENT => 'EMERGING_INCIDENT', + ]; + + 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(DetailedCategory::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_DetailedCategory::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php new file mode 100644 index 000000000000..6771b385b777 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php @@ -0,0 +1,104 @@ +google.cloud.servicehealth.v1.OrganizationEvent.DetailedState + */ +class DetailedState +{ + /** + * Unspecified detail state. + * + * Generated from protobuf enum DETAILED_STATE_UNSPECIFIED = 0; + */ + const DETAILED_STATE_UNSPECIFIED = 0; + /** + * Google engineers are actively investigating the incident to determine the + * impact. + * + * Generated from protobuf enum EMERGING = 1; + */ + const EMERGING = 1; + /** + * The incident is confirmed and impacting at least one Google Cloud + * product. Ongoing status updates will be provided until it is resolved. + * + * Generated from protobuf enum CONFIRMED = 2; + */ + const CONFIRMED = 2; + /** + * The incident is no longer affecting any Google Cloud product, and there + * will be no further updates. + * + * Generated from protobuf enum RESOLVED = 3; + */ + const RESOLVED = 3; + /** + * The incident was merged into a parent event. All further updates will be + * published to the parent only. The `parent_event` contains the name of the + * parent. + * + * Generated from protobuf enum MERGED = 4; + */ + const MERGED = 4; + /** + * The incident was automatically closed because of the following reasons: + * * The impact of the incident could not be confirmed. + * * The incident was intermittent or resolved itself. + * The incident does not have a resolution because no action or + * investigation happened. If it is intermittent, the incident may reopen. + * + * Generated from protobuf enum AUTO_CLOSED = 9; + */ + const AUTO_CLOSED = 9; + /** + * Upon investigation, Google engineers concluded that the incident is not + * affecting a Google Cloud product. This state can change if the incident + * is reviewed again. + * + * Generated from protobuf enum FALSE_POSITIVE = 10; + */ + const FALSE_POSITIVE = 10; + + private static $valueToName = [ + self::DETAILED_STATE_UNSPECIFIED => 'DETAILED_STATE_UNSPECIFIED', + self::EMERGING => 'EMERGING', + self::CONFIRMED => 'CONFIRMED', + self::RESOLVED => 'RESOLVED', + self::MERGED => 'MERGED', + self::AUTO_CLOSED => 'AUTO_CLOSED', + self::FALSE_POSITIVE => 'FALSE_POSITIVE', + ]; + + 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(DetailedState::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_DetailedState::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php new file mode 100644 index 000000000000..d69c7230a46b --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php @@ -0,0 +1,58 @@ +google.cloud.servicehealth.v1.OrganizationEvent.EventCategory + */ +class EventCategory +{ + /** + * Unspecified category. + * + * Generated from protobuf enum EVENT_CATEGORY_UNSPECIFIED = 0; + */ + const EVENT_CATEGORY_UNSPECIFIED = 0; + /** + * Event category for service outage or degradation. + * + * Generated from protobuf enum INCIDENT = 2; + */ + const INCIDENT = 2; + + private static $valueToName = [ + self::EVENT_CATEGORY_UNSPECIFIED => 'EVENT_CATEGORY_UNSPECIFIED', + self::INCIDENT => 'INCIDENT', + ]; + + 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(EventCategory::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_EventCategory::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php new file mode 100644 index 000000000000..be2b5ab26b46 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php @@ -0,0 +1,67 @@ +google.cloud.servicehealth.v1.OrganizationEvent.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Event is actively affecting a Google Cloud product and will continue to + * receive updates. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Event is no longer affecting the Google Cloud product or has been merged + * with another event. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CLOSED => 'CLOSED', + ]; + + 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(State::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_State::class); + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php new file mode 100644 index 000000000000..709b78d64895 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php @@ -0,0 +1,63 @@ +google.cloud.servicehealth.v1.OrganizationEventView + */ +class OrganizationEventView +{ + /** + * Unspecified event view. Default to `ORGANIZATION_EVENT_VIEW_BASIC`. + * + * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0; + */ + const ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0; + /** + * Includes all organization event fields except `updates`. This view is the + * default for ListOrganizationEvents API. + * + * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_BASIC = 1; + */ + const ORGANIZATION_EVENT_VIEW_BASIC = 1; + /** + * Includes all organization event fields. + * + * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_FULL = 2; + */ + const ORGANIZATION_EVENT_VIEW_FULL = 2; + + private static $valueToName = [ + self::ORGANIZATION_EVENT_VIEW_UNSPECIFIED => 'ORGANIZATION_EVENT_VIEW_UNSPECIFIED', + self::ORGANIZATION_EVENT_VIEW_BASIC => 'ORGANIZATION_EVENT_VIEW_BASIC', + self::ORGANIZATION_EVENT_VIEW_FULL => 'ORGANIZATION_EVENT_VIEW_FULL', + ]; + + 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/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php new file mode 100644 index 000000000000..b665c2fc8e3c --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php @@ -0,0 +1,222 @@ +google.cloud.servicehealth.v1.OrganizationImpact + */ +class OrganizationImpact extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. Unique name of the organization impact in this + * scope including organization and location using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. A list of event names impacting the asset. + * + * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $events; + /** + * Output only. Google Cloud asset possibly impacted by the specified events. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset = null; + /** + * Output only. The time when the affected project was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. Unique name of the organization impact in this + * scope including organization and location using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * @type array|\Google\Protobuf\Internal\RepeatedField $events + * Output only. A list of event names impacting the asset. + * @type \Google\Cloud\ServiceHealth\V1\Asset $asset + * Output only. Google Cloud asset possibly impacted by the specified events. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the affected project was last modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. Unique name of the organization impact in this + * scope including organization and location using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. Unique name of the organization impact in this + * scope including organization and location using the form + * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. + * `organization_id` - ID (number) of the organization that contains the + * event. To get your `organization_id`, see + * [Getting your organization resource + * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. A list of event names impacting the asset. + * + * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Output only. A list of event names impacting the asset. + * + * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->events = $arr; + + return $this; + } + + /** + * Output only. Google Cloud asset possibly impacted by the specified events. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\ServiceHealth\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Output only. Google Cloud asset possibly impacted by the specified events. + * + * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\ServiceHealth\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Output only. The time when the affected project was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the affected project was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php new file mode 100644 index 000000000000..e14abef859df --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php @@ -0,0 +1,101 @@ +google.cloud.servicehealth.v1.Product + */ +class Product extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` + * + * Generated from protobuf field string product_name = 1; + */ + protected $product_name = ''; + /** + * Unique identifier for the product. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $product_name + * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` + * @type string $id + * Unique identifier for the product. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` + * + * Generated from protobuf field string product_name = 1; + * @return string + */ + public function getProductName() + { + return $this->product_name; + } + + /** + * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` + * + * Generated from protobuf field string product_name = 1; + * @param string $var + * @return $this + */ + public function setProductName($var) + { + GPBUtil::checkString($var, True); + $this->product_name = $var; + + return $this; + } + + /** + * Unique identifier for the product. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Unique identifier for the product. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php new file mode 100644 index 000000000000..eed14dc892b2 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php @@ -0,0 +1,77 @@ + + * `location` - The location to get the service health events from.
+ * `event_id` - Event ID to retrieve. Please see + * {@see ServiceHealthClient::eventName()} for help formatting this field. + */ +function get_event_sample(string $formattedName): void +{ + // Create a client. + $serviceHealthClient = new ServiceHealthClient(); + + // Prepare the request message. + $request = (new GetEventRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $serviceHealthClient->getEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceHealthClient::eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); + + get_event_sample($formattedName); +} +// [END servicehealth_v1_generated_ServiceHealth_GetEvent_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php new file mode 100644 index 000000000000..6c55411fc23d --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END servicehealth_v1_generated_ServiceHealth_GetLocation_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php new file mode 100644 index 000000000000..784e1a3794bc --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php @@ -0,0 +1,84 @@ + + * `event_id` - Organization event ID to retrieve. Please see + * {@see ServiceHealthClient::organizationEventName()} for help formatting this field. + */ +function get_organization_event_sample(string $formattedName): void +{ + // Create a client. + $serviceHealthClient = new ServiceHealthClient(); + + // Prepare the request message. + $request = (new GetOrganizationEventRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OrganizationEvent $response */ + $response = $serviceHealthClient->getOrganizationEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceHealthClient::organizationEventName( + '[ORGANIZATION]', + '[LOCATION]', + '[EVENT]' + ); + + get_organization_event_sample($formattedName); +} +// [END servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php new file mode 100644 index 000000000000..d83a6d219351 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php @@ -0,0 +1,84 @@ + + * `organization_impact_id` - ID of the [OrganizationImpact + * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). Please see + * {@see ServiceHealthClient::organizationImpactName()} for help formatting this field. + */ +function get_organization_impact_sample(string $formattedName): void +{ + // Create a client. + $serviceHealthClient = new ServiceHealthClient(); + + // Prepare the request message. + $request = (new GetOrganizationImpactRequest()) + ->setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OrganizationImpact $response */ + $response = $serviceHealthClient->getOrganizationImpact($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceHealthClient::organizationImpactName( + '[ORGANIZATION]', + '[LOCATION]', + '[ORGANIZATION_IMPACT]' + ); + + get_organization_impact_sample($formattedName); +} +// [END servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php new file mode 100644 index 000000000000..3bbd650de70c --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $serviceHealthClient->listEvents($request); + + /** @var Event $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServiceHealthClient::locationName('[PROJECT]', '[LOCATION]'); + + list_events_sample($formattedParent); +} +// [END servicehealth_v1_generated_ServiceHealth_ListEvents_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php new file mode 100644 index 000000000000..0db0280af42b --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END servicehealth_v1_generated_ServiceHealth_ListLocations_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php new file mode 100644 index 000000000000..68f3ab0e9313 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php @@ -0,0 +1,85 @@ + + * `location` - The location to get the service health events from. To + * retrieve service health events of category = INCIDENT, use `location` = + * `global`. Please see + * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. + */ +function list_organization_events_sample(string $formattedParent): void +{ + // Create a client. + $serviceHealthClient = new ServiceHealthClient(); + + // Prepare the request message. + $request = (new ListOrganizationEventsRequest()) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $serviceHealthClient->listOrganizationEvents($request); + + /** @var OrganizationEvent $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServiceHealthClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + + list_organization_events_sample($formattedParent); +} +// [END servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php new file mode 100644 index 000000000000..5509a7bf85d2 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $serviceHealthClient->listOrganizationImpacts($request); + + /** @var OrganizationImpact $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServiceHealthClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + + list_organization_impacts_sample($formattedParent); +} +// [END servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php b/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php new file mode 100644 index 000000000000..2440dde62645 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php @@ -0,0 +1,523 @@ + getEventAsync(GetEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrganizationEventAsync(GetOrganizationEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrganizationImpactAsync(GetOrganizationImpactRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrganizationEventsAsync(ListOrganizationEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrganizationImpactsAsync(ListOrganizationImpactsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ServiceHealthClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.servicehealth.v1.ServiceHealth'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'servicehealth.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'servicehealth.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/service_health_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/service_health_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/service_health_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/service_health_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a event + * resource. + * + * @param string $project + * @param string $location + * @param string $event + * + * @return string The formatted event resource. + */ + public static function eventName(string $project, string $location, string $event): string + { + return self::getPathTemplate('event')->render([ + 'project' => $project, + 'location' => $location, + 'event' => $event, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_event resource. + * + * @param string $organization + * @param string $location + * @param string $event + * + * @return string The formatted organization_event resource. + */ + public static function organizationEventName(string $organization, string $location, string $event): string + { + return self::getPathTemplate('organizationEvent')->render([ + 'organization' => $organization, + 'location' => $location, + 'event' => $event, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_impact resource. + * + * @param string $organization + * @param string $location + * @param string $organizationImpact + * + * @return string The formatted organization_impact resource. + */ + public static function organizationImpactName(string $organization, string $location, string $organizationImpact): string + { + return self::getPathTemplate('organizationImpact')->render([ + 'organization' => $organization, + 'location' => $location, + 'organization_impact' => $organizationImpact, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - event: projects/{project}/locations/{location}/events/{event} + * - location: projects/{project}/locations/{location} + * - organizationEvent: organizations/{organization}/locations/{location}/organizationEvents/{event} + * - organizationImpact: organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact} + * - organizationLocation: organizations/{organization}/locations/{location} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'servicehealth.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 + * $apiEndpoint 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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieves a resource containing information about an event. + * + * The async variant is {@see ServiceHealthClient::getEventAsync()} . + * + * @example samples/V1/ServiceHealthClient/get_event.php + * + * @param GetEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Event + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEvent(GetEventRequest $request, array $callOptions = []): Event + { + return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about an event affecting an + * organization . + * + * The async variant is {@see ServiceHealthClient::getOrganizationEventAsync()} . + * + * @example samples/V1/ServiceHealthClient/get_organization_event.php + * + * @param GetOrganizationEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OrganizationEvent + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrganizationEvent(GetOrganizationEventRequest $request, array $callOptions = []): OrganizationEvent + { + return $this->startApiCall('GetOrganizationEvent', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about impact to an asset under + * an organization affected by a service health event. + * + * The async variant is {@see ServiceHealthClient::getOrganizationImpactAsync()} . + * + * @example samples/V1/ServiceHealthClient/get_organization_impact.php + * + * @param GetOrganizationImpactRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OrganizationImpact + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrganizationImpact(GetOrganizationImpactRequest $request, array $callOptions = []): OrganizationImpact + { + return $this->startApiCall('GetOrganizationImpact', $request, $callOptions)->wait(); + } + + /** + * Lists events under a given project and location. + * + * The async variant is {@see ServiceHealthClient::listEventsAsync()} . + * + * @example samples/V1/ServiceHealthClient/list_events.php + * + * @param ListEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEvents', $request, $callOptions); + } + + /** + * Lists organization events under a given organization and location. + * + * The async variant is {@see ServiceHealthClient::listOrganizationEventsAsync()} . + * + * @example samples/V1/ServiceHealthClient/list_organization_events.php + * + * @param ListOrganizationEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listOrganizationEvents(ListOrganizationEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrganizationEvents', $request, $callOptions); + } + + /** + * Lists assets impacted by organization events under a given organization and + * location. + * + * The async variant is {@see ServiceHealthClient::listOrganizationImpactsAsync()} + * . + * + * @example samples/V1/ServiceHealthClient/list_organization_impacts.php + * + * @param ListOrganizationImpactsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listOrganizationImpacts(ListOrganizationImpactsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrganizationImpacts', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ServiceHealthClient::getLocationAsync()} . + * + * @example samples/V1/ServiceHealthClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ServiceHealthClient::listLocationsAsync()} . + * + * @example samples/V1/ServiceHealthClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..ea29794dad5b --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.servicehealth.v1", + "libraryPackage": "Google\\Cloud\\ServiceHealth\\V1", + "services": { + "ServiceHealth": { + "clients": { + "grpc": { + "libraryClient": "ServiceHealthGapicClient", + "rpcs": { + "GetEvent": { + "methods": [ + "getEvent" + ] + }, + "GetOrganizationEvent": { + "methods": [ + "getOrganizationEvent" + ] + }, + "GetOrganizationImpact": { + "methods": [ + "getOrganizationImpact" + ] + }, + "ListEvents": { + "methods": [ + "listEvents" + ] + }, + "ListOrganizationEvents": { + "methods": [ + "listOrganizationEvents" + ] + }, + "ListOrganizationImpacts": { + "methods": [ + "listOrganizationImpacts" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json new file mode 100644 index 000000000000..071189090bc2 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json @@ -0,0 +1,86 @@ +{ + "interfaces": { + "google.cloud.servicehealth.v1.ServiceHealth": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "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": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetEvent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOrganizationEvent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOrganizationImpact": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEvents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListOrganizationEvents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListOrganizationImpacts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php new file mode 100644 index 000000000000..8fe43a3ff078 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php @@ -0,0 +1,165 @@ + [ + 'google.cloud.servicehealth.v1.ServiceHealth' => [ + 'GetEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\OrganizationEvent', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationImpact' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\OrganizationImpact', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizationEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrganizationEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListOrganizationEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizationImpacts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrganizationImpacts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListOrganizationImpactsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'event' => 'projects/{project}/locations/{location}/events/{event}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationEvent' => 'organizations/{organization}/locations/{location}/organizationEvents/{event}', + 'organizationImpact' => 'organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php new file mode 100644 index 000000000000..536ed3492f3d --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php @@ -0,0 +1,119 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.servicehealth.v1.ServiceHealth' => [ + 'GetEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/organizationEvents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationImpact' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/organizationImpacts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/events', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizationEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/organizationEvents', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrganizationImpacts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/organizationImpacts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php b/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php new file mode 100644 index 000000000000..c66e1ca2a194 --- /dev/null +++ b/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php @@ -0,0 +1,655 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ServiceHealthClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ServiceHealthClient($options); + } + + /** @test */ + public function getEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $parentEvent = 'parentEvent1393243845'; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setParentEvent($parentEvent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + try { + $gapicClient->getEvent($request); + // If the $gapicClient 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 getOrganizationEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $parentEvent = 'parentEvent1393243845'; + $expectedResponse = new OrganizationEvent(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setParentEvent($parentEvent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->organizationEventName('[ORGANIZATION]', '[LOCATION]', '[EVENT]'); + $request = (new GetOrganizationEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrganizationEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetOrganizationEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->organizationEventName('[ORGANIZATION]', '[LOCATION]', '[EVENT]'); + $request = (new GetOrganizationEventRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrganizationEvent($request); + // If the $gapicClient 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 getOrganizationImpactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new OrganizationImpact(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->organizationImpactName('[ORGANIZATION]', '[LOCATION]', '[ORGANIZATION_IMPACT]'); + $request = (new GetOrganizationImpactRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrganizationImpact($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetOrganizationImpact', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationImpactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->organizationImpactName('[ORGANIZATION]', '[LOCATION]', '[ORGANIZATION_IMPACT]'); + $request = (new GetOrganizationImpactRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrganizationImpact($request); + // If the $gapicClient 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(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventsElement = new Event(); + $events = [ + $eventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEvents($events); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEvents($request); + // If the $gapicClient 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 listOrganizationEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $organizationEventsElement = new OrganizationEvent(); + $organizationEvents = [ + $organizationEventsElement, + ]; + $expectedResponse = new ListOrganizationEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrganizationEvents($organizationEvents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListOrganizationEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOrganizationEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrganizationEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListOrganizationEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrganizationEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListOrganizationEventsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOrganizationEvents($request); + // If the $gapicClient 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 listOrganizationImpactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $organizationImpactsElement = new OrganizationImpact(); + $organizationImpacts = [ + $organizationImpactsElement, + ]; + $expectedResponse = new ListOrganizationImpactsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrganizationImpacts($organizationImpacts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListOrganizationImpactsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOrganizationImpacts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrganizationImpacts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListOrganizationImpacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrganizationImpactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListOrganizationImpactsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOrganizationImpacts($request); + // If the $gapicClient 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient 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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient 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 getEventAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $parentEvent = 'parentEvent1393243845'; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setParentEvent($parentEvent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getEventAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From fbfd101d3c50daf1f1bb2bf3e096b343bb889648 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 19 Dec 2024 05:03:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= 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 --- ServiceHealth/src/V1/GetEventRequest.php | 2 +- .../src/V1/GetOrganizationEventRequest.php | 2 +- .../src/V1/GetOrganizationImpactRequest.php | 2 +- ServiceHealth/src/V1/ListEventsRequest.php | 2 +- ServiceHealth/src/V1/ListEventsResponse.php | 2 +- .../src/V1/ListOrganizationEventsRequest.php | 2 +- .../src/V1/ListOrganizationEventsResponse.php | 2 +- .../src/V1/ListOrganizationImpactsRequest.php | 2 +- .../V1/ListOrganizationImpactsResponse.php | 3 +- .../Cloud/Servicehealth/V1/EventResources.php | Bin 6502 -> 0 bytes .../Cloud/Servicehealth/V1/EventService.php | 39 -- .../Google/Cloud/ServiceHealth/V1/Asset.php | 113 --- .../Google/Cloud/ServiceHealth/V1/Event.php | 605 ---------------- .../V1/Event/DetailedCategory.php | 67 -- .../ServiceHealth/V1/Event/DetailedState.php | 104 --- .../ServiceHealth/V1/Event/EventCategory.php | 58 -- .../ServiceHealth/V1/Event/Relevance.php | 90 --- .../Cloud/ServiceHealth/V1/Event/State.php | 66 -- .../Cloud/ServiceHealth/V1/EventImpact.php | 121 ---- .../Cloud/ServiceHealth/V1/EventUpdate.php | 213 ------ .../Cloud/ServiceHealth/V1/EventView.php | 63 -- .../ServiceHealth/V1/GetEventRequest.php | 107 --- .../V1/GetOrganizationEventRequest.php | 117 ---- .../V1/GetOrganizationImpactRequest.php | 117 ---- .../ServiceHealth/V1/ListEventsRequest.php | 324 --------- .../ServiceHealth/V1/ListEventsResponse.php | 147 ---- .../V1/ListOrganizationEventsRequest.php | 330 --------- .../V1/ListOrganizationEventsResponse.php | 147 ---- .../V1/ListOrganizationImpactsRequest.php | 293 -------- .../V1/ListOrganizationImpactsResponse.php | 156 ----- .../Cloud/ServiceHealth/V1/Location.php | 67 -- .../ServiceHealth/V1/OrganizationEvent.php | 595 ---------------- .../V1/OrganizationEvent/DetailedCategory.php | 67 -- .../V1/OrganizationEvent/DetailedState.php | 104 --- .../V1/OrganizationEvent/EventCategory.php | 58 -- .../V1/OrganizationEvent/State.php | 67 -- .../V1/OrganizationEventView.php | 63 -- .../ServiceHealth/V1/OrganizationImpact.php | 222 ------ .../Google/Cloud/ServiceHealth/V1/Product.php | 101 --- .../V1/ServiceHealthClient/get_event.php | 77 -- .../V1/ServiceHealthClient/get_location.php | 57 -- .../get_organization_event.php | 84 --- .../get_organization_impact.php | 84 --- .../V1/ServiceHealthClient/list_events.php | 83 --- .../V1/ServiceHealthClient/list_locations.php | 62 -- .../list_organization_events.php | 85 --- .../list_organization_impacts.php | 83 --- .../v1/src/V1/Client/ServiceHealthClient.php | 523 -------------- .../v1/src/V1/gapic_metadata.json | 58 -- .../service_health_client_config.json | 86 --- .../service_health_descriptor_config.php | 165 ----- .../service_health_rest_client_config.php | 119 ---- .../V1/Client/ServiceHealthClientTest.php | 655 ------------------ 53 files changed, 10 insertions(+), 6851 deletions(-) delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventService.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Asset.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json delete mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php delete mode 100644 owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php diff --git a/ServiceHealth/src/V1/GetEventRequest.php b/ServiceHealth/src/V1/GetEventRequest.php index 004760acc0e2..ad4b0340679f 100644 --- a/ServiceHealth/src/V1/GetEventRequest.php +++ b/ServiceHealth/src/V1/GetEventRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for getting an event. + * Gets information about a specific event. * * Generated from protobuf message google.cloud.servicehealth.v1.GetEventRequest */ diff --git a/ServiceHealth/src/V1/GetOrganizationEventRequest.php b/ServiceHealth/src/V1/GetOrganizationEventRequest.php index a37764823ddc..153cc3856dfb 100644 --- a/ServiceHealth/src/V1/GetOrganizationEventRequest.php +++ b/ServiceHealth/src/V1/GetOrganizationEventRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for getting an organization event. + * Gets information about a specific event affecting an organization. * * Generated from protobuf message google.cloud.servicehealth.v1.GetOrganizationEventRequest */ diff --git a/ServiceHealth/src/V1/GetOrganizationImpactRequest.php b/ServiceHealth/src/V1/GetOrganizationImpactRequest.php index b59d14adad8d..bda3b054602c 100644 --- a/ServiceHealth/src/V1/GetOrganizationImpactRequest.php +++ b/ServiceHealth/src/V1/GetOrganizationImpactRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for getting an organization impact. + * Gets information about an event that affects a project under an organization. * * Generated from protobuf message google.cloud.servicehealth.v1.GetOrganizationImpactRequest */ diff --git a/ServiceHealth/src/V1/ListEventsRequest.php b/ServiceHealth/src/V1/ListEventsRequest.php index e472c6fa7e9a..74f9cdb89ba1 100644 --- a/ServiceHealth/src/V1/ListEventsRequest.php +++ b/ServiceHealth/src/V1/ListEventsRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of events. + * Requests list of events. * * Generated from protobuf message google.cloud.servicehealth.v1.ListEventsRequest */ diff --git a/ServiceHealth/src/V1/ListEventsResponse.php b/ServiceHealth/src/V1/ListEventsResponse.php index 789e8058ce9b..1a1f66ef88ab 100644 --- a/ServiceHealth/src/V1/ListEventsResponse.php +++ b/ServiceHealth/src/V1/ListEventsResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing events. + * Response to request for listing events. * * Generated from protobuf message google.cloud.servicehealth.v1.ListEventsResponse */ diff --git a/ServiceHealth/src/V1/ListOrganizationEventsRequest.php b/ServiceHealth/src/V1/ListOrganizationEventsRequest.php index 4030fc692bf3..084a6059a37e 100644 --- a/ServiceHealth/src/V1/ListOrganizationEventsRequest.php +++ b/ServiceHealth/src/V1/ListOrganizationEventsRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of organization events. + * Requests list of events that affect an organization. * * Generated from protobuf message google.cloud.servicehealth.v1.ListOrganizationEventsRequest */ diff --git a/ServiceHealth/src/V1/ListOrganizationEventsResponse.php b/ServiceHealth/src/V1/ListOrganizationEventsResponse.php index 59d09784b595..81b50e7246da 100644 --- a/ServiceHealth/src/V1/ListOrganizationEventsResponse.php +++ b/ServiceHealth/src/V1/ListOrganizationEventsResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing organization events. + * Response to request for listing organization events. * * Generated from protobuf message google.cloud.servicehealth.v1.ListOrganizationEventsResponse */ diff --git a/ServiceHealth/src/V1/ListOrganizationImpactsRequest.php b/ServiceHealth/src/V1/ListOrganizationImpactsRequest.php index 17794a7c3733..07bee44080ca 100644 --- a/ServiceHealth/src/V1/ListOrganizationImpactsRequest.php +++ b/ServiceHealth/src/V1/ListOrganizationImpactsRequest.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for requesting list of organization impacts. + * Requests list of projects under an organization affected by an event. * * Generated from protobuf message google.cloud.servicehealth.v1.ListOrganizationImpactsRequest */ diff --git a/ServiceHealth/src/V1/ListOrganizationImpactsResponse.php b/ServiceHealth/src/V1/ListOrganizationImpactsResponse.php index d63cff8ba58a..51d8ed1f7a3c 100644 --- a/ServiceHealth/src/V1/ListOrganizationImpactsResponse.php +++ b/ServiceHealth/src/V1/ListOrganizationImpactsResponse.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Message for response to listing organization impacts. + * Response to request for listing projects under an organization affected by an + * event. * * Generated from protobuf message google.cloud.servicehealth.v1.ListOrganizationImpactsResponse */ diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php b/owl-bot-staging/ServiceHealth/v1/proto/src/GPBMetadata/Google/Cloud/Servicehealth/V1/EventResources.php deleted file mode 100644 index 77bc3d3abbeb4761cd2aad43c83b45cc6d71351c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6502 zcmeHMPjlPG6)z}DA|LgKf@GIg?F2?VwW6kENT*Ir*KQyZWYN$hhoqEA!Wj-kt|ZhH z!2+OMC!<3TogR8@KR_=%w3C@0d+0alB{Tg5Ir{_j&|dnmi-iD^vcSZ-RR{jhc6`Ogh(UHbj+SPkPgR3N5qnP=IO{75Gx}|rMgtB zwVr;+*geY_Ii}UXsfEHZaeS}3BRg+<%ervJk+j2fEEJ}cd@MQE zm;_gsB#Ss>Yxs!j?E;+pPn{W_Q$|LoY>+{JkDTadhG`WF7gk+>Tqeq$8ePhFN87-F zI{N8owk&nykDnNx)0BSS_fZ+sYsa_BwecSO_Z_(Z4f0C7&4e;E88e||%$()6Z+e*e z$jI`PWEr{rruT~GC&oAHaD&(c`4350q?spf!8JF1(}E=IB=(lRRu;Zi;-UzPj^PYQ zI!1?aY(Y#zvhQUFCRlpm;*AFJ9&Wp1(|VDX2F|Sk1pG3kedD3CnC$Q)yDoHO=sNG0VEmwl6RfjcSEe5nXhn-xf0H6Y^j7*GE zBo4<;Z%GR~$$TWmG%6yNAz_gLIn!~Mr{h$eOeDLST#DKDAuNwa$XLWqC!#B{PemBQ zO;{P}mP?J)rZk{33HIteNHXxQn}X>Te3Q&?b2WK>X8aAur0xTtmo0}0tws~dL7WWx zOk^#Z$U{gC$*-MmP{s8~qVi){rAf^5Ond{j)dRKG?iQ7{TB$cb>F(EB4YjD1HMNxb zp11;Wtya`ZI3*R6`;g*U;UnCE+af!0am$s3;?b3b(@8R)^P<8 zYZVf{nyHv;dQ)xHs|N_a;4b8iZAyMKO ze>`Ue1dh;sa=yDnKkfV?{gl4~*r;2_`q22CiZbxm!O;6t4E==f!P%!vW=fA)Y^~2? z>kZsMYk6gEe4cQ8KQJozMVPrC%nchL-Or|2JVkY#-xplh0C;(l(buDsDPweIaDa~E z(Ggxn#|boYHXSD;ah({ZgCgi#XZ3NDDH-q5b)O=`%utE7DEK(1Mn2pqJ zfh1yH@n1MEM#1h+{+9q7Rl|1JK5UX-jj=-(F?6i*_xeW+T?|7fMk$(ZKw_jHldg@I z8Z^NcT@?gZH#+W^&q$!n6vRzfIx+@$QE{=a1o07EJ2S}h^b*EzEx&U`{HgW_IG-*h z|4slgXp}v|dX0z={e%?g34B#nQB>x?Td+<$ihu>-7J59ih~7KV53#vkpy}@Rz4Aw} zULnl6+_xWuI&;snQ8tDAZvk$*W(D&w9JlgB+#b-ly(`X3>aQn;l~4@dyCQ~DR$avN zO99@v%y2KZO$hB4*0I`{zHa;d?z~HXyP)^r2N?7zdw2qrLJ8o7Xx?*I{@VvTM~3|E0!iT3L?9U|cd#0Y zr03qb50Tv_BzyuBx8Vl6Z#dA@k0<*2El364?I|s-h+X+6tOrKR`_*bHw)CrdYu$iwxZ1>vi_0eRwI#T9*%YS8-d8cWgB|s&Be%Cn9l)=4 zZLC!svmtz1VO=c0bi~H|*bHZH7Efoq!4Ea_qr*oN-~SrBU7^?Z8G3D>X|ZejpVMCe zG6%VT^7kF@UY}p=vl$({*?$?67(}5!F$#qcNTGmJlq1N6R`#r(SwZlkO3Vc_exeqb nT|pl%Vd>|X_wV^P((kZa`M@QinternalAddGeneratedFile( - ' -¼ -1google/cloud/servicehealth/v1/event_service.protogoogle.cloud.servicehealth.v1google/api/client.proto3google/cloud/servicehealth/v1/event_resources.proto2ª - - ServiceHealth® - -ListEvents0.google.cloud.servicehealth.v1.ListEventsRequest1.google.cloud.servicehealth.v1.ListEventsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/events› -GetEvent..google.cloud.servicehealth.v1.GetEventRequest$.google.cloud.servicehealth.v1.Event"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/events/*}ã -ListOrganizationEvents<.google.cloud.servicehealth.v1.ListOrganizationEventsRequest=.google.cloud.servicehealth.v1.ListOrganizationEventsResponse"LÚAparent‚Óä“=;/v1/{parent=organizations/*/locations/*}/organizationEventsÐ -GetOrganizationEvent:.google.cloud.servicehealth.v1.GetOrganizationEventRequest0.google.cloud.servicehealth.v1.OrganizationEvent"JÚAname‚Óä“=;/v1/{name=organizations/*/locations/*/organizationEvents/*}ç -ListOrganizationImpacts=.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest>.google.cloud.servicehealth.v1.ListOrganizationImpactsResponse"MÚAparent‚Óä“>google.cloud.servicehealth.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Full name of the resource as defined in - * [Resource - * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * - * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_name = ''; - /** - * Output only. Type of the asset. Example: - * `"cloudresourcemanager.googleapis.com/Project"` - * - * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset_name - * Output only. Full name of the resource as defined in - * [Resource - * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * @type string $asset_type - * Output only. Type of the asset. Example: - * `"cloudresourcemanager.googleapis.com/Project"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Full name of the resource as defined in - * [Resource - * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * - * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetName() - { - return $this->asset_name; - } - - /** - * Output only. Full name of the resource as defined in - * [Resource - * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - * - * Generated from protobuf field string asset_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetName($var) - { - GPBUtil::checkString($var, True); - $this->asset_name = $var; - - return $this; - } - - /** - * Output only. Type of the asset. Example: - * `"cloudresourcemanager.googleapis.com/Project"` - * - * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetType() - { - return $this->asset_type; - } - - /** - * Output only. Type of the asset. Example: - * `"cloudresourcemanager.googleapis.com/Project"` - * - * Generated from protobuf field string asset_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetType($var) - { - GPBUtil::checkString($var, True); - $this->asset_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php deleted file mode 100644 index 336de26837bd..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event.php +++ /dev/null @@ -1,605 +0,0 @@ -google.cloud.servicehealth.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including project and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $title = ''; - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $category = 0; - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $detailed_category = 0; - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $detailed_state = 0; - /** - * Google Cloud products and locations impacted by the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; - */ - private $event_impacts; - /** - * Output only. Communicates why a given event is deemed relevant in the - * context of a given project. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $relevance = 0; - /** - * Output only. Event updates are correspondence from Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $updates; - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parent_event = ''; - /** - * Output only. The time when the event was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The time when the next update can be expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including project and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * @type string $title - * Output only. Brief description for the event. - * @type string $description - * Output only. Free-form, human-readable description. - * @type int $category - * Output only. The category of the event. - * @type int $detailed_category - * Output only. The detailed category of the event. - * @type int $state - * Output only. The current state of the event. - * @type int $detailed_state - * Output only. The current detailed state of the incident. - * @type array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $event_impacts - * Google Cloud products and locations impacted by the event. - * @type int $relevance - * Output only. Communicates why a given event is deemed relevant in the - * context of a given project. - * @type array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $updates - * Output only. Event updates are correspondence from Google. - * @type string $parent_event - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the event was last modified. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of the event, if applicable. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of the event, if applicable. - * @type \Google\Protobuf\Timestamp $next_update_time - * Output only. The time when the next update can be expected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including project and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including project and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\EventCategory::class); - $this->category = $var; - - return $this; - } - - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDetailedCategory() - { - return $this->detailed_category; - } - - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedCategory detailed_category = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDetailedCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\DetailedCategory::class); - $this->detailed_category = $var; - - return $this; - } - - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDetailedState() - { - return $this->detailed_state; - } - - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.DetailedState detailed_state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDetailedState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\DetailedState::class); - $this->detailed_state = $var; - - return $this; - } - - /** - * Google Cloud products and locations impacted by the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventImpacts() - { - return $this->event_impacts; - } - - /** - * Google Cloud products and locations impacted by the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 20; - * @param array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventImpacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventImpact::class); - $this->event_impacts = $arr; - - return $this; - } - - /** - * Output only. Communicates why a given event is deemed relevant in the - * context of a given project. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRelevance() - { - return $this->relevance; - } - - /** - * Output only. Communicates why a given event is deemed relevant in the - * context of a given project. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Event.Relevance relevance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRelevance($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\Event\Relevance::class); - $this->relevance = $var; - - return $this; - } - - /** - * Output only. Event updates are correspondence from Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpdates() - { - return $this->updates; - } - - /** - * Output only. Event updates are correspondence from Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpdates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventUpdate::class); - $this->updates = $arr; - - return $this; - } - - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParentEvent() - { - return $this->parent_event; - } - - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParentEvent($var) - { - GPBUtil::checkString($var, True); - $this->parent_event = $var; - - return $this; - } - - /** - * Output only. The time when the event was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the event was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The time when the next update can be expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextUpdateTime() - { - return $this->next_update_time; - } - - public function hasNextUpdateTime() - { - return isset($this->next_update_time); - } - - public function clearNextUpdateTime() - { - unset($this->next_update_time); - } - - /** - * Output only. The time when the next update can be expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php deleted file mode 100644 index 3434b8f3f669..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedCategory.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.servicehealth.v1.Event.DetailedCategory - */ -class DetailedCategory -{ - /** - * Unspecified detailed category. - * - * Generated from protobuf enum DETAILED_CATEGORY_UNSPECIFIED = 0; - */ - const DETAILED_CATEGORY_UNSPECIFIED = 0; - /** - * Indicates an event with category INCIDENT has a confirmed impact to at - * least one Google Cloud product. - * - * Generated from protobuf enum CONFIRMED_INCIDENT = 1; - */ - const CONFIRMED_INCIDENT = 1; - /** - * Indicates an event with category INCIDENT is under investigation to - * determine if it has a confirmed impact on any Google Cloud products. - * - * Generated from protobuf enum EMERGING_INCIDENT = 2; - */ - const EMERGING_INCIDENT = 2; - - private static $valueToName = [ - self::DETAILED_CATEGORY_UNSPECIFIED => 'DETAILED_CATEGORY_UNSPECIFIED', - self::CONFIRMED_INCIDENT => 'CONFIRMED_INCIDENT', - self::EMERGING_INCIDENT => 'EMERGING_INCIDENT', - ]; - - 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(DetailedCategory::class, \Google\Cloud\ServiceHealth\V1\Event_DetailedCategory::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php deleted file mode 100644 index 339b648a3a18..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/DetailedState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.servicehealth.v1.Event.DetailedState - */ -class DetailedState -{ - /** - * Unspecified detail state. - * - * Generated from protobuf enum DETAILED_STATE_UNSPECIFIED = 0; - */ - const DETAILED_STATE_UNSPECIFIED = 0; - /** - * Google engineers are actively investigating the event to determine the - * impact. - * - * Generated from protobuf enum EMERGING = 1; - */ - const EMERGING = 1; - /** - * The incident is confirmed and impacting at least one Google Cloud - * product. Ongoing status updates will be provided until it is resolved. - * - * Generated from protobuf enum CONFIRMED = 2; - */ - const CONFIRMED = 2; - /** - * The incident is no longer affecting any Google Cloud product, and there - * will be no further updates. - * - * Generated from protobuf enum RESOLVED = 3; - */ - const RESOLVED = 3; - /** - * The incident was merged into a parent incident. All further updates will - * be published to the parent only. The `parent_event` field contains the - * name of the parent. - * - * Generated from protobuf enum MERGED = 4; - */ - const MERGED = 4; - /** - * The incident was automatically closed because of the following reasons: - * * The impact of the incident could not be confirmed. - * * The incident was intermittent or resolved itself. - * The incident does not have a resolution because no action or - * investigation happened. If it is intermittent, the incident may reopen. - * - * Generated from protobuf enum AUTO_CLOSED = 9; - */ - const AUTO_CLOSED = 9; - /** - * Upon investigation, Google engineers concluded that the incident is not - * affecting a Google Cloud product. This state can change if the incident - * is reviewed again. - * - * Generated from protobuf enum FALSE_POSITIVE = 10; - */ - const FALSE_POSITIVE = 10; - - private static $valueToName = [ - self::DETAILED_STATE_UNSPECIFIED => 'DETAILED_STATE_UNSPECIFIED', - self::EMERGING => 'EMERGING', - self::CONFIRMED => 'CONFIRMED', - self::RESOLVED => 'RESOLVED', - self::MERGED => 'MERGED', - self::AUTO_CLOSED => 'AUTO_CLOSED', - self::FALSE_POSITIVE => 'FALSE_POSITIVE', - ]; - - 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(DetailedState::class, \Google\Cloud\ServiceHealth\V1\Event_DetailedState::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php deleted file mode 100644 index 4c023cfada0a..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/EventCategory.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.servicehealth.v1.Event.EventCategory - */ -class EventCategory -{ - /** - * Unspecified category. - * - * Generated from protobuf enum EVENT_CATEGORY_UNSPECIFIED = 0; - */ - const EVENT_CATEGORY_UNSPECIFIED = 0; - /** - * Event category for service outage or degradation. - * - * Generated from protobuf enum INCIDENT = 2; - */ - const INCIDENT = 2; - - private static $valueToName = [ - self::EVENT_CATEGORY_UNSPECIFIED => 'EVENT_CATEGORY_UNSPECIFIED', - self::INCIDENT => 'INCIDENT', - ]; - - 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(EventCategory::class, \Google\Cloud\ServiceHealth\V1\Event_EventCategory::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php deleted file mode 100644 index 57024463276d..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/Relevance.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.servicehealth.v1.Event.Relevance - */ -class Relevance -{ - /** - * Unspecified relevance. - * - * Generated from protobuf enum RELEVANCE_UNSPECIFIED = 0; - */ - const RELEVANCE_UNSPECIFIED = 0; - /** - * The relevance of the incident to the project is unknown. - * - * Generated from protobuf enum UNKNOWN = 2; - */ - const UNKNOWN = 2; - /** - * The incident does not impact the project. - * - * Generated from protobuf enum NOT_IMPACTED = 6; - */ - const NOT_IMPACTED = 6; - /** - * The incident is associated with a Google Cloud product your project uses, - * but the incident may not be impacting your project. For example, the - * incident may be impacting a Google Cloud product that your project uses, - * but in a location that your project does not use. - * - * Generated from protobuf enum PARTIALLY_RELATED = 7; - */ - const PARTIALLY_RELATED = 7; - /** - * The incident has a direct connection with your project and impacts a - * Google Cloud product in a location your project uses. - * - * Generated from protobuf enum RELATED = 8; - */ - const RELATED = 8; - /** - * The incident is verified to be impacting your project. - * - * Generated from protobuf enum IMPACTED = 9; - */ - const IMPACTED = 9; - - private static $valueToName = [ - self::RELEVANCE_UNSPECIFIED => 'RELEVANCE_UNSPECIFIED', - self::UNKNOWN => 'UNKNOWN', - self::NOT_IMPACTED => 'NOT_IMPACTED', - self::PARTIALLY_RELATED => 'PARTIALLY_RELATED', - self::RELATED => 'RELATED', - self::IMPACTED => 'IMPACTED', - ]; - - 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(Relevance::class, \Google\Cloud\ServiceHealth\V1\Event_Relevance::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php deleted file mode 100644 index 59ecd9bdaf7b..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Event/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.servicehealth.v1.Event.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Event is actively affecting a Google Cloud product and will continue to - * receive updates. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Event is no longer affecting the Google Cloud product or has been merged - * with another event. - * - * Generated from protobuf enum CLOSED = 2; - */ - const CLOSED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CLOSED => 'CLOSED', - ]; - - 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(State::class, \Google\Cloud\ServiceHealth\V1\Event_State::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php deleted file mode 100644 index 62486978ae8a..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventImpact.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.servicehealth.v1.EventImpact - */ -class EventImpact extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud product impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; - */ - protected $product = null; - /** - * Location impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; - */ - protected $location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ServiceHealth\V1\Product $product - * Google Cloud product impacted by the event. - * @type \Google\Cloud\ServiceHealth\V1\Location $location - * Location impacted by the event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud product impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; - * @return \Google\Cloud\ServiceHealth\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Google Cloud product impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Product product = 1; - * @param \Google\Cloud\ServiceHealth\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * Location impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; - * @return \Google\Cloud\ServiceHealth\V1\Location|null - */ - public function getLocation() - { - return $this->location; - } - - public function hasLocation() - { - return isset($this->location); - } - - public function clearLocation() - { - unset($this->location); - } - - /** - * Location impacted by the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Location location = 2; - * @param \Google\Cloud\ServiceHealth\V1\Location $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Location::class); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php deleted file mode 100644 index e5d74427a913..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventUpdate.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.servicehealth.v1.EventUpdate - */ -class EventUpdate extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Brief title for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $title = ''; - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Symptoms of the event, if available. - * - * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $symptom = ''; - /** - * Output only. Workaround steps to remediate the event impact, if available. - * - * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workaround = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the update was posted. - * @type string $title - * Output only. Brief title for the event. - * @type string $description - * Output only. Free-form, human-readable description. - * @type string $symptom - * Output only. Symptoms of the event, if available. - * @type string $workaround - * Output only. Workaround steps to remediate the event impact, if available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Brief title for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Output only. Brief title for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Symptoms of the event, if available. - * - * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSymptom() - { - return $this->symptom; - } - - /** - * Output only. Symptoms of the event, if available. - * - * Generated from protobuf field string symptom = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSymptom($var) - { - GPBUtil::checkString($var, True); - $this->symptom = $var; - - return $this; - } - - /** - * Output only. Workaround steps to remediate the event impact, if available. - * - * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkaround() - { - return $this->workaround; - } - - /** - * Output only. Workaround steps to remediate the event impact, if available. - * - * Generated from protobuf field string workaround = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkaround($var) - { - GPBUtil::checkString($var, True); - $this->workaround = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php deleted file mode 100644 index 84f5a108d068..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/EventView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.servicehealth.v1.EventView - */ -class EventView -{ - /** - * Unspecified event view. Default to `EVENT_VIEW_BASIC`. - * - * Generated from protobuf enum EVENT_VIEW_UNSPECIFIED = 0; - */ - const EVENT_VIEW_UNSPECIFIED = 0; - /** - * Includes all fields except `updates`. This view is the default for - * ListEvents API. - * - * Generated from protobuf enum EVENT_VIEW_BASIC = 1; - */ - const EVENT_VIEW_BASIC = 1; - /** - * Includes all event fields. - * - * Generated from protobuf enum EVENT_VIEW_FULL = 2; - */ - const EVENT_VIEW_FULL = 2; - - private static $valueToName = [ - self::EVENT_VIEW_UNSPECIFIED => 'EVENT_VIEW_UNSPECIFIED', - self::EVENT_VIEW_BASIC => 'EVENT_VIEW_BASIC', - self::EVENT_VIEW_FULL => 'EVENT_VIEW_FULL', - ]; - - 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/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php deleted file mode 100644 index ad4b0340679f..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetEventRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.servicehealth.v1.GetEventRequest - */ -class GetEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique name of the event in this scope including project - * and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * `project_id` - Project ID of the project that contains the event.
- * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Unique name of the event in this scope including project - * and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * - * `project_id` - Project ID of the project that contains the event.
- * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. Please see - * {@see ServiceHealthClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\GetEventRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique name of the event in this scope including project - * and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * `project_id` - Project ID of the project that contains the event.
- * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique name of the event in this scope including project - * and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * `project_id` - Project ID of the project that contains the event.
- * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique name of the event in this scope including project - * and location using the form - * `projects/{project_id}/locations/{location}/events/{event_id}`. - * `project_id` - Project ID of the project that contains the event.
- * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php deleted file mode 100644 index 153cc3856dfb..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationEventRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.servicehealth.v1.GetOrganizationEventRequest - */ -class GetOrganizationEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique name of the event in this scope including organization and - * event ID using the form - * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Unique name of the event in this scope including organization and - * event ID using the form - * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - * - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `event_id` - Organization event ID to retrieve. Please see - * {@see ServiceHealthClient::organizationEventName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\GetOrganizationEventRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique name of the event in this scope including organization and - * event ID using the form - * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `event_id` - Organization event ID to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique name of the event in this scope including organization and - * event ID using the form - * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique name of the event in this scope including organization and - * event ID using the form - * `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php deleted file mode 100644 index bda3b054602c..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/GetOrganizationImpactRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.servicehealth.v1.GetOrganizationImpactRequest - */ -class GetOrganizationImpactRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource using the form - * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource using the form - * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - * - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). Please see - * {@see ServiceHealthClient::organizationImpactName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\GetOrganizationImpactRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource using the form - * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource using the form - * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource using the form - * `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php deleted file mode 100644 index 74f9cdb89ba1..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsRequest.php +++ /dev/null @@ -1,324 +0,0 @@ -google.cloud.servicehealth.v1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value using the form - * `projects/{project_id}/locations/{location}/events`. - * `project_id` - ID of the project for which to list service health - * events. - * `location` - The location to get the service health events from. - * To retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are 1 to 100, inclusive. (The default value is 10.) If more results - * are available, the service returns a next_page_token that you can use to - * get the next page of results in subsequent list requests. The service may - * return fewer events than the requested page_size. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListEvents` call to retrieve the - * next page of results. When paginating, all other parameters provided to - * `ListEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms:
- * * field=value for `category` and `state`
- * * field <, >, <=, or >= value for `update_time`
- * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - * `event_impacts.product.product_name:"Eventarc"` - *
- * Multiple filter queries are separated by spaces. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time`, `event_impacts.product.product_name` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Event fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value using the form - * `projects/{project_id}/locations/{location}/events`. - * - * `project_id` - ID of the project for which to list service health - * events. - * `location` - The location to get the service health events from. - * To retrieve service health events of category = INCIDENT, use `location` = - * `global`. Please see - * {@see ServiceHealthClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\ListEventsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value using the form - * `projects/{project_id}/locations/{location}/events`. - * `project_id` - ID of the project for which to list service health - * events. - * `location` - The location to get the service health events from. - * To retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * @type int $page_size - * Optional. The maximum number of events that should be returned. Acceptable - * values are 1 to 100, inclusive. (The default value is 10.) If more results - * are available, the service returns a next_page_token that you can use to - * get the next page of results in subsequent list requests. The service may - * return fewer events than the requested page_size. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListEvents` call to retrieve the - * next page of results. When paginating, all other parameters provided to - * `ListEvents` must match the call that provided the page token. - * @type string $filter - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms:
- * * field=value for `category` and `state`
- * * field <, >, <=, or >= value for `update_time`
- * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - * `event_impacts.product.product_name:"Eventarc"` - *
- * Multiple filter queries are separated by spaces. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time`, `event_impacts.product.product_name` - * @type int $view - * Optional. Event fields to include in response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value using the form - * `projects/{project_id}/locations/{location}/events`. - * `project_id` - ID of the project for which to list service health - * events. - * `location` - The location to get the service health events from. - * To retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value using the form - * `projects/{project_id}/locations/{location}/events`. - * `project_id` - ID of the project for which to list service health - * events. - * `location` - The location to get the service health events from. - * To retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are 1 to 100, inclusive. (The default value is 10.) If more results - * are available, the service returns a next_page_token that you can use to - * get the next page of results in subsequent list requests. The service may - * return fewer events than the requested page_size. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are 1 to 100, inclusive. (The default value is 10.) If more results - * are available, the service returns a next_page_token that you can use to - * get the next page of results in subsequent list requests. The service may - * return fewer events than the requested page_size. - * - * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListEvents` call to retrieve the - * next page of results. When paginating, all other parameters provided to - * `ListEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListEvents` call to retrieve the - * next page of results. When paginating, all other parameters provided to - * `ListEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms:
- * * field=value for `category` and `state`
- * * field <, >, <=, or >= value for `update_time`
- * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - * `event_impacts.product.product_name:"Eventarc"` - *
- * Multiple filter queries are separated by spaces. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time`, `event_impacts.product.product_name` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms:
- * * field=value for `category` and `state`
- * * field <, >, <=, or >= value for `update_time`
- * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - * `event_impacts.product.product_name:"Eventarc"` - *
- * Multiple filter queries are separated by spaces. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time`, `event_impacts.product.product_name` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Event fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Event fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.EventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\EventView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php deleted file mode 100644 index 1a1f66ef88ab..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListEventsResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.servicehealth.v1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. List of events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $events; - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as page_token to retrieve - * the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ServiceHealth\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * Output only. List of events. - * @type string $next_page_token - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as page_token to retrieve - * the next page. - * If this field is not present, there are no subsequent results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. List of events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * Output only. List of events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.Event events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as page_token to retrieve - * the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as page_token to retrieve - * the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php deleted file mode 100644 index 084a6059a37e..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsRequest.php +++ /dev/null @@ -1,330 +0,0 @@ -google.cloud.servicehealth.v1.ListOrganizationEventsRequest - */ -class ListOrganizationEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. (The default value is `10`.) If more - * results are available, the service returns a `next_page_token` that you can - * use to get the next page of results in subsequent list requests. The - * service may return fewer events than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListOrganizationEvents` call to - * retrieve the next page of results. - * When paginating, all other parameters provided to - * `ListOrganizationEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms: - * * field=value for `category` and `state` - * * field <, >, <=, or >= value for `update_time` - * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - * Multiple filter queries are space-separated. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. OrganizationEvent fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents`. - * - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. Please see - * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\ListOrganizationEventsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * @type int $page_size - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. (The default value is `10`.) If more - * results are available, the service returns a `next_page_token` that you can - * use to get the next page of results in subsequent list requests. The - * service may return fewer events than the requested `page_size`. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListOrganizationEvents` call to - * retrieve the next page of results. - * When paginating, all other parameters provided to - * `ListOrganizationEvents` must match the call that provided the page token. - * @type string $filter - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms: - * * field=value for `category` and `state` - * * field <, >, <=, or >= value for `update_time` - * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - * Multiple filter queries are space-separated. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time` - * @type int $view - * Optional. OrganizationEvent fields to include in response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. (The default value is `10`.) If more - * results are available, the service returns a `next_page_token` that you can - * use to get the next page of results in subsequent list requests. The - * service may return fewer events than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. (The default value is `10`.) If more - * results are available, the service returns a `next_page_token` that you can - * use to get the next page of results in subsequent list requests. The - * service may return fewer events than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListOrganizationEvents` call to - * retrieve the next page of results. - * When paginating, all other parameters provided to - * `ListOrganizationEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * Provide Page token returned by a previous `ListOrganizationEvents` call to - * retrieve the next page of results. - * When paginating, all other parameters provided to - * `ListOrganizationEvents` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms: - * * field=value for `category` and `state` - * * field <, >, <=, or >= value for `update_time` - * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - * Multiple filter queries are space-separated. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression takes the following forms: - * * field=value for `category` and `state` - * * field <, >, <=, or >= value for `update_time` - * Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - * Multiple filter queries are space-separated. Example: - * `category=INCIDENT state=ACTIVE`. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `category`, `state`, - * `update_time` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. OrganizationEvent fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. OrganizationEvent fields to include in response. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEventView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEventView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php deleted file mode 100644 index 81b50e7246da..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationEventsResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.servicehealth.v1.ListOrganizationEventsResponse - */ -class ListOrganizationEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. List of organization events affecting an organization. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $organization_events; - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ServiceHealth\V1\OrganizationEvent>|\Google\Protobuf\Internal\RepeatedField $organization_events - * Output only. List of organization events affecting an organization. - * @type string $next_page_token - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. List of organization events affecting an organization. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOrganizationEvents() - { - return $this->organization_events; - } - - /** - * Output only. List of organization events affecting an organization. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationEvent organization_events = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\OrganizationEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOrganizationEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\OrganizationEvent::class); - $this->organization_events = $arr; - - return $this; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php deleted file mode 100644 index 07bee44080ca..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsRequest.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.servicehealth.v1.ListOrganizationImpactsRequest - */ -class ListOrganizationImpactsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. The default value is `10`. - * If more results are available, the service returns a - * `next_page_token` that can be used to get the next page of results in - * subsequent list requests. The service may return fewer - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * Provide `page_token` returned by a previous `ListOrganizationImpacts` call - * to retrieve the next page of results. - * When paginating, all other parameters provided to `ListOrganizationImpacts` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression is in the form of `field:value` for checking if a - * repeated field contains a value. - * Example: - * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - * To get your `{organization_id}`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * Multiple filter queries are separated by spaces. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `events`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts`. - * - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). Please see - * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\ServiceHealth\V1\ListOrganizationImpactsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * @type int $page_size - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. The default value is `10`. - * If more results are available, the service returns a - * `next_page_token` that can be used to get the next page of results in - * subsequent list requests. The service may return fewer - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * than the requested `page_size`. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Provide `page_token` returned by a previous `ListOrganizationImpacts` call - * to retrieve the next page of results. - * When paginating, all other parameters provided to `ListOrganizationImpacts` - * must match the call that provided the page token. - * @type string $filter - * Optional. A filter expression that filters resources listed in the - * response. The expression is in the form of `field:value` for checking if a - * repeated field contains a value. - * Example: - * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - * To get your `{organization_id}`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * Multiple filter queries are separated by spaces. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `events`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts`. - * `organization_id` - ID (number) of the project that contains the event. To - * get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. The default value is `10`. - * If more results are available, the service returns a - * `next_page_token` that can be used to get the next page of results in - * subsequent list requests. The service may return fewer - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of events that should be returned. Acceptable - * values are `1` to `100`, inclusive. The default value is `10`. - * If more results are available, the service returns a - * `next_page_token` that can be used to get the next page of results in - * subsequent list requests. The service may return fewer - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * than the requested `page_size`. - * - * Generated from protobuf field int32 page_size = 2 [(.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 token identifying a page of results the server should return. - * Provide `page_token` returned by a previous `ListOrganizationImpacts` call - * to retrieve the next page of results. - * When paginating, all other parameters provided to `ListOrganizationImpacts` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * Provide `page_token` returned by a previous `ListOrganizationImpacts` call - * to retrieve the next page of results. - * When paginating, all other parameters provided to `ListOrganizationImpacts` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression is in the form of `field:value` for checking if a - * repeated field contains a value. - * Example: - * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - * To get your `{organization_id}`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * Multiple filter queries are separated by spaces. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `events`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter expression that filters resources listed in the - * response. The expression is in the form of `field:value` for checking if a - * repeated field contains a value. - * Example: - * `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - * To get your `{organization_id}`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - * Multiple filter queries are separated by spaces. - * By default, each expression is an AND expression. However, you can include - * AND and OR expressions explicitly. - * Filter is supported for the following fields: `events`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php deleted file mode 100644 index 51d8ed1f7a3c..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/ListOrganizationImpactsResponse.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.servicehealth.v1.ListOrganizationImpactsResponse - */ -class ListOrganizationImpactsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. List of - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * for an organization affected by service health events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $organization_impacts; - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ServiceHealth\V1\OrganizationImpact>|\Google\Protobuf\Internal\RepeatedField $organization_impacts - * Output only. List of - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * for an organization affected by service health events. - * @type string $next_page_token - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. List of - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * for an organization affected by service health events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOrganizationImpacts() - { - return $this->organization_impacts; - } - - /** - * Output only. List of - * [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - * for an organization affected by service health events. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.OrganizationImpact organization_impacts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\OrganizationImpact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOrganizationImpacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\OrganizationImpact::class); - $this->organization_impacts = $arr; - - return $this; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. The continuation token, used to page through large result - * sets. Provide this value in a subsequent request as `page_token` to - * retrieve the next page. - * If this field is not present, there are no subsequent results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php deleted file mode 100644 index 84713b672fcc..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Location.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.servicehealth.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * Location impacted by the event. Example: `"us-central1"` - * - * Generated from protobuf field string location_name = 1; - */ - protected $location_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location_name - * Location impacted by the event. Example: `"us-central1"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Location impacted by the event. Example: `"us-central1"` - * - * Generated from protobuf field string location_name = 1; - * @return string - */ - public function getLocationName() - { - return $this->location_name; - } - - /** - * Location impacted by the event. Example: `"us-central1"` - * - * Generated from protobuf field string location_name = 1; - * @param string $var - * @return $this - */ - public function setLocationName($var) - { - GPBUtil::checkString($var, True); - $this->location_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php deleted file mode 100644 index 3ce8b071737d..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent.php +++ /dev/null @@ -1,595 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEvent - */ -class OrganizationEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including organization ID and location using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. - * `organization_id` - see [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from.
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $title = ''; - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $category = 0; - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $detailed_category = 0; - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $detailed_state = 0; - /** - * Output only. Represents the Google Cloud products and locations impacted by - * the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $event_impacts; - /** - * Output only. Incident-only field. Event updates are correspondence from - * Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $updates; - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parent_event = ''; - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Incident-only field. The time when the next update can be - * expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including organization ID and location using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. - * `organization_id` - see [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from.
- * `event_id` - Organization event ID to retrieve. - * @type string $title - * Output only. Brief description for the event. - * @type string $description - * Output only. Free-form, human-readable description. - * @type int $category - * Output only. The category of the event. - * @type int $detailed_category - * Output only. The detailed category of the event. - * @type int $state - * Output only. The current state of the event. - * @type int $detailed_state - * Output only. The current detailed state of the incident. - * @type array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $event_impacts - * Output only. Represents the Google Cloud products and locations impacted by - * the event. - * @type array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $updates - * Output only. Incident-only field. Event updates are correspondence from - * Google. - * @type string $parent_event - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the update was posted. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of the event, if applicable. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of the event, if applicable. - * @type \Google\Protobuf\Timestamp $next_update_time - * Output only. Incident-only field. The time when the next update can be - * expected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including organization ID and location using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. - * `organization_id` - see [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from.
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. Name of the event. Unique name of the event in - * this scope including organization ID and location using the form - * `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. - * `organization_id` - see [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `location` - The location to get the service health events from.
- * `event_id` - Organization event ID to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Output only. Brief description for the event. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Free-form, human-readable description. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * Output only. The category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.EventCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\EventCategory::class); - $this->category = $var; - - return $this; - } - - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDetailedCategory() - { - return $this->detailed_category; - } - - /** - * Output only. The detailed category of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory detailed_category = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDetailedCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\DetailedCategory::class); - $this->detailed_category = $var; - - return $this; - } - - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the event. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDetailedState() - { - return $this->detailed_state; - } - - /** - * Output only. The current detailed state of the incident. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.OrganizationEvent.DetailedState detailed_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDetailedState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ServiceHealth\V1\OrganizationEvent\DetailedState::class); - $this->detailed_state = $var; - - return $this; - } - - /** - * Output only. Represents the Google Cloud products and locations impacted by - * the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventImpacts() - { - return $this->event_impacts; - } - - /** - * Output only. Represents the Google Cloud products and locations impacted by - * the event. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventImpact event_impacts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\EventImpact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventImpacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventImpact::class); - $this->event_impacts = $arr; - - return $this; - } - - /** - * Output only. Incident-only field. Event updates are correspondence from - * Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpdates() - { - return $this->updates; - } - - /** - * Output only. Incident-only field. Event updates are correspondence from - * Google. - * - * Generated from protobuf field repeated .google.cloud.servicehealth.v1.EventUpdate updates = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ServiceHealth\V1\EventUpdate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpdates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ServiceHealth\V1\EventUpdate::class); - $this->updates = $arr; - - return $this; - } - - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParentEvent() - { - return $this->parent_event; - } - - /** - * Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - * name of the parent event. All further updates will be published to the - * parent event. - * - * Generated from protobuf field string parent_event = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParentEvent($var) - { - GPBUtil::checkString($var, True); - $this->parent_event = $var; - - return $this; - } - - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the update was posted. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The start time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The end time of the event, if applicable. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Incident-only field. The time when the next update can be - * expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextUpdateTime() - { - return $this->next_update_time; - } - - public function hasNextUpdateTime() - { - return isset($this->next_update_time); - } - - public function clearNextUpdateTime() - { - unset($this->next_update_time); - } - - /** - * Output only. Incident-only field. The time when the next update can be - * expected. - * - * Generated from protobuf field .google.protobuf.Timestamp next_update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php deleted file mode 100644 index c9beabfdc6d5..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedCategory.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory - */ -class DetailedCategory -{ - /** - * Unspecified detailed category. - * - * Generated from protobuf enum DETAILED_CATEGORY_UNSPECIFIED = 0; - */ - const DETAILED_CATEGORY_UNSPECIFIED = 0; - /** - * Indicates an event with category INCIDENT has a confirmed impact to at - * least one Google Cloud product. - * - * Generated from protobuf enum CONFIRMED_INCIDENT = 1; - */ - const CONFIRMED_INCIDENT = 1; - /** - * Indicates an event with category INCIDENT is under investigation to - * determine if it has a confirmed impact on any Google Cloud products. - * - * Generated from protobuf enum EMERGING_INCIDENT = 2; - */ - const EMERGING_INCIDENT = 2; - - private static $valueToName = [ - self::DETAILED_CATEGORY_UNSPECIFIED => 'DETAILED_CATEGORY_UNSPECIFIED', - self::CONFIRMED_INCIDENT => 'CONFIRMED_INCIDENT', - self::EMERGING_INCIDENT => 'EMERGING_INCIDENT', - ]; - - 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(DetailedCategory::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_DetailedCategory::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php deleted file mode 100644 index 6771b385b777..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/DetailedState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEvent.DetailedState - */ -class DetailedState -{ - /** - * Unspecified detail state. - * - * Generated from protobuf enum DETAILED_STATE_UNSPECIFIED = 0; - */ - const DETAILED_STATE_UNSPECIFIED = 0; - /** - * Google engineers are actively investigating the incident to determine the - * impact. - * - * Generated from protobuf enum EMERGING = 1; - */ - const EMERGING = 1; - /** - * The incident is confirmed and impacting at least one Google Cloud - * product. Ongoing status updates will be provided until it is resolved. - * - * Generated from protobuf enum CONFIRMED = 2; - */ - const CONFIRMED = 2; - /** - * The incident is no longer affecting any Google Cloud product, and there - * will be no further updates. - * - * Generated from protobuf enum RESOLVED = 3; - */ - const RESOLVED = 3; - /** - * The incident was merged into a parent event. All further updates will be - * published to the parent only. The `parent_event` contains the name of the - * parent. - * - * Generated from protobuf enum MERGED = 4; - */ - const MERGED = 4; - /** - * The incident was automatically closed because of the following reasons: - * * The impact of the incident could not be confirmed. - * * The incident was intermittent or resolved itself. - * The incident does not have a resolution because no action or - * investigation happened. If it is intermittent, the incident may reopen. - * - * Generated from protobuf enum AUTO_CLOSED = 9; - */ - const AUTO_CLOSED = 9; - /** - * Upon investigation, Google engineers concluded that the incident is not - * affecting a Google Cloud product. This state can change if the incident - * is reviewed again. - * - * Generated from protobuf enum FALSE_POSITIVE = 10; - */ - const FALSE_POSITIVE = 10; - - private static $valueToName = [ - self::DETAILED_STATE_UNSPECIFIED => 'DETAILED_STATE_UNSPECIFIED', - self::EMERGING => 'EMERGING', - self::CONFIRMED => 'CONFIRMED', - self::RESOLVED => 'RESOLVED', - self::MERGED => 'MERGED', - self::AUTO_CLOSED => 'AUTO_CLOSED', - self::FALSE_POSITIVE => 'FALSE_POSITIVE', - ]; - - 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(DetailedState::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_DetailedState::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php deleted file mode 100644 index d69c7230a46b..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/EventCategory.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEvent.EventCategory - */ -class EventCategory -{ - /** - * Unspecified category. - * - * Generated from protobuf enum EVENT_CATEGORY_UNSPECIFIED = 0; - */ - const EVENT_CATEGORY_UNSPECIFIED = 0; - /** - * Event category for service outage or degradation. - * - * Generated from protobuf enum INCIDENT = 2; - */ - const INCIDENT = 2; - - private static $valueToName = [ - self::EVENT_CATEGORY_UNSPECIFIED => 'EVENT_CATEGORY_UNSPECIFIED', - self::INCIDENT => 'INCIDENT', - ]; - - 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(EventCategory::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_EventCategory::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php deleted file mode 100644 index be2b5ab26b46..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEvent/State.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEvent.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Event is actively affecting a Google Cloud product and will continue to - * receive updates. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Event is no longer affecting the Google Cloud product or has been merged - * with another event. - * - * Generated from protobuf enum CLOSED = 2; - */ - const CLOSED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CLOSED => 'CLOSED', - ]; - - 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(State::class, \Google\Cloud\ServiceHealth\V1\OrganizationEvent_State::class); - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php deleted file mode 100644 index 709b78d64895..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationEventView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationEventView - */ -class OrganizationEventView -{ - /** - * Unspecified event view. Default to `ORGANIZATION_EVENT_VIEW_BASIC`. - * - * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0; - */ - const ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0; - /** - * Includes all organization event fields except `updates`. This view is the - * default for ListOrganizationEvents API. - * - * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_BASIC = 1; - */ - const ORGANIZATION_EVENT_VIEW_BASIC = 1; - /** - * Includes all organization event fields. - * - * Generated from protobuf enum ORGANIZATION_EVENT_VIEW_FULL = 2; - */ - const ORGANIZATION_EVENT_VIEW_FULL = 2; - - private static $valueToName = [ - self::ORGANIZATION_EVENT_VIEW_UNSPECIFIED => 'ORGANIZATION_EVENT_VIEW_UNSPECIFIED', - self::ORGANIZATION_EVENT_VIEW_BASIC => 'ORGANIZATION_EVENT_VIEW_BASIC', - self::ORGANIZATION_EVENT_VIEW_FULL => 'ORGANIZATION_EVENT_VIEW_FULL', - ]; - - 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/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php deleted file mode 100644 index b665c2fc8e3c..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/OrganizationImpact.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.servicehealth.v1.OrganizationImpact - */ -class OrganizationImpact extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. Unique name of the organization impact in this - * scope including organization and location using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. A list of event names impacting the asset. - * - * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $events; - /** - * Output only. Google Cloud asset possibly impacted by the specified events. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset = null; - /** - * Output only. The time when the affected project was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. Unique name of the organization impact in this - * scope including organization and location using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * @type array|\Google\Protobuf\Internal\RepeatedField $events - * Output only. A list of event names impacting the asset. - * @type \Google\Cloud\ServiceHealth\V1\Asset $asset - * Output only. Google Cloud asset possibly impacted by the specified events. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the affected project was last modified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. Unique name of the organization impact in this - * scope including organization and location using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. Unique name of the organization impact in this - * scope including organization and location using the form - * `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. - * `organization_id` - ID (number) of the organization that contains the - * event. To get your `organization_id`, see - * [Getting your organization resource - * ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. A list of event names impacting the asset. - * - * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * Output only. A list of event names impacting the asset. - * - * Generated from protobuf field repeated string events = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->events = $arr; - - return $this; - } - - /** - * Output only. Google Cloud asset possibly impacted by the specified events. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\ServiceHealth\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Output only. Google Cloud asset possibly impacted by the specified events. - * - * Generated from protobuf field .google.cloud.servicehealth.v1.Asset asset = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\ServiceHealth\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ServiceHealth\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Output only. The time when the affected project was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the affected project was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php b/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php deleted file mode 100644 index e14abef859df..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/proto/src/Google/Cloud/ServiceHealth/V1/Product.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.servicehealth.v1.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` - * - * Generated from protobuf field string product_name = 1; - */ - protected $product_name = ''; - /** - * Unique identifier for the product. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $product_name - * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` - * @type string $id - * Unique identifier for the product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Servicehealth\V1\EventResources::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` - * - * Generated from protobuf field string product_name = 1; - * @return string - */ - public function getProductName() - { - return $this->product_name; - } - - /** - * Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` - * - * Generated from protobuf field string product_name = 1; - * @param string $var - * @return $this - */ - public function setProductName($var) - { - GPBUtil::checkString($var, True); - $this->product_name = $var; - - return $this; - } - - /** - * Unique identifier for the product. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Unique identifier for the product. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php deleted file mode 100644 index eed14dc892b2..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_event.php +++ /dev/null @@ -1,77 +0,0 @@ - - * `location` - The location to get the service health events from.
- * `event_id` - Event ID to retrieve. Please see - * {@see ServiceHealthClient::eventName()} for help formatting this field. - */ -function get_event_sample(string $formattedName): void -{ - // Create a client. - $serviceHealthClient = new ServiceHealthClient(); - - // Prepare the request message. - $request = (new GetEventRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $serviceHealthClient->getEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceHealthClient::eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); - - get_event_sample($formattedName); -} -// [END servicehealth_v1_generated_ServiceHealth_GetEvent_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php deleted file mode 100644 index 6c55411fc23d..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END servicehealth_v1_generated_ServiceHealth_GetLocation_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php deleted file mode 100644 index 784e1a3794bc..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_event.php +++ /dev/null @@ -1,84 +0,0 @@ - - * `event_id` - Organization event ID to retrieve. Please see - * {@see ServiceHealthClient::organizationEventName()} for help formatting this field. - */ -function get_organization_event_sample(string $formattedName): void -{ - // Create a client. - $serviceHealthClient = new ServiceHealthClient(); - - // Prepare the request message. - $request = (new GetOrganizationEventRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OrganizationEvent $response */ - $response = $serviceHealthClient->getOrganizationEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceHealthClient::organizationEventName( - '[ORGANIZATION]', - '[LOCATION]', - '[EVENT]' - ); - - get_organization_event_sample($formattedName); -} -// [END servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php deleted file mode 100644 index d83a6d219351..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/get_organization_impact.php +++ /dev/null @@ -1,84 +0,0 @@ - - * `organization_impact_id` - ID of the [OrganizationImpact - * resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). Please see - * {@see ServiceHealthClient::organizationImpactName()} for help formatting this field. - */ -function get_organization_impact_sample(string $formattedName): void -{ - // Create a client. - $serviceHealthClient = new ServiceHealthClient(); - - // Prepare the request message. - $request = (new GetOrganizationImpactRequest()) - ->setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OrganizationImpact $response */ - $response = $serviceHealthClient->getOrganizationImpact($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceHealthClient::organizationImpactName( - '[ORGANIZATION]', - '[LOCATION]', - '[ORGANIZATION_IMPACT]' - ); - - get_organization_impact_sample($formattedName); -} -// [END servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php deleted file mode 100644 index 3bbd650de70c..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_events.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $serviceHealthClient->listEvents($request); - - /** @var Event $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServiceHealthClient::locationName('[PROJECT]', '[LOCATION]'); - - list_events_sample($formattedParent); -} -// [END servicehealth_v1_generated_ServiceHealth_ListEvents_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php deleted file mode 100644 index 0db0280af42b..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END servicehealth_v1_generated_ServiceHealth_ListLocations_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php deleted file mode 100644 index 68f3ab0e9313..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_events.php +++ /dev/null @@ -1,85 +0,0 @@ - - * `location` - The location to get the service health events from. To - * retrieve service health events of category = INCIDENT, use `location` = - * `global`. Please see - * {@see ServiceHealthClient::organizationLocationName()} for help formatting this field. - */ -function list_organization_events_sample(string $formattedParent): void -{ - // Create a client. - $serviceHealthClient = new ServiceHealthClient(); - - // Prepare the request message. - $request = (new ListOrganizationEventsRequest()) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $serviceHealthClient->listOrganizationEvents($request); - - /** @var OrganizationEvent $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServiceHealthClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - - list_organization_events_sample($formattedParent); -} -// [END servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php b/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php deleted file mode 100644 index 5509a7bf85d2..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/samples/V1/ServiceHealthClient/list_organization_impacts.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $serviceHealthClient->listOrganizationImpacts($request); - - /** @var OrganizationImpact $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServiceHealthClient::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - - list_organization_impacts_sample($formattedParent); -} -// [END servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php b/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php deleted file mode 100644 index 2440dde62645..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/src/V1/Client/ServiceHealthClient.php +++ /dev/null @@ -1,523 +0,0 @@ - getEventAsync(GetEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrganizationEventAsync(GetOrganizationEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrganizationImpactAsync(GetOrganizationImpactRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrganizationEventsAsync(ListOrganizationEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrganizationImpactsAsync(ListOrganizationImpactsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ServiceHealthClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.servicehealth.v1.ServiceHealth'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'servicehealth.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'servicehealth.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/service_health_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/service_health_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/service_health_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/service_health_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a event - * resource. - * - * @param string $project - * @param string $location - * @param string $event - * - * @return string The formatted event resource. - */ - public static function eventName(string $project, string $location, string $event): string - { - return self::getPathTemplate('event')->render([ - 'project' => $project, - 'location' => $location, - 'event' => $event, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_event resource. - * - * @param string $organization - * @param string $location - * @param string $event - * - * @return string The formatted organization_event resource. - */ - public static function organizationEventName(string $organization, string $location, string $event): string - { - return self::getPathTemplate('organizationEvent')->render([ - 'organization' => $organization, - 'location' => $location, - 'event' => $event, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_impact resource. - * - * @param string $organization - * @param string $location - * @param string $organizationImpact - * - * @return string The formatted organization_impact resource. - */ - public static function organizationImpactName(string $organization, string $location, string $organizationImpact): string - { - return self::getPathTemplate('organizationImpact')->render([ - 'organization' => $organization, - 'location' => $location, - 'organization_impact' => $organizationImpact, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - event: projects/{project}/locations/{location}/events/{event} - * - location: projects/{project}/locations/{location} - * - organizationEvent: organizations/{organization}/locations/{location}/organizationEvents/{event} - * - organizationImpact: organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact} - * - organizationLocation: organizations/{organization}/locations/{location} - * - * 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. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'servicehealth.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 - * $apiEndpoint 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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Retrieves a resource containing information about an event. - * - * The async variant is {@see ServiceHealthClient::getEventAsync()} . - * - * @example samples/V1/ServiceHealthClient/get_event.php - * - * @param GetEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Event - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEvent(GetEventRequest $request, array $callOptions = []): Event - { - return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about an event affecting an - * organization . - * - * The async variant is {@see ServiceHealthClient::getOrganizationEventAsync()} . - * - * @example samples/V1/ServiceHealthClient/get_organization_event.php - * - * @param GetOrganizationEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OrganizationEvent - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOrganizationEvent(GetOrganizationEventRequest $request, array $callOptions = []): OrganizationEvent - { - return $this->startApiCall('GetOrganizationEvent', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about impact to an asset under - * an organization affected by a service health event. - * - * The async variant is {@see ServiceHealthClient::getOrganizationImpactAsync()} . - * - * @example samples/V1/ServiceHealthClient/get_organization_impact.php - * - * @param GetOrganizationImpactRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OrganizationImpact - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOrganizationImpact(GetOrganizationImpactRequest $request, array $callOptions = []): OrganizationImpact - { - return $this->startApiCall('GetOrganizationImpact', $request, $callOptions)->wait(); - } - - /** - * Lists events under a given project and location. - * - * The async variant is {@see ServiceHealthClient::listEventsAsync()} . - * - * @example samples/V1/ServiceHealthClient/list_events.php - * - * @param ListEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEvents', $request, $callOptions); - } - - /** - * Lists organization events under a given organization and location. - * - * The async variant is {@see ServiceHealthClient::listOrganizationEventsAsync()} . - * - * @example samples/V1/ServiceHealthClient/list_organization_events.php - * - * @param ListOrganizationEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listOrganizationEvents(ListOrganizationEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrganizationEvents', $request, $callOptions); - } - - /** - * Lists assets impacted by organization events under a given organization and - * location. - * - * The async variant is {@see ServiceHealthClient::listOrganizationImpactsAsync()} - * . - * - * @example samples/V1/ServiceHealthClient/list_organization_impacts.php - * - * @param ListOrganizationImpactsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listOrganizationImpacts(ListOrganizationImpactsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrganizationImpacts', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ServiceHealthClient::getLocationAsync()} . - * - * @example samples/V1/ServiceHealthClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ServiceHealthClient::listLocationsAsync()} . - * - * @example samples/V1/ServiceHealthClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json deleted file mode 100644 index ea29794dad5b..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.servicehealth.v1", - "libraryPackage": "Google\\Cloud\\ServiceHealth\\V1", - "services": { - "ServiceHealth": { - "clients": { - "grpc": { - "libraryClient": "ServiceHealthGapicClient", - "rpcs": { - "GetEvent": { - "methods": [ - "getEvent" - ] - }, - "GetOrganizationEvent": { - "methods": [ - "getOrganizationEvent" - ] - }, - "GetOrganizationImpact": { - "methods": [ - "getOrganizationImpact" - ] - }, - "ListEvents": { - "methods": [ - "listEvents" - ] - }, - "ListOrganizationEvents": { - "methods": [ - "listOrganizationEvents" - ] - }, - "ListOrganizationImpacts": { - "methods": [ - "listOrganizationImpacts" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json deleted file mode 100644 index 071189090bc2..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_client_config.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "interfaces": { - "google.cloud.servicehealth.v1.ServiceHealth": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "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": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GetEvent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOrganizationEvent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOrganizationImpact": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEvents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListOrganizationEvents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListOrganizationImpacts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php deleted file mode 100644 index 8fe43a3ff078..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_descriptor_config.php +++ /dev/null @@ -1,165 +0,0 @@ - [ - 'google.cloud.servicehealth.v1.ServiceHealth' => [ - 'GetEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\OrganizationEvent', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationImpact' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\OrganizationImpact', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizationEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOrganizationEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListOrganizationEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizationImpacts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOrganizationImpacts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ServiceHealth\V1\ListOrganizationImpactsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'event' => 'projects/{project}/locations/{location}/events/{event}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationEvent' => 'organizations/{organization}/locations/{location}/organizationEvents/{event}', - 'organizationImpact' => 'organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php b/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php deleted file mode 100644 index 536ed3492f3d..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/src/V1/resources/service_health_rest_client_config.php +++ /dev/null @@ -1,119 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.servicehealth.v1.ServiceHealth' => [ - 'GetEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/organizationEvents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationImpact' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/organizationImpacts/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/events', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizationEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/organizationEvents', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrganizationImpacts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/organizationImpacts', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php b/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php deleted file mode 100644 index c66e1ca2a194..000000000000 --- a/owl-bot-staging/ServiceHealth/v1/tests/Unit/V1/Client/ServiceHealthClientTest.php +++ /dev/null @@ -1,655 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ServiceHealthClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ServiceHealthClient($options); - } - - /** @test */ - public function getEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $parentEvent = 'parentEvent1393243845'; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setParentEvent($parentEvent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - try { - $gapicClient->getEvent($request); - // If the $gapicClient 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 getOrganizationEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $parentEvent = 'parentEvent1393243845'; - $expectedResponse = new OrganizationEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setParentEvent($parentEvent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->organizationEventName('[ORGANIZATION]', '[LOCATION]', '[EVENT]'); - $request = (new GetOrganizationEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getOrganizationEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetOrganizationEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedName = $gapicClient->organizationEventName('[ORGANIZATION]', '[LOCATION]', '[EVENT]'); - $request = (new GetOrganizationEventRequest()) - ->setName($formattedName); - try { - $gapicClient->getOrganizationEvent($request); - // If the $gapicClient 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 getOrganizationImpactTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new OrganizationImpact(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->organizationImpactName('[ORGANIZATION]', '[LOCATION]', '[ORGANIZATION_IMPACT]'); - $request = (new GetOrganizationImpactRequest()) - ->setName($formattedName); - $response = $gapicClient->getOrganizationImpact($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetOrganizationImpact', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationImpactExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedName = $gapicClient->organizationImpactName('[ORGANIZATION]', '[LOCATION]', '[ORGANIZATION_IMPACT]'); - $request = (new GetOrganizationImpactRequest()) - ->setName($formattedName); - try { - $gapicClient->getOrganizationImpact($request); - // If the $gapicClient 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(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventsElement = new Event(); - $events = [ - $eventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEvents($events); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEvents($request); - // If the $gapicClient 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 listOrganizationEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $organizationEventsElement = new OrganizationEvent(); - $organizationEvents = [ - $organizationEventsElement, - ]; - $expectedResponse = new ListOrganizationEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOrganizationEvents($organizationEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListOrganizationEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOrganizationEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOrganizationEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListOrganizationEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrganizationEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListOrganizationEventsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOrganizationEvents($request); - // If the $gapicClient 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 listOrganizationImpactsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $organizationImpactsElement = new OrganizationImpact(); - $organizationImpacts = [ - $organizationImpactsElement, - ]; - $expectedResponse = new ListOrganizationImpactsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOrganizationImpacts($organizationImpacts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListOrganizationImpactsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOrganizationImpacts($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOrganizationImpacts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/ListOrganizationImpacts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrganizationImpactsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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 - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListOrganizationImpactsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOrganizationImpacts($request); - // If the $gapicClient 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient 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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $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); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient 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 getEventAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $parentEvent = 'parentEvent1393243845'; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setParentEvent($parentEvent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getEventAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.servicehealth.v1.ServiceHealth/GetEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}