diff --git a/Eventarc/metadata/V1/Channel.php b/Eventarc/metadata/V1/Channel.php
index 48048e508aa2..591f38500aa8 100644
Binary files a/Eventarc/metadata/V1/Channel.php and b/Eventarc/metadata/V1/Channel.php differ
diff --git a/Eventarc/metadata/V1/Enrollment.php b/Eventarc/metadata/V1/Enrollment.php
new file mode 100644
index 000000000000..2edfc789c5e4
--- /dev/null
+++ b/Eventarc/metadata/V1/Enrollment.php
@@ -0,0 +1,53 @@
+internalAddGeneratedFile(
+ '
+Œ
+)google/cloud/eventarc/v1/enrollment.protogoogle.cloud.eventarc.v1google/api/resource.protogoogle/protobuf/timestamp.proto"¾
+
+Enrollment
+name ( BàA
+uid ( BàA
+etag ( BàA4
+create_time (2.google.protobuf.TimestampBàA4
+update_time (2.google.protobuf.TimestampBàAE
+labels (20.google.cloud.eventarc.v1.Enrollment.LabelsEntryBàAO
+annotations (25.google.cloud.eventarc.v1.Enrollment.AnnotationsEntryBàA
+display_name ( BàA
+ cel_match ( BàA?
+message_bus
+ ( B*àAúA$
+"eventarc.googleapis.com/MessageBus
+destination ( BàA-
+LabelsEntry
+key (
+value ( :82
+AnnotationsEntry
+key (
+value ( :8:‚êA
+"eventarc.googleapis.com/Enrollment@projects/{project}/locations/{location}/enrollments/{enrollment}*enrollments2
+enrollmentB¿
+com.google.cloud.eventarc.v1BEnrollmentProtoPZ8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/Eventarc/metadata/V1/Eventarc.php b/Eventarc/metadata/V1/Eventarc.php
index 306654a39702..69c3be8ae46f 100644
--- a/Eventarc/metadata/V1/Eventarc.php
+++ b/Eventarc/metadata/V1/Eventarc.php
@@ -21,15 +21,19 @@ public static function initOnce() {
\GPBMetadata\Google\Cloud\Eventarc\V1\Channel::initOnce();
\GPBMetadata\Google\Cloud\Eventarc\V1\ChannelConnection::initOnce();
\GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce();
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Enrollment::initOnce();
+ \GPBMetadata\Google\Cloud\Eventarc\V1\GoogleApiSource::initOnce();
\GPBMetadata\Google\Cloud\Eventarc\V1\GoogleChannelConfig::initOnce();
+ \GPBMetadata\Google\Cloud\Eventarc\V1\MessageBus::initOnce();
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
\GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce();
\GPBMetadata\Google\Longrunning\Operations::initOnce();
\GPBMetadata\Google\Protobuf\FieldMask::initOnce();
\GPBMetadata\Google\Protobuf\Timestamp::initOnce();
$pool->internalAddGeneratedFile(
'
-°<
-\'google/cloud/eventarc/v1/eventarc.protogoogle.cloud.eventarc.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/eventarc/v1/channel.proto1google/cloud/eventarc/v1/channel_connection.proto(google/cloud/eventarc/v1/discovery.proto4google/cloud/eventarc/v1/google_channel_config.proto&google/cloud/eventarc/v1/trigger.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"J
+Ó
+\'google/cloud/eventarc/v1/eventarc.protogoogle.cloud.eventarc.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/eventarc/v1/channel.proto1google/cloud/eventarc/v1/channel_connection.proto(google/cloud/eventarc/v1/discovery.proto)google/cloud/eventarc/v1/enrollment.proto0google/cloud/eventarc/v1/google_api_source.proto4google/cloud/eventarc/v1/google_channel_config.proto*google/cloud/eventarc/v1/message_bus.proto\'google/cloud/eventarc/v1/pipeline.proto&google/cloud/eventarc/v1/trigger.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"J
GetTriggerRequest5
name ( B\'àAúA!
eventarc.googleapis.com/Trigger"—
@@ -49,18 +53,18 @@ public static function initOnce() {
trigger (2!.google.cloud.eventarc.v1.TriggerBàA
trigger_id ( BàA
-
validate_only (BàA"®
+
validate_only (BàA"®
UpdateTriggerRequest2
trigger (2!.google.cloud.eventarc.v1.Trigger/
update_mask (2.google.protobuf.FieldMask
allow_missing (
-
validate_only (BàA"Ž
+
validate_only (BàA"Ž
DeleteTriggerRequest5
name ( B\'àAúA!
eventarc.googleapis.com/Trigger
etag (
allow_missing (
-
validate_only (BàA"J
+
validate_only (BàA"J
GetChannelRequest5
name ( B\'àAúA!
eventarc.googleapis.com/Channel"‡
@@ -79,15 +83,15 @@ public static function initOnce() {
channel (2!.google.cloud.eventarc.v1.ChannelBàA
channel_id ( BàA
-
validate_only (BàA"—
+
validate_only (BàA"—
UpdateChannelRequest2
channel (2!.google.cloud.eventarc.v1.Channel/
update_mask (2.google.protobuf.FieldMask
-
validate_only (BàA"i
+
validate_only (BàA"i
DeleteChannelRequest5
name ( B\'àAúA!
eventarc.googleapis.com/Channel
-
validate_only (BàA"L
+
validate_only (BàA"L
GetProviderRequest6
name ( B(àAúA"
eventarc.googleapis.com/Provider"™
@@ -126,7 +130,139 @@ public static function initOnce() {
update_mask (2.google.protobuf.FieldMask"b
GetGoogleChannelConfigRequestA
name ( B3àAúA-
-+eventarc.googleapis.com/GoogleChannelConfig"€
++eventarc.googleapis.com/GoogleChannelConfig"P
+GetMessageBusRequest8
+name ( B*àAúA$
+"eventarc.googleapis.com/MessageBus"²
+ListMessageBusesRequest:
+parent ( B*àAúA$"eventarc.googleapis.com/MessageBus
+ page_size (BàA
+
+page_token ( BàA
+order_by ( BàA
+filter ( BàA"…
+ListMessageBusesResponse;
+
message_buses (2$.google.cloud.eventarc.v1.MessageBus
+next_page_token (
+unreachable ( "
+ ListMessageBusEnrollmentsRequest:
+parent ( B*àAúA$
+"eventarc.googleapis.com/MessageBus
+ page_size (BàA
+
+page_token ( BàA"f
+!ListMessageBusEnrollmentsResponse
+enrollments (
+next_page_token (
+unreachable ( "Î
+CreateMessageBusRequest:
+parent ( B*àAúA$"eventarc.googleapis.com/MessageBus>
+message_bus (2$.google.cloud.eventarc.v1.MessageBusBàA
+message_bus_id ( BàA
+
validate_only (BàA"Ç
+UpdateMessageBusRequest>
+message_bus (2$.google.cloud.eventarc.v1.MessageBusBàA4
+update_mask (2.google.protobuf.FieldMaskBàA
+
allow_missing (BàA
+
validate_only (BàA"ž
+DeleteMessageBusRequest8
+name ( B*àAúA$
+"eventarc.googleapis.com/MessageBus
+etag ( BàA
+
allow_missing (BàA
+
validate_only (BàA"P
+GetEnrollmentRequest8
+name ( B*àAúA$
+"eventarc.googleapis.com/Enrollment"±
+ListEnrollmentsRequest:
+parent ( B*àAúA$"eventarc.googleapis.com/Enrollment
+ page_size (BàA
+
+page_token ( BàA
+order_by ( BàA
+filter ( BàA"‚
+ListEnrollmentsResponse9
+enrollments (2$.google.cloud.eventarc.v1.Enrollment
+next_page_token (
+unreachable ( "Ì
+CreateEnrollmentRequest:
+parent ( B*àAúA$"eventarc.googleapis.com/Enrollment=
+
+enrollment (2$.google.cloud.eventarc.v1.EnrollmentBàA
+
enrollment_id ( BàA
+
validate_only (BàA"Æ
+UpdateEnrollmentRequest=
+
+enrollment (2$.google.cloud.eventarc.v1.EnrollmentBàA4
+update_mask (2.google.protobuf.FieldMaskBàA
+
allow_missing (BàA
+
validate_only (BàA"ž
+DeleteEnrollmentRequest8
+name ( B*àAúA$
+"eventarc.googleapis.com/Enrollment
+etag ( BàA
+
allow_missing (BàA
+
validate_only (BàA"L
+GetPipelineRequest6
+name ( B(àAúA"
+ eventarc.googleapis.com/Pipeline"
+ListPipelinesRequest8
+parent ( B(àAúA" eventarc.googleapis.com/Pipeline
+ page_size (BàA
+
+page_token ( BàA
+order_by ( BàA
+filter ( BàA"|
+ListPipelinesResponse5
+ pipelines (2".google.cloud.eventarc.v1.Pipeline
+next_page_token (
+unreachable ( "Â
+CreatePipelineRequest8
+parent ( B(àAúA" eventarc.googleapis.com/Pipeline9
+pipeline (2".google.cloud.eventarc.v1.PipelineBàA
+pipeline_id ( BàA
+
validate_only (BàA"À
+UpdatePipelineRequest9
+pipeline (2".google.cloud.eventarc.v1.PipelineBàA4
+update_mask (2.google.protobuf.FieldMaskBàA
+
allow_missing (BàA
+
validate_only (BàA"š
+DeletePipelineRequest6
+name ( B(àAúA"
+ eventarc.googleapis.com/Pipeline
+etag ( BàA
+
allow_missing (BàA
+
validate_only (BàA"Z
+GetGoogleApiSourceRequest=
+name ( B/àAúA)
+\'eventarc.googleapis.com/GoogleApiSource"»
+ListGoogleApiSourcesRequest?
+parent ( B/àAúA)\'eventarc.googleapis.com/GoogleApiSource
+ page_size (BàA
+
+page_token ( BàA
+order_by ( BàA
+filter ( BàA"“
+ListGoogleApiSourcesResponseE
+google_api_sources (2).google.cloud.eventarc.v1.GoogleApiSource
+next_page_token (
+unreachable ( "é
+CreateGoogleApiSourceRequest?
+parent ( B/àAúA)\'eventarc.googleapis.com/GoogleApiSourceI
+google_api_source (2).google.cloud.eventarc.v1.GoogleApiSourceBàA!
+google_api_source_id ( BàA
+
validate_only (BàA"×
+UpdateGoogleApiSourceRequestI
+google_api_source (2).google.cloud.eventarc.v1.GoogleApiSourceBàA4
+update_mask (2.google.protobuf.FieldMaskBàA
+
allow_missing (BàA
+
validate_only (BàA"¨
+DeleteGoogleApiSourceRequest=
+name ( B/àAúA)
+\'eventarc.googleapis.com/GoogleApiSource
+etag ( BàA
+
allow_missing (BàA
+
validate_only (BàA"€
OperationMetadata4
create_time (2.google.protobuf.TimestampBàA1
end_time (2.google.protobuf.TimestampBàA
@@ -134,7 +270,7 @@ public static function initOnce() {
verb ( BàA
status_message ( BàA#
requested_cancellation (BàA
-api_version ( BàA2Ï
+api_version ( BàA2õ@
Eventarc™
GetTrigger+.google.cloud.eventarc.v1.GetTriggerRequest!.google.cloud.eventarc.v1.Trigger";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/triggers/*}¬
@@ -163,7 +299,48 @@ public static function initOnce() {
DeleteChannelConnection8.google.cloud.eventarc.v1.DeleteChannelConnectionRequest.google.longrunning.Operation"nÊA&
ChannelConnectionOperationMetadataÚAname‚Óä“8*6/v1/{name=projects/*/locations/*/channelConnections/*}Æ
GetGoogleChannelConfig7.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/googleChannelConfig}—
-UpdateGoogleChannelConfig:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"ŽÚA!google_channel_config,update_mask‚Óä“d2K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:google_channel_configKÊAeventarc.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB½
+UpdateGoogleChannelConfig:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"ŽÚA!google_channel_config,update_mask‚Óä“d2K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:google_channel_config¦
+
GetMessageBus..google.cloud.eventarc.v1.GetMessageBusRequest$.google.cloud.eventarc.v1.MessageBus"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/messageBuses/*}¼
+ListMessageBuses1.google.cloud.eventarc.v1.ListMessageBusesRequest2.google.cloud.eventarc.v1.ListMessageBusesResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/messageBusesé
+ListMessageBusEnrollments:.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest;.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollmentsò
+CreateMessageBus1.google.cloud.eventarc.v1.CreateMessageBusRequest.google.longrunning.Operation"‹ÊA
+
+MessageBusOperationMetadataÚA!parent,message_bus,message_bus_id‚Óä“?"0/v1/{parent=projects/*/locations/*}/messageBuses:message_busô
+UpdateMessageBus1.google.cloud.eventarc.v1.UpdateMessageBusRequest.google.longrunning.Operation"ÊA
+
+MessageBusOperationMetadataÚAmessage_bus,update_mask‚Óä“K2ÚAname‚Óä“1//v1/{name=projects/*/locations/*/enrollments/*}¸
+ListEnrollments0.google.cloud.eventarc.v1.ListEnrollmentsRequest1.google.cloud.eventarc.v1.ListEnrollmentsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/enrollmentsî
+CreateEnrollment1.google.cloud.eventarc.v1.CreateEnrollmentRequest.google.longrunning.Operation"‡ÊA
+
+EnrollmentOperationMetadataÚAparent,enrollment,enrollment_id‚Óä“="//v1/{parent=projects/*/locations/*}/enrollments:
+enrollmentð
+UpdateEnrollment1.google.cloud.eventarc.v1.UpdateEnrollmentRequest.google.longrunning.Operation"‰ÊA
+
+EnrollmentOperationMetadataÚAenrollment,update_mask‚Óä“H2:/v1/{enrollment.name=projects/*/locations/*/enrollments/*}:
+enrollmentË
+DeleteEnrollment1.google.cloud.eventarc.v1.DeleteEnrollmentRequest.google.longrunning.Operation"eÊA
+
+EnrollmentOperationMetadataÚA name,etag‚Óä“1*//v1/{name=projects/*/locations/*/enrollments/*}
+GetPipeline,.google.cloud.eventarc.v1.GetPipelineRequest".google.cloud.eventarc.v1.Pipeline"<ÚAname‚Óä“/-/v1/{name=projects/*/locations/*/pipelines/*}°
+
ListPipelines..google.cloud.eventarc.v1.ListPipelinesRequest/.google.cloud.eventarc.v1.ListPipelinesResponse">ÚAparent‚Óä“/-/v1/{parent=projects/*/locations/*}/pipelinesß
+CreatePipeline/.google.cloud.eventarc.v1.CreatePipelineRequest.google.longrunning.Operation"}ÊA
+PipelineOperationMetadataÚAparent,pipeline,pipeline_id‚Óä“9"-/v1/{parent=projects/*/locations/*}/pipelines:pipelineá
+UpdatePipeline/.google.cloud.eventarc.v1.UpdatePipelineRequest.google.longrunning.Operation"ÊA
+PipelineOperationMetadataÚApipeline,update_mask‚Óä“B26/v1/{pipeline.name=projects/*/locations/*/pipelines/*}:pipelineÃ
+DeletePipeline/.google.cloud.eventarc.v1.DeletePipelineRequest.google.longrunning.Operation"aÊA
+PipelineOperationMetadataÚA name,etag‚Óä“/*-/v1/{name=projects/*/locations/*/pipelines/*}¹
+GetGoogleApiSource3.google.cloud.eventarc.v1.GetGoogleApiSourceRequest).google.cloud.eventarc.v1.GoogleApiSource"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/googleApiSources/*}Ì
+ListGoogleApiSources5.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest6.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*}/googleApiSources—
+CreateGoogleApiSource6.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.google.longrunning.Operation"¦ÊA$
+GoogleApiSourceOperationMetadataÚA-parent,google_api_source,google_api_source_id‚Óä“I"4/v1/{parent=projects/*/locations/*}/googleApiSources:google_api_source™
+UpdateGoogleApiSource6.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.google.longrunning.Operation"¨ÊA$
+GoogleApiSourceOperationMetadataÚAgoogle_api_source,update_mask‚Óä“[2F/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}:google_api_sourceß
+DeleteGoogleApiSource6.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest.google.longrunning.Operation"oÊA$
+GoogleApiSourceOperationMetadataÚA name,etag‚Óä“6*4/v1/{name=projects/*/locations/*/googleApiSources/*}KÊAeventarc.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB½
com.google.cloud.eventarc.v1B
EventarcProtoPZ8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3'
, true);
diff --git a/Eventarc/metadata/V1/GoogleApiSource.php b/Eventarc/metadata/V1/GoogleApiSource.php
new file mode 100644
index 000000000000..2d3a1acb1c57
--- /dev/null
+++ b/Eventarc/metadata/V1/GoogleApiSource.php
@@ -0,0 +1,54 @@
+internalAddGeneratedFile(
+ '
+ï
+0google/cloud/eventarc/v1/google_api_source.protogoogle.cloud.eventarc.v1google/api/field_info.protogoogle/api/resource.proto-google/cloud/eventarc/v1/logging_config.protogoogle/protobuf/timestamp.proto"É
+GoogleApiSource
+name ( BàA
+uid ( BàAâŒÏ×
+etag ( BàA4
+create_time (2.google.protobuf.TimestampBàA4
+update_time (2.google.protobuf.TimestampBàAJ
+labels (25.google.cloud.eventarc.v1.GoogleApiSource.LabelsEntryBàAT
+annotations (2:.google.cloud.eventarc.v1.GoogleApiSource.AnnotationsEntryBàA
+display_name ( BàA?
+destination ( B*àAúA$
+"eventarc.googleapis.com/MessageBusB
+crypto_key_name
+ ( B)àAúA#
+!cloudkms.googleapis.com/CryptoKeyD
+logging_config (2\'.google.cloud.eventarc.v1.LoggingConfigBàA-
+LabelsEntry
+key (
+value ( :82
+AnnotationsEntry
+key (
+value ( :8:žêAš
+\'eventarc.googleapis.com/GoogleApiSourceLprojects/{project}/locations/{location}/googleApiSources/{google_api_source}*googleApiSources2googleApiSourceBÄ
+com.google.cloud.eventarc.v1BGoogleApiSourceProtoPZ8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/Eventarc/metadata/V1/LoggingConfig.php b/Eventarc/metadata/V1/LoggingConfig.php
new file mode 100644
index 000000000000..73f9aeba0dea
Binary files /dev/null and b/Eventarc/metadata/V1/LoggingConfig.php differ
diff --git a/Eventarc/metadata/V1/MessageBus.php b/Eventarc/metadata/V1/MessageBus.php
new file mode 100644
index 000000000000..1b8f2ed0c15f
--- /dev/null
+++ b/Eventarc/metadata/V1/MessageBus.php
@@ -0,0 +1,53 @@
+internalAddGeneratedFile(
+ '
+×
+*google/cloud/eventarc/v1/message_bus.protogoogle.cloud.eventarc.v1google/api/resource.proto-google/cloud/eventarc/v1/logging_config.protogoogle/protobuf/timestamp.proto"Ù
+
+MessageBus
+name ( BàA
+uid ( BàA
+etag ( BàA4
+create_time (2.google.protobuf.TimestampBàA4
+update_time (2.google.protobuf.TimestampBàAE
+labels (20.google.cloud.eventarc.v1.MessageBus.LabelsEntryBàAO
+annotations (25.google.cloud.eventarc.v1.MessageBus.AnnotationsEntryBàA
+display_name ( BàAB
+crypto_key_name
+ ( B)àAúA#
+!cloudkms.googleapis.com/CryptoKeyD
+logging_config (2\'.google.cloud.eventarc.v1.LoggingConfigBàA-
+LabelsEntry
+key (
+value ( :82
+AnnotationsEntry
+key (
+value ( :8:†êA‚
+"eventarc.googleapis.com/MessageBusBprojects/{project}/locations/{location}/messageBuses/{message_bus}*messageBuses2
+messageBusB¿
+com.google.cloud.eventarc.v1BMessageBusProtoPZ8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/Eventarc/metadata/V1/NetworkConfig.php b/Eventarc/metadata/V1/NetworkConfig.php
new file mode 100644
index 000000000000..f04fa3828dde
--- /dev/null
+++ b/Eventarc/metadata/V1/NetworkConfig.php
@@ -0,0 +1,32 @@
+internalAddGeneratedFile(
+ '
+
+-google/cloud/eventarc/v1/network_config.protogoogle.cloud.eventarc.v1google/api/resource.proto"]
+
NetworkConfigL
+network_attachment ( B0àAúA*
+(compute.googleapis.com/NetworkAttachmentBÂ
+com.google.cloud.eventarc.v1BNetworkConfigProtoPZ8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpbªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3'
+ , true);
+
+ static::$is_initialized = true;
+ }
+}
+
diff --git a/Eventarc/metadata/V1/Pipeline.php b/Eventarc/metadata/V1/Pipeline.php
new file mode 100644
index 000000000000..65ff91e3be27
Binary files /dev/null and b/Eventarc/metadata/V1/Pipeline.php differ
diff --git a/Eventarc/metadata/V1/Trigger.php b/Eventarc/metadata/V1/Trigger.php
index 16e2f1153d93..047dcf6b0f48 100644
Binary files a/Eventarc/metadata/V1/Trigger.php and b/Eventarc/metadata/V1/Trigger.php differ
diff --git a/Eventarc/samples/V1/EventarcClient/create_channel.php b/Eventarc/samples/V1/EventarcClient/create_channel.php
index c485e8027dea..d44588c57f8a 100644
--- a/Eventarc/samples/V1/EventarcClient/create_channel.php
+++ b/Eventarc/samples/V1/EventarcClient/create_channel.php
@@ -39,14 +39,11 @@
* location on the project and must be in
* `projects/{project}/locations/{location}/channels/{channel_id}` format.
* @param string $channelId The user-provided ID to be assigned to the channel.
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
*/
function create_channel_sample(
string $formattedParent,
string $channelName,
- string $channelId,
- bool $validateOnly
+ string $channelId
): void {
// Create a client.
$eventarcClient = new EventarcClient();
@@ -57,8 +54,7 @@ function create_channel_sample(
$request = (new CreateChannelRequest())
->setParent($formattedParent)
->setChannel($channel)
- ->setChannelId($channelId)
- ->setValidateOnly($validateOnly);
+ ->setChannelId($channelId);
// Call the API and handle any network failures.
try {
@@ -94,8 +90,7 @@ function callSample(): void
$formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
$channelName = '[NAME]';
$channelId = '[CHANNEL_ID]';
- $validateOnly = false;
- create_channel_sample($formattedParent, $channelName, $channelId, $validateOnly);
+ create_channel_sample($formattedParent, $channelName, $channelId);
}
// [END eventarc_v1_generated_Eventarc_CreateChannel_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/create_enrollment.php b/Eventarc/samples/V1/EventarcClient/create_enrollment.php
new file mode 100644
index 000000000000..dfa7ba61b56c
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/create_enrollment.php
@@ -0,0 +1,119 @@
+setCelMatch($enrollmentCelMatch)
+ ->setMessageBus($formattedEnrollmentMessageBus)
+ ->setDestination($enrollmentDestination);
+ $request = (new CreateEnrollmentRequest())
+ ->setParent($formattedParent)
+ ->setEnrollment($enrollment)
+ ->setEnrollmentId($enrollmentId);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->createEnrollment($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Enrollment $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+ $enrollmentCelMatch = '[CEL_MATCH]';
+ $formattedEnrollmentMessageBus = EventarcClient::messageBusName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[MESSAGE_BUS]'
+ );
+ $enrollmentDestination = '[DESTINATION]';
+ $enrollmentId = '[ENROLLMENT_ID]';
+
+ create_enrollment_sample(
+ $formattedParent,
+ $enrollmentCelMatch,
+ $formattedEnrollmentMessageBus,
+ $enrollmentDestination,
+ $enrollmentId
+ );
+}
+// [END eventarc_v1_generated_Eventarc_CreateEnrollment_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/create_google_api_source.php b/Eventarc/samples/V1/EventarcClient/create_google_api_source.php
new file mode 100644
index 000000000000..cea200a0bfa6
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/create_google_api_source.php
@@ -0,0 +1,107 @@
+setDestination($formattedGoogleApiSourceDestination);
+ $request = (new CreateGoogleApiSourceRequest())
+ ->setParent($formattedParent)
+ ->setGoogleApiSource($googleApiSource)
+ ->setGoogleApiSourceId($googleApiSourceId);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->createGoogleApiSource($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var GoogleApiSource $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+ $formattedGoogleApiSourceDestination = EventarcClient::messageBusName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[MESSAGE_BUS]'
+ );
+ $googleApiSourceId = '[GOOGLE_API_SOURCE_ID]';
+
+ create_google_api_source_sample(
+ $formattedParent,
+ $formattedGoogleApiSourceDestination,
+ $googleApiSourceId
+ );
+}
+// [END eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/create_message_bus.php b/Eventarc/samples/V1/EventarcClient/create_message_bus.php
new file mode 100644
index 000000000000..9aca0e8d8b9f
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/create_message_bus.php
@@ -0,0 +1,89 @@
+setParent($formattedParent)
+ ->setMessageBus($messageBus)
+ ->setMessageBusId($messageBusId);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->createMessageBus($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var MessageBus $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+ $messageBusId = '[MESSAGE_BUS_ID]';
+
+ create_message_bus_sample($formattedParent, $messageBusId);
+}
+// [END eventarc_v1_generated_Eventarc_CreateMessageBus_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/create_pipeline.php b/Eventarc/samples/V1/EventarcClient/create_pipeline.php
new file mode 100644
index 000000000000..f3911821a94d
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/create_pipeline.php
@@ -0,0 +1,91 @@
+setDestinations($pipelineDestinations);
+ $request = (new CreatePipelineRequest())
+ ->setParent($formattedParent)
+ ->setPipeline($pipeline)
+ ->setPipelineId($pipelineId);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->createPipeline($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Pipeline $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+ $pipelineId = '[PIPELINE_ID]';
+
+ create_pipeline_sample($formattedParent, $pipelineId);
+}
+// [END eventarc_v1_generated_Eventarc_CreatePipeline_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/create_trigger.php b/Eventarc/samples/V1/EventarcClient/create_trigger.php
index 808ebe0792a9..85808f930bdc 100644
--- a/Eventarc/samples/V1/EventarcClient/create_trigger.php
+++ b/Eventarc/samples/V1/EventarcClient/create_trigger.php
@@ -37,25 +37,24 @@
*
* @param string $formattedParent The parent collection in which to add this trigger. Please see
* {@see EventarcClient::locationName()} for help formatting this field.
- * @param string $triggerName The resource name of the trigger. Must be unique within the location of the
- * project and must be in
+ * @param string $triggerName The resource name of the trigger. Must be unique within the
+ * location of the project and must be in
* `projects/{project}/locations/{location}/triggers/{trigger}` format.
- * @param string $triggerEventFiltersAttribute The name of a CloudEvents attribute. Currently, only a subset of attributes
- * are supported for filtering.
+ * @param string $triggerEventFiltersAttribute The name of a CloudEvents attribute. Currently, only a subset of
+ * attributes are supported for filtering. You can [retrieve a specific
+ * provider's supported event
+ * types](/eventarc/docs/list-providers#describe-provider).
*
* All triggers MUST provide a filter for the 'type' attribute.
* @param string $triggerEventFiltersValue The value for the attribute.
* @param string $triggerId The user-provided ID to be assigned to the trigger.
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
*/
function create_trigger_sample(
string $formattedParent,
string $triggerName,
string $triggerEventFiltersAttribute,
string $triggerEventFiltersValue,
- string $triggerId,
- bool $validateOnly
+ string $triggerId
): void {
// Create a client.
$eventarcClient = new EventarcClient();
@@ -73,8 +72,7 @@ function create_trigger_sample(
$request = (new CreateTriggerRequest())
->setParent($formattedParent)
->setTrigger($trigger)
- ->setTriggerId($triggerId)
- ->setValidateOnly($validateOnly);
+ ->setTriggerId($triggerId);
// Call the API and handle any network failures.
try {
@@ -112,15 +110,13 @@ function callSample(): void
$triggerEventFiltersAttribute = '[ATTRIBUTE]';
$triggerEventFiltersValue = '[VALUE]';
$triggerId = '[TRIGGER_ID]';
- $validateOnly = false;
create_trigger_sample(
$formattedParent,
$triggerName,
$triggerEventFiltersAttribute,
$triggerEventFiltersValue,
- $triggerId,
- $validateOnly
+ $triggerId
);
}
// [END eventarc_v1_generated_Eventarc_CreateTrigger_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_channel.php b/Eventarc/samples/V1/EventarcClient/delete_channel.php
index 50a8f8bca2ca..e81087bb17c4 100644
--- a/Eventarc/samples/V1/EventarcClient/delete_channel.php
+++ b/Eventarc/samples/V1/EventarcClient/delete_channel.php
@@ -35,18 +35,15 @@
*
* @param string $formattedName The name of the channel to be deleted. Please see
* {@see EventarcClient::channelName()} for help formatting this field.
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
*/
-function delete_channel_sample(string $formattedName, bool $validateOnly): void
+function delete_channel_sample(string $formattedName): void
{
// Create a client.
$eventarcClient = new EventarcClient();
// Prepare the request message.
$request = (new DeleteChannelRequest())
- ->setName($formattedName)
- ->setValidateOnly($validateOnly);
+ ->setName($formattedName);
// Call the API and handle any network failures.
try {
@@ -80,8 +77,7 @@ function delete_channel_sample(string $formattedName, bool $validateOnly): void
function callSample(): void
{
$formattedName = EventarcClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
- $validateOnly = false;
- delete_channel_sample($formattedName, $validateOnly);
+ delete_channel_sample($formattedName);
}
// [END eventarc_v1_generated_Eventarc_DeleteChannel_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_enrollment.php b/Eventarc/samples/V1/EventarcClient/delete_enrollment.php
new file mode 100644
index 000000000000..411125b20bcd
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/delete_enrollment.php
@@ -0,0 +1,83 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->deleteEnrollment($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Enrollment $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+
+ delete_enrollment_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_DeleteEnrollment_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_google_api_source.php b/Eventarc/samples/V1/EventarcClient/delete_google_api_source.php
new file mode 100644
index 000000000000..11b4caf3fd3e
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/delete_google_api_source.php
@@ -0,0 +1,87 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->deleteGoogleApiSource($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var GoogleApiSource $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::googleApiSourceName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[GOOGLE_API_SOURCE]'
+ );
+
+ delete_google_api_source_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_message_bus.php b/Eventarc/samples/V1/EventarcClient/delete_message_bus.php
new file mode 100644
index 000000000000..cc88f5738e9b
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/delete_message_bus.php
@@ -0,0 +1,83 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->deleteMessageBus($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var MessageBus $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+
+ delete_message_bus_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_DeleteMessageBus_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_pipeline.php b/Eventarc/samples/V1/EventarcClient/delete_pipeline.php
new file mode 100644
index 000000000000..e5bcc5436686
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/delete_pipeline.php
@@ -0,0 +1,83 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->deletePipeline($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Pipeline $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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 = EventarcClient::pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+
+ delete_pipeline_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_DeletePipeline_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/delete_trigger.php b/Eventarc/samples/V1/EventarcClient/delete_trigger.php
index 145664754c4a..b478719abe9a 100644
--- a/Eventarc/samples/V1/EventarcClient/delete_trigger.php
+++ b/Eventarc/samples/V1/EventarcClient/delete_trigger.php
@@ -35,18 +35,15 @@
*
* @param string $formattedName The name of the trigger to be deleted. Please see
* {@see EventarcClient::triggerName()} for help formatting this field.
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
*/
-function delete_trigger_sample(string $formattedName, bool $validateOnly): void
+function delete_trigger_sample(string $formattedName): void
{
// Create a client.
$eventarcClient = new EventarcClient();
// Prepare the request message.
$request = (new DeleteTriggerRequest())
- ->setName($formattedName)
- ->setValidateOnly($validateOnly);
+ ->setName($formattedName);
// Call the API and handle any network failures.
try {
@@ -80,8 +77,7 @@ function delete_trigger_sample(string $formattedName, bool $validateOnly): void
function callSample(): void
{
$formattedName = EventarcClient::triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
- $validateOnly = false;
- delete_trigger_sample($formattedName, $validateOnly);
+ delete_trigger_sample($formattedName);
}
// [END eventarc_v1_generated_Eventarc_DeleteTrigger_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/get_enrollment.php b/Eventarc/samples/V1/EventarcClient/get_enrollment.php
new file mode 100644
index 000000000000..e05d928e417a
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/get_enrollment.php
@@ -0,0 +1,71 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var Enrollment $response */
+ $response = $eventarcClient->getEnrollment($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 = EventarcClient::enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+
+ get_enrollment_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_GetEnrollment_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/get_google_api_source.php b/Eventarc/samples/V1/EventarcClient/get_google_api_source.php
new file mode 100644
index 000000000000..c45c874e198d
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/get_google_api_source.php
@@ -0,0 +1,75 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var GoogleApiSource $response */
+ $response = $eventarcClient->getGoogleApiSource($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 = EventarcClient::googleApiSourceName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[GOOGLE_API_SOURCE]'
+ );
+
+ get_google_api_source_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/get_message_bus.php b/Eventarc/samples/V1/EventarcClient/get_message_bus.php
new file mode 100644
index 000000000000..5e6d2cbab565
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/get_message_bus.php
@@ -0,0 +1,71 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var MessageBus $response */
+ $response = $eventarcClient->getMessageBus($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 = EventarcClient::messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+
+ get_message_bus_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_GetMessageBus_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/get_pipeline.php b/Eventarc/samples/V1/EventarcClient/get_pipeline.php
new file mode 100644
index 000000000000..b720c97a70cb
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/get_pipeline.php
@@ -0,0 +1,71 @@
+setName($formattedName);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var Pipeline $response */
+ $response = $eventarcClient->getPipeline($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 = EventarcClient::pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+
+ get_pipeline_sample($formattedName);
+}
+// [END eventarc_v1_generated_Eventarc_GetPipeline_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/list_enrollments.php b/Eventarc/samples/V1/EventarcClient/list_enrollments.php
new file mode 100644
index 000000000000..a45acb7d1683
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/list_enrollments.php
@@ -0,0 +1,76 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $eventarcClient->listEnrollments($request);
+
+ /** @var Enrollment $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_enrollments_sample($formattedParent);
+}
+// [END eventarc_v1_generated_Eventarc_ListEnrollments_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/list_google_api_sources.php b/Eventarc/samples/V1/EventarcClient/list_google_api_sources.php
new file mode 100644
index 000000000000..c54259e74936
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/list_google_api_sources.php
@@ -0,0 +1,76 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $eventarcClient->listGoogleApiSources($request);
+
+ /** @var GoogleApiSource $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_google_api_sources_sample($formattedParent);
+}
+// [END eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/list_message_bus_enrollments.php b/Eventarc/samples/V1/EventarcClient/list_message_bus_enrollments.php
new file mode 100644
index 000000000000..6ca12dfcb569
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/list_message_bus_enrollments.php
@@ -0,0 +1,75 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $eventarcClient->listMessageBusEnrollments($request);
+
+ /** @var string $element */
+ foreach ($response as $element) {
+ printf('Element data: %s' . PHP_EOL, $element);
+ }
+ } 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 = EventarcClient::messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+
+ list_message_bus_enrollments_sample($formattedParent);
+}
+// [END eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/list_message_buses.php b/Eventarc/samples/V1/EventarcClient/list_message_buses.php
new file mode 100644
index 000000000000..0d80ec0418b6
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/list_message_buses.php
@@ -0,0 +1,76 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $eventarcClient->listMessageBuses($request);
+
+ /** @var MessageBus $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_message_buses_sample($formattedParent);
+}
+// [END eventarc_v1_generated_Eventarc_ListMessageBuses_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/list_pipelines.php b/Eventarc/samples/V1/EventarcClient/list_pipelines.php
new file mode 100644
index 000000000000..0555619a030b
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/list_pipelines.php
@@ -0,0 +1,76 @@
+setParent($formattedParent);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var PagedListResponse $response */
+ $response = $eventarcClient->listPipelines($request);
+
+ /** @var Pipeline $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]');
+
+ list_pipelines_sample($formattedParent);
+}
+// [END eventarc_v1_generated_Eventarc_ListPipelines_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_channel.php b/Eventarc/samples/V1/EventarcClient/update_channel.php
index 5b7155e0b218..6e2f23ad1338 100644
--- a/Eventarc/samples/V1/EventarcClient/update_channel.php
+++ b/Eventarc/samples/V1/EventarcClient/update_channel.php
@@ -33,17 +33,19 @@
/**
* Update a single channel.
*
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
+ * 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 update_channel_sample(bool $validateOnly): void
+function update_channel_sample(): void
{
// Create a client.
$eventarcClient = new EventarcClient();
// Prepare the request message.
- $request = (new UpdateChannelRequest())
- ->setValidateOnly($validateOnly);
+ $request = new UpdateChannelRequest();
// Call the API and handle any network failures.
try {
@@ -64,20 +66,4 @@ function update_channel_sample(bool $validateOnly): void
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
-{
- $validateOnly = false;
-
- update_channel_sample($validateOnly);
-}
// [END eventarc_v1_generated_Eventarc_UpdateChannel_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_enrollment.php b/Eventarc/samples/V1/EventarcClient/update_enrollment.php
new file mode 100644
index 000000000000..e545745a7362
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/update_enrollment.php
@@ -0,0 +1,107 @@
+setCelMatch($enrollmentCelMatch)
+ ->setMessageBus($formattedEnrollmentMessageBus)
+ ->setDestination($enrollmentDestination);
+ $request = (new UpdateEnrollmentRequest())
+ ->setEnrollment($enrollment);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->updateEnrollment($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Enrollment $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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
+{
+ $enrollmentCelMatch = '[CEL_MATCH]';
+ $formattedEnrollmentMessageBus = EventarcClient::messageBusName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[MESSAGE_BUS]'
+ );
+ $enrollmentDestination = '[DESTINATION]';
+
+ update_enrollment_sample(
+ $enrollmentCelMatch,
+ $formattedEnrollmentMessageBus,
+ $enrollmentDestination
+ );
+}
+// [END eventarc_v1_generated_Eventarc_UpdateEnrollment_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_google_api_source.php b/Eventarc/samples/V1/EventarcClient/update_google_api_source.php
new file mode 100644
index 000000000000..02a93fc736ea
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/update_google_api_source.php
@@ -0,0 +1,92 @@
+setDestination($formattedGoogleApiSourceDestination);
+ $request = (new UpdateGoogleApiSourceRequest())
+ ->setGoogleApiSource($googleApiSource);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->updateGoogleApiSource($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var GoogleApiSource $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->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
+{
+ $formattedGoogleApiSourceDestination = EventarcClient::messageBusName(
+ '[PROJECT]',
+ '[LOCATION]',
+ '[MESSAGE_BUS]'
+ );
+
+ update_google_api_source_sample($formattedGoogleApiSourceDestination);
+}
+// [END eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_message_bus.php b/Eventarc/samples/V1/EventarcClient/update_message_bus.php
new file mode 100644
index 000000000000..2797696cf25a
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/update_message_bus.php
@@ -0,0 +1,71 @@
+setMessageBus($messageBus);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->updateMessageBus($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var MessageBus $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+// [END eventarc_v1_generated_Eventarc_UpdateMessageBus_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_pipeline.php b/Eventarc/samples/V1/EventarcClient/update_pipeline.php
new file mode 100644
index 000000000000..379b26852258
--- /dev/null
+++ b/Eventarc/samples/V1/EventarcClient/update_pipeline.php
@@ -0,0 +1,74 @@
+setDestinations($pipelineDestinations);
+ $request = (new UpdatePipelineRequest())
+ ->setPipeline($pipeline);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var OperationResponse $response */
+ $response = $eventarcClient->updatePipeline($request);
+ $response->pollUntilComplete();
+
+ if ($response->operationSucceeded()) {
+ /** @var Pipeline $result */
+ $result = $response->getResult();
+ printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
+ } else {
+ /** @var Status $error */
+ $error = $response->getError();
+ printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
+ }
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+// [END eventarc_v1_generated_Eventarc_UpdatePipeline_sync]
diff --git a/Eventarc/samples/V1/EventarcClient/update_trigger.php b/Eventarc/samples/V1/EventarcClient/update_trigger.php
index f2904620802b..5d28febc7f94 100644
--- a/Eventarc/samples/V1/EventarcClient/update_trigger.php
+++ b/Eventarc/samples/V1/EventarcClient/update_trigger.php
@@ -33,17 +33,19 @@
/**
* Update a single trigger.
*
- * @param bool $validateOnly If set, validate the request and preview the review, but do not
- * post it.
+ * 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 update_trigger_sample(bool $validateOnly): void
+function update_trigger_sample(): void
{
// Create a client.
$eventarcClient = new EventarcClient();
// Prepare the request message.
- $request = (new UpdateTriggerRequest())
- ->setValidateOnly($validateOnly);
+ $request = new UpdateTriggerRequest();
// Call the API and handle any network failures.
try {
@@ -64,20 +66,4 @@ function update_trigger_sample(bool $validateOnly): void
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
-{
- $validateOnly = false;
-
- update_trigger_sample($validateOnly);
-}
// [END eventarc_v1_generated_Eventarc_UpdateTrigger_sync]
diff --git a/Eventarc/src/V1/Channel.php b/Eventarc/src/V1/Channel.php
index 79707cee439b..6a51e006a6f7 100644
--- a/Eventarc/src/V1/Channel.php
+++ b/Eventarc/src/V1/Channel.php
@@ -69,14 +69,21 @@ class Channel extends \Google\Protobuf\Internal\Message
*/
protected $activation_token = '';
/**
- * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * Resource name of a KMS crypto key (managed by the user) used to
* encrypt/decrypt their event data.
* It must match the pattern
* `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*
- * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * Generated from protobuf field string crypto_key_name = 11 [(.google.api.resource_reference) = {
*/
protected $crypto_key_name = '';
+ /**
+ * Output only. Whether or not this Channel satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $satisfies_pzs = false;
protected $transport;
/**
@@ -112,10 +119,13 @@ class Channel extends \Google\Protobuf\Internal\Message
* Output only. The activation token for the channel. The token must be used
* by the provider to register the channel for publishing.
* @type string $crypto_key_name
- * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * Resource name of a KMS crypto key (managed by the user) used to
* encrypt/decrypt their event data.
* It must match the pattern
* `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ * @type bool $satisfies_pzs
+ * Output only. Whether or not this Channel satisfies the requirements of
+ * physical zone separation
* }
*/
public function __construct($data = NULL) {
@@ -377,12 +387,12 @@ public function setActivationToken($var)
}
/**
- * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * Resource name of a KMS crypto key (managed by the user) used to
* encrypt/decrypt their event data.
* It must match the pattern
* `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*
- * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * Generated from protobuf field string crypto_key_name = 11 [(.google.api.resource_reference) = {
* @return string
*/
public function getCryptoKeyName()
@@ -391,12 +401,12 @@ public function getCryptoKeyName()
}
/**
- * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * Resource name of a KMS crypto key (managed by the user) used to
* encrypt/decrypt their event data.
* It must match the pattern
* `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
*
- * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * Generated from protobuf field string crypto_key_name = 11 [(.google.api.resource_reference) = {
* @param string $var
* @return $this
*/
@@ -408,6 +418,34 @@ public function setCryptoKeyName($var)
return $this;
}
+ /**
+ * Output only. Whether or not this Channel satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getSatisfiesPzs()
+ {
+ return $this->satisfies_pzs;
+ }
+
+ /**
+ * Output only. Whether or not this Channel satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setSatisfiesPzs($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->satisfies_pzs = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/Eventarc/src/V1/Client/EventarcClient.php b/Eventarc/src/V1/Client/EventarcClient.php
index 75f4c4a1bc56..75b327f6e27c 100644
--- a/Eventarc/src/V1/Client/EventarcClient.php
+++ b/Eventarc/src/V1/Client/EventarcClient.php
@@ -38,24 +38,49 @@
use Google\Cloud\Eventarc\V1\ChannelConnection;
use Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\CreateChannelRequest;
+use Google\Cloud\Eventarc\V1\CreateEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\CreateGoogleApiSourceRequest;
+use Google\Cloud\Eventarc\V1\CreateMessageBusRequest;
+use Google\Cloud\Eventarc\V1\CreatePipelineRequest;
use Google\Cloud\Eventarc\V1\CreateTriggerRequest;
use Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\DeleteChannelRequest;
+use Google\Cloud\Eventarc\V1\DeleteEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\DeleteGoogleApiSourceRequest;
+use Google\Cloud\Eventarc\V1\DeleteMessageBusRequest;
+use Google\Cloud\Eventarc\V1\DeletePipelineRequest;
use Google\Cloud\Eventarc\V1\DeleteTriggerRequest;
+use Google\Cloud\Eventarc\V1\Enrollment;
use Google\Cloud\Eventarc\V1\GetChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\GetChannelRequest;
+use Google\Cloud\Eventarc\V1\GetEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\GetGoogleApiSourceRequest;
use Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest;
+use Google\Cloud\Eventarc\V1\GetMessageBusRequest;
+use Google\Cloud\Eventarc\V1\GetPipelineRequest;
use Google\Cloud\Eventarc\V1\GetProviderRequest;
use Google\Cloud\Eventarc\V1\GetTriggerRequest;
+use Google\Cloud\Eventarc\V1\GoogleApiSource;
use Google\Cloud\Eventarc\V1\GoogleChannelConfig;
use Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest;
use Google\Cloud\Eventarc\V1\ListChannelsRequest;
+use Google\Cloud\Eventarc\V1\ListEnrollmentsRequest;
+use Google\Cloud\Eventarc\V1\ListGoogleApiSourcesRequest;
+use Google\Cloud\Eventarc\V1\ListMessageBusEnrollmentsRequest;
+use Google\Cloud\Eventarc\V1\ListMessageBusesRequest;
+use Google\Cloud\Eventarc\V1\ListPipelinesRequest;
use Google\Cloud\Eventarc\V1\ListProvidersRequest;
use Google\Cloud\Eventarc\V1\ListTriggersRequest;
+use Google\Cloud\Eventarc\V1\MessageBus;
+use Google\Cloud\Eventarc\V1\Pipeline;
use Google\Cloud\Eventarc\V1\Provider;
use Google\Cloud\Eventarc\V1\Trigger;
use Google\Cloud\Eventarc\V1\UpdateChannelRequest;
+use Google\Cloud\Eventarc\V1\UpdateEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\UpdateGoogleApiSourceRequest;
use Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest;
+use Google\Cloud\Eventarc\V1\UpdateMessageBusRequest;
+use Google\Cloud\Eventarc\V1\UpdatePipelineRequest;
use Google\Cloud\Eventarc\V1\UpdateTriggerRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
@@ -83,21 +108,42 @@
*
* @method PromiseInterface createChannelAsync(CreateChannelRequest $request, array $optionalArgs = [])
* @method PromiseInterface createChannelConnectionAsync(CreateChannelConnectionRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createEnrollmentAsync(CreateEnrollmentRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createGoogleApiSourceAsync(CreateGoogleApiSourceRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createMessageBusAsync(CreateMessageBusRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface createPipelineAsync(CreatePipelineRequest $request, array $optionalArgs = [])
* @method PromiseInterface createTriggerAsync(CreateTriggerRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteChannelAsync(DeleteChannelRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteChannelConnectionAsync(DeleteChannelConnectionRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteEnrollmentAsync(DeleteEnrollmentRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteGoogleApiSourceAsync(DeleteGoogleApiSourceRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deleteMessageBusAsync(DeleteMessageBusRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface deletePipelineAsync(DeletePipelineRequest $request, array $optionalArgs = [])
* @method PromiseInterface deleteTriggerAsync(DeleteTriggerRequest $request, array $optionalArgs = [])
* @method PromiseInterface getChannelAsync(GetChannelRequest $request, array $optionalArgs = [])
* @method PromiseInterface getChannelConnectionAsync(GetChannelConnectionRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getEnrollmentAsync(GetEnrollmentRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getGoogleApiSourceAsync(GetGoogleApiSourceRequest $request, array $optionalArgs = [])
* @method PromiseInterface getGoogleChannelConfigAsync(GetGoogleChannelConfigRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getMessageBusAsync(GetMessageBusRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface getPipelineAsync(GetPipelineRequest $request, array $optionalArgs = [])
* @method PromiseInterface getProviderAsync(GetProviderRequest $request, array $optionalArgs = [])
* @method PromiseInterface getTriggerAsync(GetTriggerRequest $request, array $optionalArgs = [])
* @method PromiseInterface listChannelConnectionsAsync(ListChannelConnectionsRequest $request, array $optionalArgs = [])
* @method PromiseInterface listChannelsAsync(ListChannelsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listEnrollmentsAsync(ListEnrollmentsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listGoogleApiSourcesAsync(ListGoogleApiSourcesRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listMessageBusEnrollmentsAsync(ListMessageBusEnrollmentsRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listMessageBusesAsync(ListMessageBusesRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface listPipelinesAsync(ListPipelinesRequest $request, array $optionalArgs = [])
* @method PromiseInterface listProvidersAsync(ListProvidersRequest $request, array $optionalArgs = [])
* @method PromiseInterface listTriggersAsync(ListTriggersRequest $request, array $optionalArgs = [])
* @method PromiseInterface updateChannelAsync(UpdateChannelRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateEnrollmentAsync(UpdateEnrollmentRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateGoogleApiSourceAsync(UpdateGoogleApiSourceRequest $request, array $optionalArgs = [])
* @method PromiseInterface updateGoogleChannelConfigAsync(UpdateGoogleChannelConfigRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updateMessageBusAsync(UpdateMessageBusRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface updatePipelineAsync(UpdatePipelineRequest $request, array $optionalArgs = [])
* @method PromiseInterface updateTriggerAsync(UpdateTriggerRequest $request, array $optionalArgs = [])
* @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = [])
* @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = [])
@@ -281,6 +327,44 @@ public static function cryptoKeyName(string $project, string $location, string $
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a enrollment
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $enrollment
+ *
+ * @return string The formatted enrollment resource.
+ */
+ public static function enrollmentName(string $project, string $location, string $enrollment): string
+ {
+ return self::getPathTemplate('enrollment')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'enrollment' => $enrollment,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * google_api_source resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $googleApiSource
+ *
+ * @return string The formatted google_api_source resource.
+ */
+ public static function googleApiSourceName(string $project, string $location, string $googleApiSource): string
+ {
+ return self::getPathTemplate('googleApiSource')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'google_api_source' => $googleApiSource,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a
* google_channel_config resource.
@@ -315,6 +399,63 @@ public static function locationName(string $project, string $location): string
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a message_bus
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $messageBus
+ *
+ * @return string The formatted message_bus resource.
+ */
+ public static function messageBusName(string $project, string $location, string $messageBus): string
+ {
+ return self::getPathTemplate('messageBus')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'message_bus' => $messageBus,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * network_attachment resource.
+ *
+ * @param string $project
+ * @param string $region
+ * @param string $networkattachment
+ *
+ * @return string The formatted network_attachment resource.
+ */
+ public static function networkAttachmentName(string $project, string $region, string $networkattachment): string
+ {
+ return self::getPathTemplate('networkAttachment')->render([
+ 'project' => $project,
+ 'region' => $region,
+ 'networkattachment' => $networkattachment,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a pipeline
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $pipeline
+ *
+ * @return string The formatted pipeline resource.
+ */
+ public static function pipelineName(string $project, string $location, string $pipeline): string
+ {
+ return self::getPathTemplate('pipeline')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'pipeline' => $pipeline,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a provider
* resource.
@@ -351,6 +492,23 @@ public static function serviceAccountName(string $project, string $serviceAccoun
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a topic
+ * resource.
+ *
+ * @param string $project
+ * @param string $topic
+ *
+ * @return string The formatted topic resource.
+ */
+ public static function topicName(string $project, string $topic): string
+ {
+ return self::getPathTemplate('topic')->render([
+ 'project' => $project,
+ 'topic' => $topic,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a trigger
* resource.
@@ -397,10 +555,16 @@ public static function workflowName(string $project, string $location, string $w
* - channelConnection: projects/{project}/locations/{location}/channelConnections/{channel_connection}
* - cloudFunction: projects/{project}/locations/{location}/functions/{function}
* - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
+ * - enrollment: projects/{project}/locations/{location}/enrollments/{enrollment}
+ * - googleApiSource: projects/{project}/locations/{location}/googleApiSources/{google_api_source}
* - googleChannelConfig: projects/{project}/locations/{location}/googleChannelConfig
* - location: projects/{project}/locations/{location}
+ * - messageBus: projects/{project}/locations/{location}/messageBuses/{message_bus}
+ * - networkAttachment: projects/{project}/regions/{region}/networkAttachments/{networkattachment}
+ * - pipeline: projects/{project}/locations/{location}/pipelines/{pipeline}
* - provider: projects/{project}/locations/{location}/providers/{provider}
* - serviceAccount: projects/{project}/serviceAccounts/{service_account}
+ * - topic: projects/{project}/topics/{topic}
* - trigger: projects/{project}/locations/{location}/triggers/{trigger}
* - workflow: projects/{project}/locations/{location}/workflows/{workflow}
*
@@ -548,6 +712,112 @@ public function createChannelConnection(
return $this->startApiCall('CreateChannelConnection', $request, $callOptions)->wait();
}
+ /**
+ * Create a new Enrollment in a particular project and location.
+ *
+ * The async variant is {@see EventarcClient::createEnrollmentAsync()} .
+ *
+ * @example samples/V1/EventarcClient/create_enrollment.php
+ *
+ * @param CreateEnrollmentRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createEnrollment(CreateEnrollmentRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreateEnrollment', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Create a new GoogleApiSource in a particular project and location.
+ *
+ * The async variant is {@see EventarcClient::createGoogleApiSourceAsync()} .
+ *
+ * @example samples/V1/EventarcClient/create_google_api_source.php
+ *
+ * @param CreateGoogleApiSourceRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createGoogleApiSource(
+ CreateGoogleApiSourceRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('CreateGoogleApiSource', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Create a new MessageBus in a particular project and location.
+ *
+ * The async variant is {@see EventarcClient::createMessageBusAsync()} .
+ *
+ * @example samples/V1/EventarcClient/create_message_bus.php
+ *
+ * @param CreateMessageBusRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createMessageBus(CreateMessageBusRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreateMessageBus', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Create a new Pipeline in a particular project and location.
+ *
+ * The async variant is {@see EventarcClient::createPipelineAsync()} .
+ *
+ * @example samples/V1/EventarcClient/create_pipeline.php
+ *
+ * @param CreatePipelineRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function createPipeline(CreatePipelineRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('CreatePipeline', $request, $callOptions)->wait();
+ }
+
/**
* Create a new trigger in a particular project and location.
*
@@ -628,6 +898,112 @@ public function deleteChannelConnection(
return $this->startApiCall('DeleteChannelConnection', $request, $callOptions)->wait();
}
+ /**
+ * Delete a single Enrollment.
+ *
+ * The async variant is {@see EventarcClient::deleteEnrollmentAsync()} .
+ *
+ * @example samples/V1/EventarcClient/delete_enrollment.php
+ *
+ * @param DeleteEnrollmentRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteEnrollment(DeleteEnrollmentRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteEnrollment', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Delete a single GoogleApiSource.
+ *
+ * The async variant is {@see EventarcClient::deleteGoogleApiSourceAsync()} .
+ *
+ * @example samples/V1/EventarcClient/delete_google_api_source.php
+ *
+ * @param DeleteGoogleApiSourceRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteGoogleApiSource(
+ DeleteGoogleApiSourceRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('DeleteGoogleApiSource', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Delete a single message bus.
+ *
+ * The async variant is {@see EventarcClient::deleteMessageBusAsync()} .
+ *
+ * @example samples/V1/EventarcClient/delete_message_bus.php
+ *
+ * @param DeleteMessageBusRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deleteMessageBus(DeleteMessageBusRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeleteMessageBus', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Delete a single pipeline.
+ *
+ * The async variant is {@see EventarcClient::deletePipelineAsync()} .
+ *
+ * @example samples/V1/EventarcClient/delete_pipeline.php
+ *
+ * @param DeletePipelineRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function deletePipeline(DeletePipelineRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('DeletePipeline', $request, $callOptions)->wait();
+ }
+
/**
* Delete a single trigger.
*
@@ -708,6 +1084,58 @@ public function getChannelConnection(
return $this->startApiCall('GetChannelConnection', $request, $callOptions)->wait();
}
+ /**
+ * Get a single Enrollment.
+ *
+ * The async variant is {@see EventarcClient::getEnrollmentAsync()} .
+ *
+ * @example samples/V1/EventarcClient/get_enrollment.php
+ *
+ * @param GetEnrollmentRequest $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 Enrollment
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getEnrollment(GetEnrollmentRequest $request, array $callOptions = []): Enrollment
+ {
+ return $this->startApiCall('GetEnrollment', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Get a single GoogleApiSource.
+ *
+ * The async variant is {@see EventarcClient::getGoogleApiSourceAsync()} .
+ *
+ * @example samples/V1/EventarcClient/get_google_api_source.php
+ *
+ * @param GetGoogleApiSourceRequest $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 GoogleApiSource
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getGoogleApiSource(GetGoogleApiSourceRequest $request, array $callOptions = []): GoogleApiSource
+ {
+ return $this->startApiCall('GetGoogleApiSource', $request, $callOptions)->wait();
+ }
+
/**
* Get a GoogleChannelConfig
*
@@ -736,6 +1164,58 @@ public function getGoogleChannelConfig(
return $this->startApiCall('GetGoogleChannelConfig', $request, $callOptions)->wait();
}
+ /**
+ * Get a single MessageBus.
+ *
+ * The async variant is {@see EventarcClient::getMessageBusAsync()} .
+ *
+ * @example samples/V1/EventarcClient/get_message_bus.php
+ *
+ * @param GetMessageBusRequest $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 MessageBus
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getMessageBus(GetMessageBusRequest $request, array $callOptions = []): MessageBus
+ {
+ return $this->startApiCall('GetMessageBus', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Get a single Pipeline.
+ *
+ * The async variant is {@see EventarcClient::getPipelineAsync()} .
+ *
+ * @example samples/V1/EventarcClient/get_pipeline.php
+ *
+ * @param GetPipelineRequest $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 Pipeline
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function getPipeline(GetPipelineRequest $request, array $callOptions = []): Pipeline
+ {
+ return $this->startApiCall('GetPipeline', $request, $callOptions)->wait();
+ }
+
/**
* Get a single Provider.
*
@@ -842,6 +1322,140 @@ public function listChannels(ListChannelsRequest $request, array $callOptions =
return $this->startApiCall('ListChannels', $request, $callOptions);
}
+ /**
+ * List Enrollments.
+ *
+ * The async variant is {@see EventarcClient::listEnrollmentsAsync()} .
+ *
+ * @example samples/V1/EventarcClient/list_enrollments.php
+ *
+ * @param ListEnrollmentsRequest $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 listEnrollments(ListEnrollmentsRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListEnrollments', $request, $callOptions);
+ }
+
+ /**
+ * List GoogleApiSources.
+ *
+ * The async variant is {@see EventarcClient::listGoogleApiSourcesAsync()} .
+ *
+ * @example samples/V1/EventarcClient/list_google_api_sources.php
+ *
+ * @param ListGoogleApiSourcesRequest $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 listGoogleApiSources(
+ ListGoogleApiSourcesRequest $request,
+ array $callOptions = []
+ ): PagedListResponse {
+ return $this->startApiCall('ListGoogleApiSources', $request, $callOptions);
+ }
+
+ /**
+ * List message bus enrollments.
+ *
+ * The async variant is {@see EventarcClient::listMessageBusEnrollmentsAsync()} .
+ *
+ * @example samples/V1/EventarcClient/list_message_bus_enrollments.php
+ *
+ * @param ListMessageBusEnrollmentsRequest $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 listMessageBusEnrollments(
+ ListMessageBusEnrollmentsRequest $request,
+ array $callOptions = []
+ ): PagedListResponse {
+ return $this->startApiCall('ListMessageBusEnrollments', $request, $callOptions);
+ }
+
+ /**
+ * List message buses.
+ *
+ * The async variant is {@see EventarcClient::listMessageBusesAsync()} .
+ *
+ * @example samples/V1/EventarcClient/list_message_buses.php
+ *
+ * @param ListMessageBusesRequest $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 listMessageBuses(ListMessageBusesRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListMessageBuses', $request, $callOptions);
+ }
+
+ /**
+ * List pipelines.
+ *
+ * The async variant is {@see EventarcClient::listPipelinesAsync()} .
+ *
+ * @example samples/V1/EventarcClient/list_pipelines.php
+ *
+ * @param ListPipelinesRequest $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 listPipelines(ListPipelinesRequest $request, array $callOptions = []): PagedListResponse
+ {
+ return $this->startApiCall('ListPipelines', $request, $callOptions);
+ }
+
/**
* List providers.
*
@@ -920,6 +1534,60 @@ public function updateChannel(UpdateChannelRequest $request, array $callOptions
return $this->startApiCall('UpdateChannel', $request, $callOptions)->wait();
}
+ /**
+ * Update a single Enrollment.
+ *
+ * The async variant is {@see EventarcClient::updateEnrollmentAsync()} .
+ *
+ * @example samples/V1/EventarcClient/update_enrollment.php
+ *
+ * @param UpdateEnrollmentRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateEnrollment(UpdateEnrollmentRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdateEnrollment', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Update a single GoogleApiSource.
+ *
+ * The async variant is {@see EventarcClient::updateGoogleApiSourceAsync()} .
+ *
+ * @example samples/V1/EventarcClient/update_google_api_source.php
+ *
+ * @param UpdateGoogleApiSourceRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateGoogleApiSource(
+ UpdateGoogleApiSourceRequest $request,
+ array $callOptions = []
+ ): OperationResponse {
+ return $this->startApiCall('UpdateGoogleApiSource', $request, $callOptions)->wait();
+ }
+
/**
* Update a single GoogleChannelConfig
*
@@ -948,6 +1616,58 @@ public function updateGoogleChannelConfig(
return $this->startApiCall('UpdateGoogleChannelConfig', $request, $callOptions)->wait();
}
+ /**
+ * Update a single message bus.
+ *
+ * The async variant is {@see EventarcClient::updateMessageBusAsync()} .
+ *
+ * @example samples/V1/EventarcClient/update_message_bus.php
+ *
+ * @param UpdateMessageBusRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updateMessageBus(UpdateMessageBusRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdateMessageBus', $request, $callOptions)->wait();
+ }
+
+ /**
+ * Update a single pipeline.
+ *
+ * The async variant is {@see EventarcClient::updatePipelineAsync()} .
+ *
+ * @example samples/V1/EventarcClient/update_pipeline.php
+ *
+ * @param UpdatePipelineRequest $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 OperationResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function updatePipeline(UpdatePipelineRequest $request, array $callOptions = []): OperationResponse
+ {
+ return $this->startApiCall('UpdatePipeline', $request, $callOptions)->wait();
+ }
+
/**
* Update a single trigger.
*
diff --git a/Eventarc/src/V1/CloudRun.php b/Eventarc/src/V1/CloudRun.php
index 9594f339c5fc..1b030dca2294 100644
--- a/Eventarc/src/V1/CloudRun.php
+++ b/Eventarc/src/V1/CloudRun.php
@@ -25,7 +25,8 @@ class CloudRun extends \Google\Protobuf\Internal\Message
*/
protected $service = '';
/**
- * Optional. The relative path on the Cloud Run service the events should be sent to.
+ * Optional. The relative path on the Cloud Run service the events should be
+ * sent to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
@@ -51,7 +52,8 @@ class CloudRun extends \Google\Protobuf\Internal\Message
* Only services located in the same project as the trigger object
* can be addressed.
* @type string $path
- * Optional. The relative path on the Cloud Run service the events should be sent to.
+ * Optional. The relative path on the Cloud Run service the events should be
+ * sent to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
* @type string $region
@@ -96,7 +98,8 @@ public function setService($var)
}
/**
- * Optional. The relative path on the Cloud Run service the events should be sent to.
+ * Optional. The relative path on the Cloud Run service the events should be
+ * sent to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
@@ -109,7 +112,8 @@ public function getPath()
}
/**
- * Optional. The relative path on the Cloud Run service the events should be sent to.
+ * Optional. The relative path on the Cloud Run service the events should be
+ * sent to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
diff --git a/Eventarc/src/V1/CreateChannelRequest.php b/Eventarc/src/V1/CreateChannelRequest.php
index 6e7d042f16ca..be57772dd014 100644
--- a/Eventarc/src/V1/CreateChannelRequest.php
+++ b/Eventarc/src/V1/CreateChannelRequest.php
@@ -34,10 +34,10 @@ class CreateChannelRequest extends \Google\Protobuf\Internal\Message
*/
protected $channel_id = '';
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -72,7 +72,7 @@ public static function build(string $parent, \Google\Cloud\Eventarc\V1\Channel $
* @type string $channel_id
* Required. The user-provided ID to be assigned to the channel.
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -170,10 +170,10 @@ public function setChannelId($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -182,10 +182,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/CreateEnrollmentRequest.php b/Eventarc/src/V1/CreateEnrollmentRequest.php
new file mode 100644
index 000000000000..541e6796863a
--- /dev/null
+++ b/Eventarc/src/V1/CreateEnrollmentRequest.php
@@ -0,0 +1,206 @@
+google.cloud.eventarc.v1.CreateEnrollmentRequest
+ */
+class CreateEnrollmentRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection in which to add this enrollment.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Required. The enrollment to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $enrollment = null;
+ /**
+ * Required. The user-provided ID to be assigned to the Enrollment. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string enrollment_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $enrollment_id = '';
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $parent Required. The parent collection in which to add this enrollment. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\Eventarc\V1\Enrollment $enrollment Required. The enrollment to create.
+ * @param string $enrollmentId Required. The user-provided ID to be assigned to the Enrollment. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * @return \Google\Cloud\Eventarc\V1\CreateEnrollmentRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\Eventarc\V1\Enrollment $enrollment, string $enrollmentId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setEnrollment($enrollment)
+ ->setEnrollmentId($enrollmentId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The parent collection in which to add this enrollment.
+ * @type \Google\Cloud\Eventarc\V1\Enrollment $enrollment
+ * Required. The enrollment to create.
+ * @type string $enrollment_id
+ * Required. The user-provided ID to be assigned to the Enrollment. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection in which to add this enrollment.
+ *
+ * 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. The parent collection in which to add this enrollment.
+ *
+ * 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;
+ }
+
+ /**
+ * Required. The enrollment to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\Enrollment|null
+ */
+ public function getEnrollment()
+ {
+ return $this->enrollment;
+ }
+
+ public function hasEnrollment()
+ {
+ return isset($this->enrollment);
+ }
+
+ public function clearEnrollment()
+ {
+ unset($this->enrollment);
+ }
+
+ /**
+ * Required. The enrollment to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\Enrollment $var
+ * @return $this
+ */
+ public function setEnrollment($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Enrollment::class);
+ $this->enrollment = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the Enrollment. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string enrollment_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getEnrollmentId()
+ {
+ return $this->enrollment_id;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the Enrollment. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string enrollment_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setEnrollmentId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->enrollment_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/CreateGoogleApiSourceRequest.php b/Eventarc/src/V1/CreateGoogleApiSourceRequest.php
new file mode 100644
index 000000000000..5070ae20182c
--- /dev/null
+++ b/Eventarc/src/V1/CreateGoogleApiSourceRequest.php
@@ -0,0 +1,206 @@
+google.cloud.eventarc.v1.CreateGoogleApiSourceRequest
+ */
+class CreateGoogleApiSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection in which to add this google api source.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Required. The google api source to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $google_api_source = null;
+ /**
+ * Required. The user-provided ID to be assigned to the GoogleApiSource. It
+ * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string google_api_source_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $google_api_source_id = '';
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $parent Required. The parent collection in which to add this google api source. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\Eventarc\V1\GoogleApiSource $googleApiSource Required. The google api source to create.
+ * @param string $googleApiSourceId Required. The user-provided ID to be assigned to the GoogleApiSource. It
+ * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * @return \Google\Cloud\Eventarc\V1\CreateGoogleApiSourceRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\Eventarc\V1\GoogleApiSource $googleApiSource, string $googleApiSourceId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setGoogleApiSource($googleApiSource)
+ ->setGoogleApiSourceId($googleApiSourceId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The parent collection in which to add this google api source.
+ * @type \Google\Cloud\Eventarc\V1\GoogleApiSource $google_api_source
+ * Required. The google api source to create.
+ * @type string $google_api_source_id
+ * Required. The user-provided ID to be assigned to the GoogleApiSource. It
+ * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection in which to add this google api source.
+ *
+ * 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. The parent collection in which to add this google api source.
+ *
+ * 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;
+ }
+
+ /**
+ * Required. The google api source to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\GoogleApiSource|null
+ */
+ public function getGoogleApiSource()
+ {
+ return $this->google_api_source;
+ }
+
+ public function hasGoogleApiSource()
+ {
+ return isset($this->google_api_source);
+ }
+
+ public function clearGoogleApiSource()
+ {
+ unset($this->google_api_source);
+ }
+
+ /**
+ * Required. The google api source to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\GoogleApiSource $var
+ * @return $this
+ */
+ public function setGoogleApiSource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GoogleApiSource::class);
+ $this->google_api_source = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the GoogleApiSource. It
+ * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string google_api_source_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getGoogleApiSourceId()
+ {
+ return $this->google_api_source_id;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the GoogleApiSource. It
+ * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
+ *
+ * Generated from protobuf field string google_api_source_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setGoogleApiSourceId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->google_api_source_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/CreateMessageBusRequest.php b/Eventarc/src/V1/CreateMessageBusRequest.php
new file mode 100644
index 000000000000..76d38e323df2
--- /dev/null
+++ b/Eventarc/src/V1/CreateMessageBusRequest.php
@@ -0,0 +1,206 @@
+google.cloud.eventarc.v1.CreateMessageBusRequest
+ */
+class CreateMessageBusRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection in which to add this message bus.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Required. The message bus to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $message_bus = null;
+ /**
+ * Required. The user-provided ID to be assigned to the MessageBus. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
+ *
+ * Generated from protobuf field string message_bus_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $message_bus_id = '';
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $parent Required. The parent collection in which to add this message bus. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\Eventarc\V1\MessageBus $messageBus Required. The message bus to create.
+ * @param string $messageBusId Required. The user-provided ID to be assigned to the MessageBus. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
+ *
+ * @return \Google\Cloud\Eventarc\V1\CreateMessageBusRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\Eventarc\V1\MessageBus $messageBus, string $messageBusId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setMessageBus($messageBus)
+ ->setMessageBusId($messageBusId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The parent collection in which to add this message bus.
+ * @type \Google\Cloud\Eventarc\V1\MessageBus $message_bus
+ * Required. The message bus to create.
+ * @type string $message_bus_id
+ * Required. The user-provided ID to be assigned to the MessageBus. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection in which to add this message bus.
+ *
+ * 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. The parent collection in which to add this message bus.
+ *
+ * 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;
+ }
+
+ /**
+ * Required. The message bus to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\MessageBus|null
+ */
+ public function getMessageBus()
+ {
+ return $this->message_bus;
+ }
+
+ public function hasMessageBus()
+ {
+ return isset($this->message_bus);
+ }
+
+ public function clearMessageBus()
+ {
+ unset($this->message_bus);
+ }
+
+ /**
+ * Required. The message bus to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\MessageBus $var
+ * @return $this
+ */
+ public function setMessageBus($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\MessageBus::class);
+ $this->message_bus = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the MessageBus. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
+ *
+ * Generated from protobuf field string message_bus_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getMessageBusId()
+ {
+ return $this->message_bus_id;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the MessageBus. It should
+ * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)
+ *
+ * Generated from protobuf field string message_bus_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setMessageBusId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message_bus_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/CreatePipelineRequest.php b/Eventarc/src/V1/CreatePipelineRequest.php
new file mode 100644
index 000000000000..c09197f49b40
--- /dev/null
+++ b/Eventarc/src/V1/CreatePipelineRequest.php
@@ -0,0 +1,201 @@
+google.cloud.eventarc.v1.CreatePipelineRequest
+ */
+class CreatePipelineRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection in which to add this pipeline.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Required. The pipeline to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $pipeline = null;
+ /**
+ * Required. The user-provided ID to be assigned to the Pipeline.
+ *
+ * Generated from protobuf field string pipeline_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $pipeline_id = '';
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $parent Required. The parent collection in which to add this pipeline. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ * @param \Google\Cloud\Eventarc\V1\Pipeline $pipeline Required. The pipeline to create.
+ * @param string $pipelineId Required. The user-provided ID to be assigned to the Pipeline.
+ *
+ * @return \Google\Cloud\Eventarc\V1\CreatePipelineRequest
+ *
+ * @experimental
+ */
+ public static function build(string $parent, \Google\Cloud\Eventarc\V1\Pipeline $pipeline, string $pipelineId): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setPipeline($pipeline)
+ ->setPipelineId($pipelineId);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $parent
+ * Required. The parent collection in which to add this pipeline.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline $pipeline
+ * Required. The pipeline to create.
+ * @type string $pipeline_id
+ * Required. The user-provided ID to be assigned to the Pipeline.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection in which to add this pipeline.
+ *
+ * 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. The parent collection in which to add this pipeline.
+ *
+ * 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;
+ }
+
+ /**
+ * Required. The pipeline to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline|null
+ */
+ public function getPipeline()
+ {
+ return $this->pipeline;
+ }
+
+ public function hasPipeline()
+ {
+ return isset($this->pipeline);
+ }
+
+ public function clearPipeline()
+ {
+ unset($this->pipeline);
+ }
+
+ /**
+ * Required. The pipeline to create.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline $var
+ * @return $this
+ */
+ public function setPipeline($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline::class);
+ $this->pipeline = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the Pipeline.
+ *
+ * Generated from protobuf field string pipeline_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getPipelineId()
+ {
+ return $this->pipeline_id;
+ }
+
+ /**
+ * Required. The user-provided ID to be assigned to the Pipeline.
+ *
+ * Generated from protobuf field string pipeline_id = 3 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setPipelineId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->pipeline_id = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/CreateTriggerRequest.php b/Eventarc/src/V1/CreateTriggerRequest.php
index 96788a4152fa..98083421cc3b 100644
--- a/Eventarc/src/V1/CreateTriggerRequest.php
+++ b/Eventarc/src/V1/CreateTriggerRequest.php
@@ -34,10 +34,10 @@ class CreateTriggerRequest extends \Google\Protobuf\Internal\Message
*/
protected $trigger_id = '';
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -72,7 +72,7 @@ public static function build(string $parent, \Google\Cloud\Eventarc\V1\Trigger $
* @type string $trigger_id
* Required. The user-provided ID to be assigned to the trigger.
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -170,10 +170,10 @@ public function setTriggerId($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -182,10 +182,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/DeleteChannelRequest.php b/Eventarc/src/V1/DeleteChannelRequest.php
index 30b84491f7e6..590a423a9f6e 100644
--- a/Eventarc/src/V1/DeleteChannelRequest.php
+++ b/Eventarc/src/V1/DeleteChannelRequest.php
@@ -22,10 +22,10 @@ class DeleteChannelRequest extends \Google\Protobuf\Internal\Message
*/
protected $name = '';
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -52,7 +52,7 @@ public static function build(string $name): self
* @type string $name
* Required. The name of the channel to be deleted.
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -88,10 +88,10 @@ public function setName($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -100,10 +100,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/DeleteEnrollmentRequest.php b/Eventarc/src/V1/DeleteEnrollmentRequest.php
new file mode 100644
index 000000000000..4eef495161bc
--- /dev/null
+++ b/Eventarc/src/V1/DeleteEnrollmentRequest.php
@@ -0,0 +1,198 @@
+google.cloud.eventarc.v1.DeleteEnrollmentRequest
+ */
+class DeleteEnrollmentRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the Enrollment to be deleted.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. If provided, the Enrollment will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = '';
+ /**
+ * Optional. If set to true, and the Enrollment is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $name Required. The name of the Enrollment to be deleted. Please see
+ * {@see EventarcClient::enrollmentName()} for help formatting this field.
+ * @param string $etag Optional. If provided, the Enrollment will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * @return \Google\Cloud\Eventarc\V1\DeleteEnrollmentRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name, string $etag): self
+ {
+ return (new self())
+ ->setName($name)
+ ->setEtag($etag);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the Enrollment to be deleted.
+ * @type string $etag
+ * Optional. If provided, the Enrollment will only be deleted if the etag
+ * matches the current etag on the resource.
+ * @type bool $allow_missing
+ * Optional. If set to true, and the Enrollment is not found, the request will
+ * succeed but no action will be taken on the server.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the Enrollment to be deleted.
+ *
+ * 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. The name of the Enrollment to be deleted.
+ *
+ * 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;
+ }
+
+ /**
+ * Optional. If provided, the Enrollment will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Optional. If provided, the Enrollment will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the Enrollment is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the Enrollment is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/DeleteGoogleApiSourceRequest.php b/Eventarc/src/V1/DeleteGoogleApiSourceRequest.php
new file mode 100644
index 000000000000..dc9beaf2e21d
--- /dev/null
+++ b/Eventarc/src/V1/DeleteGoogleApiSourceRequest.php
@@ -0,0 +1,198 @@
+google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest
+ */
+class DeleteGoogleApiSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the GoogleApiSource to be deleted.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = '';
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $name Required. The name of the GoogleApiSource to be deleted. Please see
+ * {@see EventarcClient::googleApiSourceName()} for help formatting this field.
+ * @param string $etag Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * @return \Google\Cloud\Eventarc\V1\DeleteGoogleApiSourceRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name, string $etag): self
+ {
+ return (new self())
+ ->setName($name)
+ ->setEtag($etag);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the GoogleApiSource to be deleted.
+ * @type string $etag
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ * @type bool $allow_missing
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the GoogleApiSource to be deleted.
+ *
+ * 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. The name of the GoogleApiSource to be deleted.
+ *
+ * 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;
+ }
+
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/DeleteMessageBusRequest.php b/Eventarc/src/V1/DeleteMessageBusRequest.php
new file mode 100644
index 000000000000..8b71397cc98d
--- /dev/null
+++ b/Eventarc/src/V1/DeleteMessageBusRequest.php
@@ -0,0 +1,198 @@
+google.cloud.eventarc.v1.DeleteMessageBusRequest
+ */
+class DeleteMessageBusRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the MessageBus to be deleted.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = '';
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $name Required. The name of the MessageBus to be deleted. Please see
+ * {@see EventarcClient::messageBusName()} for help formatting this field.
+ * @param string $etag Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * @return \Google\Cloud\Eventarc\V1\DeleteMessageBusRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name, string $etag): self
+ {
+ return (new self())
+ ->setName($name)
+ ->setEtag($etag);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the MessageBus to be deleted.
+ * @type string $etag
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ * @type bool $allow_missing
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the MessageBus to be deleted.
+ *
+ * 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. The name of the MessageBus to be deleted.
+ *
+ * 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;
+ }
+
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Optional. If provided, the MessageBus will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/DeletePipelineRequest.php b/Eventarc/src/V1/DeletePipelineRequest.php
new file mode 100644
index 000000000000..360d61522744
--- /dev/null
+++ b/Eventarc/src/V1/DeletePipelineRequest.php
@@ -0,0 +1,198 @@
+google.cloud.eventarc.v1.DeletePipelineRequest
+ */
+class DeletePipelineRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the Pipeline to be deleted.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+ /**
+ * Optional. If provided, the Pipeline will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $etag = '';
+ /**
+ * Optional. If set to true, and the Pipeline is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param string $name Required. The name of the Pipeline to be deleted. Please see
+ * {@see EventarcClient::pipelineName()} for help formatting this field.
+ * @param string $etag Optional. If provided, the Pipeline will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * @return \Google\Cloud\Eventarc\V1\DeletePipelineRequest
+ *
+ * @experimental
+ */
+ public static function build(string $name, string $etag): self
+ {
+ return (new self())
+ ->setName($name)
+ ->setEtag($etag);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Required. The name of the Pipeline to be deleted.
+ * @type string $etag
+ * Optional. If provided, the Pipeline will only be deleted if the etag
+ * matches the current etag on the resource.
+ * @type bool $allow_missing
+ * Optional. If set to true, and the Pipeline is not found, the request will
+ * succeed but no action will be taken on the server.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the Pipeline to be deleted.
+ *
+ * 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. The name of the Pipeline to be deleted.
+ *
+ * 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;
+ }
+
+ /**
+ * Optional. If provided, the Pipeline will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Optional. If provided, the Pipeline will only be deleted if the etag
+ * matches the current etag on the resource.
+ *
+ * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the Pipeline is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the Pipeline is not found, the request will
+ * succeed but no action will be taken on the server.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/DeleteTriggerRequest.php b/Eventarc/src/V1/DeleteTriggerRequest.php
index 830d69a020f1..43ad08d1b38e 100644
--- a/Eventarc/src/V1/DeleteTriggerRequest.php
+++ b/Eventarc/src/V1/DeleteTriggerRequest.php
@@ -36,10 +36,10 @@ class DeleteTriggerRequest extends \Google\Protobuf\Internal\Message
*/
protected $allow_missing = false;
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -75,7 +75,7 @@ public static function build(string $name, bool $allowMissing): self
* If set to true, and the trigger is not found, the request will succeed
* but no action will be taken on the server.
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -167,10 +167,10 @@ public function setAllowMissing($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -179,10 +179,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/Destination.php b/Eventarc/src/V1/Destination.php
index b8dd4dfddb15..0399e85771e5 100644
--- a/Eventarc/src/V1/Destination.php
+++ b/Eventarc/src/V1/Destination.php
@@ -15,6 +15,14 @@
*/
class Destination extends \Google\Protobuf\Internal\Message
{
+ /**
+ * Optional. Network config is used to configure how Eventarc resolves and
+ * connect to a destination.
+ * This should only be used with HttpEndpoint destination type.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.NetworkConfig network_config = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network_config = null;
protected $descriptor;
/**
@@ -27,8 +35,12 @@ class Destination extends \Google\Protobuf\Internal\Message
* Cloud Run fully-managed resource that receives the events. The resource
* should be in the same project as the trigger.
* @type string $cloud_function
- * The Cloud Function resource name. Only Cloud Functions V2 is supported.
+ * The Cloud Function resource name. Cloud Functions V1 and V2 are
+ * supported.
* Format: `projects/{project}/locations/{location}/functions/{function}`
+ * This is a read-only field. Creating Cloud Functions V1/V2 triggers is
+ * only supported via the Cloud Functions product. An error will be returned
+ * if the user sets this value.
* @type \Google\Cloud\Eventarc\V1\GKE $gke
* A GKE service capable of receiving events. The service should be running
* in the same project as the trigger.
@@ -37,6 +49,12 @@ class Destination extends \Google\Protobuf\Internal\Message
* the events. The Workflow resource should be deployed in the same project
* as the trigger.
* Format: `projects/{project}/locations/{location}/workflows/{workflow}`
+ * @type \Google\Cloud\Eventarc\V1\HttpEndpoint $http_endpoint
+ * An HTTP endpoint destination described by an URI.
+ * @type \Google\Cloud\Eventarc\V1\NetworkConfig $network_config
+ * Optional. Network config is used to configure how Eventarc resolves and
+ * connect to a destination.
+ * This should only be used with HttpEndpoint destination type.
* }
*/
public function __construct($data = NULL) {
@@ -78,8 +96,12 @@ public function setCloudRun($var)
}
/**
- * The Cloud Function resource name. Only Cloud Functions V2 is supported.
+ * The Cloud Function resource name. Cloud Functions V1 and V2 are
+ * supported.
* Format: `projects/{project}/locations/{location}/functions/{function}`
+ * This is a read-only field. Creating Cloud Functions V1/V2 triggers is
+ * only supported via the Cloud Functions product. An error will be returned
+ * if the user sets this value.
*
* Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = {
* @return string
@@ -95,8 +117,12 @@ public function hasCloudFunction()
}
/**
- * The Cloud Function resource name. Only Cloud Functions V2 is supported.
+ * The Cloud Function resource name. Cloud Functions V1 and V2 are
+ * supported.
* Format: `projects/{project}/locations/{location}/functions/{function}`
+ * This is a read-only field. Creating Cloud Functions V1/V2 triggers is
+ * only supported via the Cloud Functions product. An error will be returned
+ * if the user sets this value.
*
* Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = {
* @param string $var
@@ -180,6 +206,77 @@ public function setWorkflow($var)
return $this;
}
+ /**
+ * An HTTP endpoint destination described by an URI.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.HttpEndpoint http_endpoint = 5;
+ * @return \Google\Cloud\Eventarc\V1\HttpEndpoint|null
+ */
+ public function getHttpEndpoint()
+ {
+ return $this->readOneof(5);
+ }
+
+ public function hasHttpEndpoint()
+ {
+ return $this->hasOneof(5);
+ }
+
+ /**
+ * An HTTP endpoint destination described by an URI.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.HttpEndpoint http_endpoint = 5;
+ * @param \Google\Cloud\Eventarc\V1\HttpEndpoint $var
+ * @return $this
+ */
+ public function setHttpEndpoint($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\HttpEndpoint::class);
+ $this->writeOneof(5, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. Network config is used to configure how Eventarc resolves and
+ * connect to a destination.
+ * This should only be used with HttpEndpoint destination type.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.NetworkConfig network_config = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\NetworkConfig|null
+ */
+ public function getNetworkConfig()
+ {
+ return $this->network_config;
+ }
+
+ public function hasNetworkConfig()
+ {
+ return isset($this->network_config);
+ }
+
+ public function clearNetworkConfig()
+ {
+ unset($this->network_config);
+ }
+
+ /**
+ * Optional. Network config is used to configure how Eventarc resolves and
+ * connect to a destination.
+ * This should only be used with HttpEndpoint destination type.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.NetworkConfig network_config = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\NetworkConfig $var
+ * @return $this
+ */
+ public function setNetworkConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\NetworkConfig::class);
+ $this->network_config = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/Eventarc/src/V1/Enrollment.php b/Eventarc/src/V1/Enrollment.php
new file mode 100644
index 000000000000..c4ed1239392d
--- /dev/null
+++ b/Eventarc/src/V1/Enrollment.php
@@ -0,0 +1,469 @@
+google.cloud.eventarc.v1.Enrollment
+ */
+class Enrollment extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/enrollments/{enrollment}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $uid = '';
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $etag = '';
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $annotations;
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $display_name = '';
+ /**
+ * Required. A CEL expression identifying which messages this enrollment
+ * applies to.
+ *
+ * Generated from protobuf field string cel_match = 9 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $cel_match = '';
+ /**
+ * Required. Resource name of the message bus identifying the source of the
+ * messages. It matches the form
+ * projects/{project}/locations/{location}/messageBuses/{messageBus}.
+ *
+ * Generated from protobuf field string message_bus = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $message_bus = '';
+ /**
+ * Required. Destination is the Pipeline that the Enrollment is delivering to.
+ * It must point to the full resource name of a Pipeline. Format:
+ * "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
+ *
+ * Generated from protobuf field string destination = 11 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $destination = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/enrollments/{enrollment}
+ * @type string $uid
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ * @type string $etag
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The creation time.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The last-modified time.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Optional. Resource annotations.
+ * @type string $display_name
+ * Optional. Resource display name.
+ * @type string $cel_match
+ * Required. A CEL expression identifying which messages this enrollment
+ * applies to.
+ * @type string $message_bus
+ * Required. Resource name of the message bus identifying the source of the
+ * messages. It matches the form
+ * projects/{project}/locations/{location}/messageBuses/{messageBus}.
+ * @type string $destination
+ * Required. Destination is the Pipeline that the Enrollment is delivering to.
+ * It must point to the full resource name of a Pipeline. Format:
+ * "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Enrollment::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/enrollments/{enrollment}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/enrollments/{enrollment}
+ *
+ * Generated from protobuf field string name = 1 [(.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. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. A CEL expression identifying which messages this enrollment
+ * applies to.
+ *
+ * Generated from protobuf field string cel_match = 9 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getCelMatch()
+ {
+ return $this->cel_match;
+ }
+
+ /**
+ * Required. A CEL expression identifying which messages this enrollment
+ * applies to.
+ *
+ * Generated from protobuf field string cel_match = 9 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setCelMatch($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->cel_match = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Resource name of the message bus identifying the source of the
+ * messages. It matches the form
+ * projects/{project}/locations/{location}/messageBuses/{messageBus}.
+ *
+ * Generated from protobuf field string message_bus = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getMessageBus()
+ {
+ return $this->message_bus;
+ }
+
+ /**
+ * Required. Resource name of the message bus identifying the source of the
+ * messages. It matches the form
+ * projects/{project}/locations/{location}/messageBuses/{messageBus}.
+ *
+ * Generated from protobuf field string message_bus = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setMessageBus($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message_bus = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Destination is the Pipeline that the Enrollment is delivering to.
+ * It must point to the full resource name of a Pipeline. Format:
+ * "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
+ *
+ * Generated from protobuf field string destination = 11 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getDestination()
+ {
+ return $this->destination;
+ }
+
+ /**
+ * Required. Destination is the Pipeline that the Enrollment is delivering to.
+ * It must point to the full resource name of a Pipeline. Format:
+ * "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)"
+ *
+ * Generated from protobuf field string destination = 11 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setDestination($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->destination = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/EventFilter.php b/Eventarc/src/V1/EventFilter.php
index f4f75630fc18..1e48fa154dda 100644
--- a/Eventarc/src/V1/EventFilter.php
+++ b/Eventarc/src/V1/EventFilter.php
@@ -16,8 +16,10 @@
class EventFilter extends \Google\Protobuf\Internal\Message
{
/**
- * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes
- * are supported for filtering.
+ * Required. The name of a CloudEvents attribute. Currently, only a subset of
+ * attributes are supported for filtering. You can [retrieve a specific
+ * provider's supported event
+ * types](/eventarc/docs/list-providers#describe-provider).
* All triggers MUST provide a filter for the 'type' attribute.
*
* Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -32,8 +34,9 @@ class EventFilter extends \Google\Protobuf\Internal\Message
/**
* Optional. The operator used for matching the events with the value of the
* filter. If not specified, only events that have an exact key-value pair
- * specified in the filter are matched. The only allowed value is
- * `match-path-pattern`.
+ * specified in the filter are matched. The allowed values are `path_pattern`
+ * and `match-path-pattern`. `path_pattern` is only allowed for GCFv1
+ * triggers.
*
* Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
@@ -46,16 +49,19 @@ class EventFilter extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $attribute
- * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes
- * are supported for filtering.
+ * Required. The name of a CloudEvents attribute. Currently, only a subset of
+ * attributes are supported for filtering. You can [retrieve a specific
+ * provider's supported event
+ * types](/eventarc/docs/list-providers#describe-provider).
* All triggers MUST provide a filter for the 'type' attribute.
* @type string $value
* Required. The value for the attribute.
* @type string $operator
* Optional. The operator used for matching the events with the value of the
* filter. If not specified, only events that have an exact key-value pair
- * specified in the filter are matched. The only allowed value is
- * `match-path-pattern`.
+ * specified in the filter are matched. The allowed values are `path_pattern`
+ * and `match-path-pattern`. `path_pattern` is only allowed for GCFv1
+ * triggers.
* }
*/
public function __construct($data = NULL) {
@@ -64,8 +70,10 @@ public function __construct($data = NULL) {
}
/**
- * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes
- * are supported for filtering.
+ * Required. The name of a CloudEvents attribute. Currently, only a subset of
+ * attributes are supported for filtering. You can [retrieve a specific
+ * provider's supported event
+ * types](/eventarc/docs/list-providers#describe-provider).
* All triggers MUST provide a filter for the 'type' attribute.
*
* Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -77,8 +85,10 @@ public function getAttribute()
}
/**
- * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes
- * are supported for filtering.
+ * Required. The name of a CloudEvents attribute. Currently, only a subset of
+ * attributes are supported for filtering. You can [retrieve a specific
+ * provider's supported event
+ * types](/eventarc/docs/list-providers#describe-provider).
* All triggers MUST provide a filter for the 'type' attribute.
*
* Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -122,8 +132,9 @@ public function setValue($var)
/**
* Optional. The operator used for matching the events with the value of the
* filter. If not specified, only events that have an exact key-value pair
- * specified in the filter are matched. The only allowed value is
- * `match-path-pattern`.
+ * specified in the filter are matched. The allowed values are `path_pattern`
+ * and `match-path-pattern`. `path_pattern` is only allowed for GCFv1
+ * triggers.
*
* Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL];
* @return string
@@ -136,8 +147,9 @@ public function getOperator()
/**
* Optional. The operator used for matching the events with the value of the
* filter. If not specified, only events that have an exact key-value pair
- * specified in the filter are matched. The only allowed value is
- * `match-path-pattern`.
+ * specified in the filter are matched. The allowed values are `path_pattern`
+ * and `match-path-pattern`. `path_pattern` is only allowed for GCFv1
+ * triggers.
*
* Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL];
* @param string $var
diff --git a/Eventarc/src/V1/FilteringAttribute.php b/Eventarc/src/V1/FilteringAttribute.php
index ac17a5a683b0..d36025d717b0 100644
--- a/Eventarc/src/V1/FilteringAttribute.php
+++ b/Eventarc/src/V1/FilteringAttribute.php
@@ -29,15 +29,15 @@ class FilteringAttribute extends \Google\Protobuf\Internal\Message
*/
protected $description = '';
/**
- * Output only. If true, the triggers for this provider should always specify a filter
- * on these attributes. Trigger creation will fail otherwise.
+ * Output only. If true, the triggers for this provider should always specify
+ * a filter on these attributes. Trigger creation will fail otherwise.
*
* Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
protected $required = false;
/**
- * Output only. If true, the attribute accepts matching expressions in the Eventarc
- * PathPattern format.
+ * Output only. If true, the attribute accepts matching expressions in the
+ * Eventarc PathPattern format.
*
* Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -54,11 +54,11 @@ class FilteringAttribute extends \Google\Protobuf\Internal\Message
* @type string $description
* Output only. Description of the purpose of the attribute.
* @type bool $required
- * Output only. If true, the triggers for this provider should always specify a filter
- * on these attributes. Trigger creation will fail otherwise.
+ * Output only. If true, the triggers for this provider should always specify
+ * a filter on these attributes. Trigger creation will fail otherwise.
* @type bool $path_pattern_supported
- * Output only. If true, the attribute accepts matching expressions in the Eventarc
- * PathPattern format.
+ * Output only. If true, the attribute accepts matching expressions in the
+ * Eventarc PathPattern format.
* }
*/
public function __construct($data = NULL) {
@@ -119,8 +119,8 @@ public function setDescription($var)
}
/**
- * Output only. If true, the triggers for this provider should always specify a filter
- * on these attributes. Trigger creation will fail otherwise.
+ * Output only. If true, the triggers for this provider should always specify
+ * a filter on these attributes. Trigger creation will fail otherwise.
*
* Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return bool
@@ -131,8 +131,8 @@ public function getRequired()
}
/**
- * Output only. If true, the triggers for this provider should always specify a filter
- * on these attributes. Trigger creation will fail otherwise.
+ * Output only. If true, the triggers for this provider should always specify
+ * a filter on these attributes. Trigger creation will fail otherwise.
*
* Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param bool $var
@@ -147,8 +147,8 @@ public function setRequired($var)
}
/**
- * Output only. If true, the attribute accepts matching expressions in the Eventarc
- * PathPattern format.
+ * Output only. If true, the attribute accepts matching expressions in the
+ * Eventarc PathPattern format.
*
* Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return bool
@@ -159,8 +159,8 @@ public function getPathPatternSupported()
}
/**
- * Output only. If true, the attribute accepts matching expressions in the Eventarc
- * PathPattern format.
+ * Output only. If true, the attribute accepts matching expressions in the
+ * Eventarc PathPattern format.
*
* Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param bool $var
diff --git a/Eventarc/src/V1/GKE.php b/Eventarc/src/V1/GKE.php
index 205d41d90ddc..428c452b3e82 100644
--- a/Eventarc/src/V1/GKE.php
+++ b/Eventarc/src/V1/GKE.php
@@ -16,16 +16,17 @@
class GKE extends \Google\Protobuf\Internal\Message
{
/**
- * Required. The name of the cluster the GKE service is running in. The cluster must be
- * running in the same project as the trigger being created.
+ * Required. The name of the cluster the GKE service is running in. The
+ * cluster must be running in the same project as the trigger being created.
*
* Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED];
*/
protected $cluster = '';
/**
- * Required. The name of the Google Compute Engine in which the cluster resides, which
- * can either be compute zone (for example, us-central1-a) for the zonal
- * clusters or region (for example, us-central1) for regional clusters.
+ * Required. The name of the Google Compute Engine in which the cluster
+ * resides, which can either be compute zone (for example, us-central1-a) for
+ * the zonal clusters or region (for example, us-central1) for regional
+ * clusters.
*
* Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED];
*/
@@ -43,7 +44,8 @@ class GKE extends \Google\Protobuf\Internal\Message
*/
protected $service = '';
/**
- * Optional. The relative path on the GKE service the events should be sent to.
+ * Optional. The relative path on the GKE service the events should be sent
+ * to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
@@ -58,18 +60,20 @@ class GKE extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $cluster
- * Required. The name of the cluster the GKE service is running in. The cluster must be
- * running in the same project as the trigger being created.
+ * Required. The name of the cluster the GKE service is running in. The
+ * cluster must be running in the same project as the trigger being created.
* @type string $location
- * Required. The name of the Google Compute Engine in which the cluster resides, which
- * can either be compute zone (for example, us-central1-a) for the zonal
- * clusters or region (for example, us-central1) for regional clusters.
+ * Required. The name of the Google Compute Engine in which the cluster
+ * resides, which can either be compute zone (for example, us-central1-a) for
+ * the zonal clusters or region (for example, us-central1) for regional
+ * clusters.
* @type string $namespace
* Required. The namespace the GKE service is running in.
* @type string $service
* Required. Name of the GKE service.
* @type string $path
- * Optional. The relative path on the GKE service the events should be sent to.
+ * Optional. The relative path on the GKE service the events should be sent
+ * to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
* }
@@ -80,8 +84,8 @@ public function __construct($data = NULL) {
}
/**
- * Required. The name of the cluster the GKE service is running in. The cluster must be
- * running in the same project as the trigger being created.
+ * Required. The name of the cluster the GKE service is running in. The
+ * cluster must be running in the same project as the trigger being created.
*
* Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED];
* @return string
@@ -92,8 +96,8 @@ public function getCluster()
}
/**
- * Required. The name of the cluster the GKE service is running in. The cluster must be
- * running in the same project as the trigger being created.
+ * Required. The name of the cluster the GKE service is running in. The
+ * cluster must be running in the same project as the trigger being created.
*
* Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
@@ -108,9 +112,10 @@ public function setCluster($var)
}
/**
- * Required. The name of the Google Compute Engine in which the cluster resides, which
- * can either be compute zone (for example, us-central1-a) for the zonal
- * clusters or region (for example, us-central1) for regional clusters.
+ * Required. The name of the Google Compute Engine in which the cluster
+ * resides, which can either be compute zone (for example, us-central1-a) for
+ * the zonal clusters or region (for example, us-central1) for regional
+ * clusters.
*
* Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED];
* @return string
@@ -121,9 +126,10 @@ public function getLocation()
}
/**
- * Required. The name of the Google Compute Engine in which the cluster resides, which
- * can either be compute zone (for example, us-central1-a) for the zonal
- * clusters or region (for example, us-central1) for regional clusters.
+ * Required. The name of the Google Compute Engine in which the cluster
+ * resides, which can either be compute zone (for example, us-central1-a) for
+ * the zonal clusters or region (for example, us-central1) for regional
+ * clusters.
*
* Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
@@ -190,7 +196,8 @@ public function setService($var)
}
/**
- * Optional. The relative path on the GKE service the events should be sent to.
+ * Optional. The relative path on the GKE service the events should be sent
+ * to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
@@ -203,7 +210,8 @@ public function getPath()
}
/**
- * Optional. The relative path on the GKE service the events should be sent to.
+ * Optional. The relative path on the GKE service the events should be sent
+ * to.
* The value must conform to the definition of a URI path segment (section 3.3
* of RFC2396). Examples: "/route", "route", "route/subroute".
*
diff --git a/Eventarc/src/V1/GetEnrollmentRequest.php b/Eventarc/src/V1/GetEnrollmentRequest.php
new file mode 100644
index 000000000000..8cd21daa3843
--- /dev/null
+++ b/Eventarc/src/V1/GetEnrollmentRequest.php
@@ -0,0 +1,81 @@
+google.cloud.eventarc.v1.GetEnrollmentRequest
+ */
+class GetEnrollmentRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the Enrollment to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The name of the Enrollment to get. Please see
+ * {@see EventarcClient::enrollmentName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\GetEnrollmentRequest
+ *
+ * @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. The name of the Enrollment to get.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the Enrollment to get.
+ *
+ * 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. The name of the Enrollment to get.
+ *
+ * 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/Eventarc/src/V1/GetGoogleApiSourceRequest.php b/Eventarc/src/V1/GetGoogleApiSourceRequest.php
new file mode 100644
index 000000000000..9cda03c132e4
--- /dev/null
+++ b/Eventarc/src/V1/GetGoogleApiSourceRequest.php
@@ -0,0 +1,81 @@
+google.cloud.eventarc.v1.GetGoogleApiSourceRequest
+ */
+class GetGoogleApiSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the google api source to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The name of the google api source to get. Please see
+ * {@see EventarcClient::googleApiSourceName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\GetGoogleApiSourceRequest
+ *
+ * @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. The name of the google api source to get.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the google api source to get.
+ *
+ * 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. The name of the google api source to get.
+ *
+ * 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/Eventarc/src/V1/GetMessageBusRequest.php b/Eventarc/src/V1/GetMessageBusRequest.php
new file mode 100644
index 000000000000..bcc8663131d1
--- /dev/null
+++ b/Eventarc/src/V1/GetMessageBusRequest.php
@@ -0,0 +1,81 @@
+google.cloud.eventarc.v1.GetMessageBusRequest
+ */
+class GetMessageBusRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the message bus to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The name of the message bus to get. Please see
+ * {@see EventarcClient::messageBusName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\GetMessageBusRequest
+ *
+ * @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. The name of the message bus to get.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the message bus to get.
+ *
+ * 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. The name of the message bus to get.
+ *
+ * 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/Eventarc/src/V1/GetPipelineRequest.php b/Eventarc/src/V1/GetPipelineRequest.php
new file mode 100644
index 000000000000..82d14ada1ede
--- /dev/null
+++ b/Eventarc/src/V1/GetPipelineRequest.php
@@ -0,0 +1,81 @@
+google.cloud.eventarc.v1.GetPipelineRequest
+ */
+class GetPipelineRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The name of the pipeline to get.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $name = '';
+
+ /**
+ * @param string $name Required. The name of the pipeline to get. Please see
+ * {@see EventarcClient::pipelineName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\GetPipelineRequest
+ *
+ * @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. The name of the pipeline to get.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The name of the pipeline to get.
+ *
+ * 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. The name of the pipeline to get.
+ *
+ * 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/Eventarc/src/V1/GoogleApiSource.php b/Eventarc/src/V1/GoogleApiSource.php
new file mode 100644
index 000000000000..4ddd79e5c6a8
--- /dev/null
+++ b/Eventarc/src/V1/GoogleApiSource.php
@@ -0,0 +1,481 @@
+google.cloud.eventarc.v1.GoogleApiSource
+ */
+class GoogleApiSource extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/googleApiSources/{google_api_source}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ */
+ protected $uid = '';
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $etag = '';
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $annotations;
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $display_name = '';
+ /**
+ * Required. Destination is the message bus that the GoogleApiSource is
+ * delivering to. It must be point to the full resource name of a MessageBus.
+ * Format:
+ * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
+ *
+ * Generated from protobuf field string destination = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $destination = '';
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ */
+ protected $crypto_key_name = '';
+ /**
+ * Optional. Config to control Platform logging for the GoogleApiSource.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $logging_config = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/googleApiSources/{google_api_source}
+ * @type string $uid
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ * @type string $etag
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The creation time.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The last-modified time.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Optional. Resource annotations.
+ * @type string $display_name
+ * Optional. Resource display name.
+ * @type string $destination
+ * Required. Destination is the message bus that the GoogleApiSource is
+ * delivering to. It must be point to the full resource name of a MessageBus.
+ * Format:
+ * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
+ * @type string $crypto_key_name
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ * @type \Google\Cloud\Eventarc\V1\LoggingConfig $logging_config
+ * Optional. Config to control Platform logging for the GoogleApiSource.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\GoogleApiSource::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/googleApiSources/{google_api_source}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/googleApiSources/{google_api_source}
+ *
+ * Generated from protobuf field string name = 1 [(.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. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Destination is the message bus that the GoogleApiSource is
+ * delivering to. It must be point to the full resource name of a MessageBus.
+ * Format:
+ * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
+ *
+ * Generated from protobuf field string destination = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getDestination()
+ {
+ return $this->destination;
+ }
+
+ /**
+ * Required. Destination is the message bus that the GoogleApiSource is
+ * delivering to. It must be point to the full resource name of a MessageBus.
+ * Format:
+ * "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID)
+ *
+ * Generated from protobuf field string destination = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setDestination($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->destination = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getCryptoKeyName()
+ {
+ return $this->crypto_key_name;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setCryptoKeyName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->crypto_key_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Config to control Platform logging for the GoogleApiSource.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\LoggingConfig|null
+ */
+ public function getLoggingConfig()
+ {
+ return $this->logging_config;
+ }
+
+ public function hasLoggingConfig()
+ {
+ return isset($this->logging_config);
+ }
+
+ public function clearLoggingConfig()
+ {
+ unset($this->logging_config);
+ }
+
+ /**
+ * Optional. Config to control Platform logging for the GoogleApiSource.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\LoggingConfig $var
+ * @return $this
+ */
+ public function setLoggingConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\LoggingConfig::class);
+ $this->logging_config = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/HttpEndpoint.php b/Eventarc/src/V1/HttpEndpoint.php
new file mode 100644
index 000000000000..61cb425db51a
--- /dev/null
+++ b/Eventarc/src/V1/HttpEndpoint.php
@@ -0,0 +1,91 @@
+google.cloud.eventarc.v1.HttpEndpoint
+ */
+class HttpEndpoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `http://10.10.10.8:80/route`,
+ * `http://svc.us-central1.p.local:8080/`.
+ * Only HTTP and HTTPS protocols are supported. The host can be either a
+ * static IP addressable from the VPC specified by the network config, or
+ * an internal DNS hostname of the service resolvable via Cloud DNS.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $uri = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $uri
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `http://10.10.10.8:80/route`,
+ * `http://svc.us-central1.p.local:8080/`.
+ * Only HTTP and HTTPS protocols are supported. The host can be either a
+ * static IP addressable from the VPC specified by the network config, or
+ * an internal DNS hostname of the service resolvable via Cloud DNS.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `http://10.10.10.8:80/route`,
+ * `http://svc.us-central1.p.local:8080/`.
+ * Only HTTP and HTTPS protocols are supported. The host can be either a
+ * static IP addressable from the VPC specified by the network config, or
+ * an internal DNS hostname of the service resolvable via Cloud DNS.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getUri()
+ {
+ return $this->uri;
+ }
+
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `http://10.10.10.8:80/route`,
+ * `http://svc.us-central1.p.local:8080/`.
+ * Only HTTP and HTTPS protocols are supported. The host can be either a
+ * static IP addressable from the VPC specified by the network config, or
+ * an internal DNS hostname of the service resolvable via Cloud DNS.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uri = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/ListEnrollmentsRequest.php b/Eventarc/src/V1/ListEnrollmentsRequest.php
new file mode 100644
index 000000000000..e54b7d747086
--- /dev/null
+++ b/Eventarc/src/V1/ListEnrollmentsRequest.php
@@ -0,0 +1,249 @@
+google.cloud.eventarc.v1.ListEnrollmentsRequest
+ */
+class ListEnrollmentsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection to list triggers on.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+
+ /**
+ * @param string $parent Required. The parent collection to list triggers on. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\ListEnrollmentsRequest
+ *
+ * @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. The parent collection to list triggers on.
+ * @type int $page_size
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ * @type string $page_token
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ * @type string $order_by
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ * @type string $filter
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection to list triggers on.
+ *
+ * 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. The parent collection to list triggers on.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.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/Eventarc/src/V1/ListEnrollmentsResponse.php b/Eventarc/src/V1/ListEnrollmentsResponse.php
new file mode 100644
index 000000000000..f467a1b3d593
--- /dev/null
+++ b/Eventarc/src/V1/ListEnrollmentsResponse.php
@@ -0,0 +1,139 @@
+google.cloud.eventarc.v1.ListEnrollmentsResponse
+ */
+class ListEnrollmentsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The requested Enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Enrollment enrollments = 1;
+ */
+ private $enrollments;
+ /**
+ * A page token that can be sent to `ListEnrollments` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Eventarc\V1\Enrollment>|\Google\Protobuf\Internal\RepeatedField $enrollments
+ * The requested Enrollments, up to the number specified in `page_size`.
+ * @type string $next_page_token
+ * A page token that can be sent to `ListEnrollments` to request the next
+ * page. If this is empty, then there are no more pages.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unreachable resources, if any.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The requested Enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Enrollment enrollments = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnrollments()
+ {
+ return $this->enrollments;
+ }
+
+ /**
+ * The requested Enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Enrollment enrollments = 1;
+ * @param array<\Google\Cloud\Eventarc\V1\Enrollment>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnrollments($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Enrollment::class);
+ $this->enrollments = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A page token that can be sent to `ListEnrollments` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A page token that can be sent to `ListEnrollments` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @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/Eventarc/src/V1/ListGoogleApiSourcesRequest.php b/Eventarc/src/V1/ListGoogleApiSourcesRequest.php
new file mode 100644
index 000000000000..afc0e23c4e35
--- /dev/null
+++ b/Eventarc/src/V1/ListGoogleApiSourcesRequest.php
@@ -0,0 +1,249 @@
+google.cloud.eventarc.v1.ListGoogleApiSourcesRequest
+ */
+class ListGoogleApiSourcesRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection to list GoogleApiSources on.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+
+ /**
+ * @param string $parent Required. The parent collection to list GoogleApiSources on. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\ListGoogleApiSourcesRequest
+ *
+ * @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. The parent collection to list GoogleApiSources on.
+ * @type int $page_size
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ * @type string $page_token
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ * @type string $order_by
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ * @type string $filter
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection to list GoogleApiSources on.
+ *
+ * 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. The parent collection to list GoogleApiSources on.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.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/Eventarc/src/V1/ListGoogleApiSourcesResponse.php b/Eventarc/src/V1/ListGoogleApiSourcesResponse.php
new file mode 100644
index 000000000000..9994f064503f
--- /dev/null
+++ b/Eventarc/src/V1/ListGoogleApiSourcesResponse.php
@@ -0,0 +1,139 @@
+google.cloud.eventarc.v1.ListGoogleApiSourcesResponse
+ */
+class ListGoogleApiSourcesResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The requested GoogleApiSources, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.GoogleApiSource google_api_sources = 1;
+ */
+ private $google_api_sources;
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Eventarc\V1\GoogleApiSource>|\Google\Protobuf\Internal\RepeatedField $google_api_sources
+ * The requested GoogleApiSources, up to the number specified in `page_size`.
+ * @type string $next_page_token
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unreachable resources, if any.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The requested GoogleApiSources, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.GoogleApiSource google_api_sources = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getGoogleApiSources()
+ {
+ return $this->google_api_sources;
+ }
+
+ /**
+ * The requested GoogleApiSources, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.GoogleApiSource google_api_sources = 1;
+ * @param array<\Google\Cloud\Eventarc\V1\GoogleApiSource>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setGoogleApiSources($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\GoogleApiSource::class);
+ $this->google_api_sources = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @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/Eventarc/src/V1/ListMessageBusEnrollmentsRequest.php b/Eventarc/src/V1/ListMessageBusEnrollmentsRequest.php
new file mode 100644
index 000000000000..782b7a29711a
--- /dev/null
+++ b/Eventarc/src/V1/ListMessageBusEnrollmentsRequest.php
@@ -0,0 +1,165 @@
+google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest
+ */
+class ListMessageBusEnrollmentsRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent message bus to list enrollments on.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+
+ /**
+ * @param string $parent Required. The parent message bus to list enrollments on. Please see
+ * {@see EventarcClient::messageBusName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\ListMessageBusEnrollmentsRequest
+ *
+ * @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. The parent message bus to list enrollments on.
+ * @type int $page_size
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ * @type string $page_token
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent message bus to list enrollments on.
+ *
+ * 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. The parent message bus to list enrollments on.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/ListMessageBusEnrollmentsResponse.php b/Eventarc/src/V1/ListMessageBusEnrollmentsResponse.php
new file mode 100644
index 000000000000..f58a262aad2c
--- /dev/null
+++ b/Eventarc/src/V1/ListMessageBusEnrollmentsResponse.php
@@ -0,0 +1,139 @@
+google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse
+ */
+class ListMessageBusEnrollmentsResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The requested enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated string enrollments = 1;
+ */
+ private $enrollments;
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array|\Google\Protobuf\Internal\RepeatedField $enrollments
+ * The requested enrollments, up to the number specified in `page_size`.
+ * @type string $next_page_token
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unreachable resources, if any.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The requested enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated string enrollments = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getEnrollments()
+ {
+ return $this->enrollments;
+ }
+
+ /**
+ * The requested enrollments, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated string enrollments = 1;
+ * @param array|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setEnrollments($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->enrollments = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBusEnrollments` to request the
+ * next page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @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/Eventarc/src/V1/ListMessageBusesRequest.php b/Eventarc/src/V1/ListMessageBusesRequest.php
new file mode 100644
index 000000000000..7058037078d5
--- /dev/null
+++ b/Eventarc/src/V1/ListMessageBusesRequest.php
@@ -0,0 +1,249 @@
+google.cloud.eventarc.v1.ListMessageBusesRequest
+ */
+class ListMessageBusesRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection to list triggers on.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+
+ /**
+ * @param string $parent Required. The parent collection to list triggers on. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\ListMessageBusesRequest
+ *
+ * @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. The parent collection to list triggers on.
+ * @type int $page_size
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ * @type string $page_token
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ * @type string $order_by
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ * @type string $filter
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection to list triggers on.
+ *
+ * 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. The parent collection to list triggers on.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filtersare described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.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/Eventarc/src/V1/ListMessageBusesResponse.php b/Eventarc/src/V1/ListMessageBusesResponse.php
new file mode 100644
index 000000000000..1ec7d56ab37f
--- /dev/null
+++ b/Eventarc/src/V1/ListMessageBusesResponse.php
@@ -0,0 +1,139 @@
+google.cloud.eventarc.v1.ListMessageBusesResponse
+ */
+class ListMessageBusesResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The requested message buses, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.MessageBus message_buses = 1;
+ */
+ private $message_buses;
+ /**
+ * A page token that can be sent to `ListMessageBuses` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Eventarc\V1\MessageBus>|\Google\Protobuf\Internal\RepeatedField $message_buses
+ * The requested message buses, up to the number specified in `page_size`.
+ * @type string $next_page_token
+ * A page token that can be sent to `ListMessageBuses` to request the next
+ * page. If this is empty, then there are no more pages.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unreachable resources, if any.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The requested message buses, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.MessageBus message_buses = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMessageBuses()
+ {
+ return $this->message_buses;
+ }
+
+ /**
+ * The requested message buses, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.MessageBus message_buses = 1;
+ * @param array<\Google\Cloud\Eventarc\V1\MessageBus>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMessageBuses($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\MessageBus::class);
+ $this->message_buses = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBuses` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A page token that can be sent to `ListMessageBuses` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @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/Eventarc/src/V1/ListPipelinesRequest.php b/Eventarc/src/V1/ListPipelinesRequest.php
new file mode 100644
index 000000000000..fe3533060eb7
--- /dev/null
+++ b/Eventarc/src/V1/ListPipelinesRequest.php
@@ -0,0 +1,249 @@
+google.cloud.eventarc.v1.ListPipelinesRequest
+ */
+class ListPipelinesRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The parent collection to list pipelines on.
+ *
+ * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $parent = '';
+ /**
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_size = 0;
+ /**
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ *
+ * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $page_token = '';
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $order_by = '';
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filters are described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $filter = '';
+
+ /**
+ * @param string $parent Required. The parent collection to list pipelines on. Please see
+ * {@see EventarcClient::locationName()} for help formatting this field.
+ *
+ * @return \Google\Cloud\Eventarc\V1\ListPipelinesRequest
+ *
+ * @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. The parent collection to list pipelines on.
+ * @type int $page_size
+ * Optional. The maximum number of results to return on each page.
+ * Note: The service may send fewer.
+ * @type string $page_token
+ * Optional. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous call that provided the page token.
+ * @type string $order_by
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ * @type string $filter
+ * Optional. The filter field that the list request will filter on.
+ * Possible filters are described in https://google.aip.dev/160.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The parent collection to list pipelines on.
+ *
+ * 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. The parent collection to list pipelines on.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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 results to return on each page.
+ * Note: The service may send fewer.
+ *
+ * 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The page token; provide the value from the `next_page_token`
+ * field in a previous call to retrieve the subsequent page.
+ * When paginating, all other parameters provided must match
+ * the previous 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. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getOrderBy()
+ {
+ return $this->order_by;
+ }
+
+ /**
+ * Optional. The sorting order of the resources returned. Value should be a
+ * comma-separated list of fields. The default sorting order is ascending. To
+ * specify descending order for a field, append a `desc` suffix; for example:
+ * `name desc, update_time`.
+ *
+ * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setOrderBy($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->order_by = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filters are described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ /**
+ * Optional. The filter field that the list request will filter on.
+ * Possible filters are described in https://google.aip.dev/160.
+ *
+ * Generated from protobuf field string filter = 5 [(.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/Eventarc/src/V1/ListPipelinesResponse.php b/Eventarc/src/V1/ListPipelinesResponse.php
new file mode 100644
index 000000000000..db5624cef798
--- /dev/null
+++ b/Eventarc/src/V1/ListPipelinesResponse.php
@@ -0,0 +1,139 @@
+google.cloud.eventarc.v1.ListPipelinesResponse
+ */
+class ListPipelinesResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The requested pipelines, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline pipelines = 1;
+ */
+ private $pipelines;
+ /**
+ * A page token that can be sent to `ListPipelines` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ */
+ protected $next_page_token = '';
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ */
+ private $unreachable;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\Eventarc\V1\Pipeline>|\Google\Protobuf\Internal\RepeatedField $pipelines
+ * The requested pipelines, up to the number specified in `page_size`.
+ * @type string $next_page_token
+ * A page token that can be sent to `ListPipelines` to request the next
+ * page. If this is empty, then there are no more pages.
+ * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
+ * Unreachable resources, if any.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The requested pipelines, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline pipelines = 1;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getPipelines()
+ {
+ return $this->pipelines;
+ }
+
+ /**
+ * The requested pipelines, up to the number specified in `page_size`.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline pipelines = 1;
+ * @param array<\Google\Cloud\Eventarc\V1\Pipeline>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setPipelines($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Pipeline::class);
+ $this->pipelines = $arr;
+
+ return $this;
+ }
+
+ /**
+ * A page token that can be sent to `ListPipelines` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->next_page_token;
+ }
+
+ /**
+ * A page token that can be sent to `ListPipelines` to request the next
+ * page. If this is empty, then there are no more pages.
+ *
+ * Generated from protobuf field string next_page_token = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setNextPageToken($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->next_page_token = $var;
+
+ return $this;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getUnreachable()
+ {
+ return $this->unreachable;
+ }
+
+ /**
+ * Unreachable resources, if any.
+ *
+ * Generated from protobuf field repeated string unreachable = 3;
+ * @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/Eventarc/src/V1/LoggingConfig.php b/Eventarc/src/V1/LoggingConfig.php
new file mode 100644
index 000000000000..68522bb64d27
--- /dev/null
+++ b/Eventarc/src/V1/LoggingConfig.php
@@ -0,0 +1,76 @@
+google.cloud.eventarc.v1.LoggingConfig
+ */
+class LoggingConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The minimum severity of logs that will be sent to
+ * Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be
+ * sent, unless it is NONE.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig.LogSeverity log_severity = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $log_severity = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $log_severity
+ * Optional. The minimum severity of logs that will be sent to
+ * Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be
+ * sent, unless it is NONE.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\LoggingConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The minimum severity of logs that will be sent to
+ * Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be
+ * sent, unless it is NONE.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig.LogSeverity log_severity = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getLogSeverity()
+ {
+ return $this->log_severity;
+ }
+
+ /**
+ * Optional. The minimum severity of logs that will be sent to
+ * Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be
+ * sent, unless it is NONE.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig.LogSeverity log_severity = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setLogSeverity($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Eventarc\V1\LoggingConfig\LogSeverity::class);
+ $this->log_severity = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/LoggingConfig/LogSeverity.php b/Eventarc/src/V1/LoggingConfig/LogSeverity.php
new file mode 100644
index 000000000000..24c24b89c169
--- /dev/null
+++ b/Eventarc/src/V1/LoggingConfig/LogSeverity.php
@@ -0,0 +1,118 @@
+google.cloud.eventarc.v1.LoggingConfig.LogSeverity
+ */
+class LogSeverity
+{
+ /**
+ * Log severity is not specified. This value is treated the same as NONE,
+ * but is used to distinguish between no update and update to NONE in
+ * update_masks.
+ *
+ * Generated from protobuf enum LOG_SEVERITY_UNSPECIFIED = 0;
+ */
+ const LOG_SEVERITY_UNSPECIFIED = 0;
+ /**
+ * Default value at resource creation, presence of this value must be
+ * treated as no logging/disable logging.
+ *
+ * Generated from protobuf enum NONE = 1;
+ */
+ const NONE = 1;
+ /**
+ * Debug or trace level logging.
+ *
+ * Generated from protobuf enum DEBUG = 2;
+ */
+ const DEBUG = 2;
+ /**
+ * Routine information, such as ongoing status or performance.
+ *
+ * Generated from protobuf enum INFO = 3;
+ */
+ const INFO = 3;
+ /**
+ * Normal but significant events, such as start up, shut down, or a
+ * configuration change.
+ *
+ * Generated from protobuf enum NOTICE = 4;
+ */
+ const NOTICE = 4;
+ /**
+ * Warning events might cause problems.
+ *
+ * Generated from protobuf enum WARNING = 5;
+ */
+ const WARNING = 5;
+ /**
+ * Error events are likely to cause problems.
+ *
+ * Generated from protobuf enum ERROR = 6;
+ */
+ const ERROR = 6;
+ /**
+ * Critical events cause more severe problems or outages.
+ *
+ * Generated from protobuf enum CRITICAL = 7;
+ */
+ const CRITICAL = 7;
+ /**
+ * A person must take action immediately.
+ *
+ * Generated from protobuf enum ALERT = 8;
+ */
+ const ALERT = 8;
+ /**
+ * One or more systems are unusable.
+ *
+ * Generated from protobuf enum EMERGENCY = 9;
+ */
+ const EMERGENCY = 9;
+
+ private static $valueToName = [
+ self::LOG_SEVERITY_UNSPECIFIED => 'LOG_SEVERITY_UNSPECIFIED',
+ self::NONE => 'NONE',
+ self::DEBUG => 'DEBUG',
+ self::INFO => 'INFO',
+ self::NOTICE => 'NOTICE',
+ self::WARNING => 'WARNING',
+ self::ERROR => 'ERROR',
+ self::CRITICAL => 'CRITICAL',
+ self::ALERT => 'ALERT',
+ self::EMERGENCY => 'EMERGENCY',
+ ];
+
+ 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/Eventarc/src/V1/MessageBus.php b/Eventarc/src/V1/MessageBus.php
new file mode 100644
index 000000000000..125bd3c86db6
--- /dev/null
+++ b/Eventarc/src/V1/MessageBus.php
@@ -0,0 +1,446 @@
+google.cloud.eventarc.v1.MessageBus
+ */
+class MessageBus extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/messageBuses/{message_bus}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $uid = '';
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $etag = '';
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $annotations;
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $display_name = '';
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ */
+ protected $crypto_key_name = '';
+ /**
+ * Optional. Config to control Platform logging for the Message Bus. This log
+ * configuration is applied to the Message Bus itself, and all the Enrollments
+ * attached to it.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $logging_config = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/messageBuses/{message_bus}
+ * @type string $uid
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ * @type string $etag
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The creation time.
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The last-modified time.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Resource labels.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Optional. Resource annotations.
+ * @type string $display_name
+ * Optional. Resource display name.
+ * @type string $crypto_key_name
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ * @type \Google\Cloud\Eventarc\V1\LoggingConfig $logging_config
+ * Optional. Config to control Platform logging for the Message Bus. This log
+ * configuration is applied to the Message Bus itself, and all the Enrollments
+ * attached to it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\MessageBus::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/messageBuses/{message_bus}
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Identifier. Resource name of the form
+ * projects/{project}/locations/{location}/messageBuses/{message_bus}
+ *
+ * Generated from protobuf field string name = 1 [(.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. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * Output only. Server assigned unique identifier for the channel. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on update and delete requests to
+ * ensure that the client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The creation time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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 last-modified time.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Resource labels.
+ *
+ * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Optional. Resource annotations.
+ *
+ * Generated from protobuf field map annotations = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Optional. Resource display name.
+ *
+ * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getCryptoKeyName()
+ {
+ return $this->crypto_key_name;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt their event data.
+ * It must match the pattern
+ * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setCryptoKeyName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->crypto_key_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Config to control Platform logging for the Message Bus. This log
+ * configuration is applied to the Message Bus itself, and all the Enrollments
+ * attached to it.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\LoggingConfig|null
+ */
+ public function getLoggingConfig()
+ {
+ return $this->logging_config;
+ }
+
+ public function hasLoggingConfig()
+ {
+ return isset($this->logging_config);
+ }
+
+ public function clearLoggingConfig()
+ {
+ unset($this->logging_config);
+ }
+
+ /**
+ * Optional. Config to control Platform logging for the Message Bus. This log
+ * configuration is applied to the Message Bus itself, and all the Enrollments
+ * attached to it.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\LoggingConfig $var
+ * @return $this
+ */
+ public function setLoggingConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\LoggingConfig::class);
+ $this->logging_config = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/NetworkConfig.php b/Eventarc/src/V1/NetworkConfig.php
new file mode 100644
index 000000000000..715d1d668793
--- /dev/null
+++ b/Eventarc/src/V1/NetworkConfig.php
@@ -0,0 +1,75 @@
+google.cloud.eventarc.v1.NetworkConfig
+ */
+class NetworkConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * customer's VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $network_attachment = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $network_attachment
+ * Required. Name of the NetworkAttachment that allows access to the
+ * customer's VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\NetworkConfig::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * customer's VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getNetworkAttachment()
+ {
+ return $this->network_attachment;
+ }
+
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * customer's VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setNetworkAttachment($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->network_attachment = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/OperationMetadata.php b/Eventarc/src/V1/OperationMetadata.php
index 5e68aca2f8c3..bb3d67a302da 100644
--- a/Eventarc/src/V1/OperationMetadata.php
+++ b/Eventarc/src/V1/OperationMetadata.php
@@ -48,8 +48,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
/**
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
- * corresponding to `Code.CANCELLED`.
+ * have [Operation.error][] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -80,8 +81,9 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message
* @type bool $requested_cancellation
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
- * corresponding to `Code.CANCELLED`.
+ * have [Operation.error][] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
* @type string $api_version
* Output only. API version used to start the operation.
* }
@@ -244,8 +246,9 @@ public function setStatusMessage($var)
/**
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
- * corresponding to `Code.CANCELLED`.
+ * have [Operation.error][] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return bool
@@ -258,8 +261,9 @@ public function getRequestedCancellation()
/**
* Output only. Identifies whether the user has requested cancellation
* of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
- * corresponding to `Code.CANCELLED`.
+ * have [Operation.error][] value with a
+ * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+ * `Code.CANCELLED`.
*
* Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param bool $var
diff --git a/Eventarc/src/V1/Pipeline.php b/Eventarc/src/V1/Pipeline.php
new file mode 100644
index 000000000000..28217c019e05
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline.php
@@ -0,0 +1,667 @@
+google.cloud.eventarc.v1.Pipeline
+ */
+class Pipeline extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Identifier. The resource name of the Pipeline. Must be unique within the
+ * location of the project and must be in
+ * `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ */
+ protected $name = '';
+ /**
+ * Output only. The creation time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $create_time = null;
+ /**
+ * Output only. The last-modified time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $update_time = null;
+ /**
+ * Optional. User labels attached to the Pipeline that can be used to group
+ * resources. An object containing a list of "key": value pairs. Example: {
+ * "name": "wrench", "mass": "1.3kg", "count": "3" }.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+ /**
+ * Output only. Server-assigned unique identifier for the Pipeline. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ */
+ protected $uid = '';
+ /**
+ * Optional. User-defined annotations. See
+ * https://google.aip.dev/128#annotations.
+ *
+ * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $annotations;
+ /**
+ * Optional. Display name of resource.
+ *
+ * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $display_name = '';
+ /**
+ * Required. List of destinations to which messages will be forwarded.
+ * Currently, exactly one destination is supported per Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Destination destinations = 8 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $destinations;
+ /**
+ * Optional. List of mediation operations to be performed on the message.
+ * Currently, only one Transformation operation is allowed in each Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Mediation mediations = 9 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $mediations;
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt the event data. If not set, an internal Google-owned key
+ * will be used to encrypt messages. It must match the pattern
+ * "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}".
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ */
+ protected $crypto_key_name = '';
+ /**
+ * Optional. The payload format expected for the messages received by the
+ * Pipeline. If input_payload_format is set then any messages not matching
+ * this format will be treated as persistent errors. If input_payload_format
+ * is not set, then the message data will be treated as an opaque binary and
+ * no output format can be set on the Pipeline through the
+ * Pipeline.Destination.output_payload_format field. Any Mediations on the
+ * Pipeline that involve access to the data field will fail as persistent
+ * errors.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat input_payload_format = 11 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $input_payload_format = null;
+ /**
+ * Optional. Config to control Platform Logging for Pipelines.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $logging_config = null;
+ /**
+ * Optional. The retry policy to use in the pipeline.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.RetryPolicy retry_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $retry_policy = null;
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
+ * client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 99;
+ */
+ protected $etag = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $name
+ * Identifier. The resource name of the Pipeline. Must be unique within the
+ * location of the project and must be in
+ * `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
+ * @type \Google\Protobuf\Timestamp $create_time
+ * Output only. The creation time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ * @type \Google\Protobuf\Timestamp $update_time
+ * Output only. The last-modified time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. User labels attached to the Pipeline that can be used to group
+ * resources. An object containing a list of "key": value pairs. Example: {
+ * "name": "wrench", "mass": "1.3kg", "count": "3" }.
+ * @type string $uid
+ * Output only. Server-assigned unique identifier for the Pipeline. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ * @type array|\Google\Protobuf\Internal\MapField $annotations
+ * Optional. User-defined annotations. See
+ * https://google.aip.dev/128#annotations.
+ * @type string $display_name
+ * Optional. Display name of resource.
+ * @type array<\Google\Cloud\Eventarc\V1\Pipeline\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations
+ * Required. List of destinations to which messages will be forwarded.
+ * Currently, exactly one destination is supported per Pipeline.
+ * @type array<\Google\Cloud\Eventarc\V1\Pipeline\Mediation>|\Google\Protobuf\Internal\RepeatedField $mediations
+ * Optional. List of mediation operations to be performed on the message.
+ * Currently, only one Transformation operation is allowed in each Pipeline.
+ * @type string $crypto_key_name
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt the event data. If not set, an internal Google-owned key
+ * will be used to encrypt messages. It must match the pattern
+ * "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}".
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat $input_payload_format
+ * Optional. The payload format expected for the messages received by the
+ * Pipeline. If input_payload_format is set then any messages not matching
+ * this format will be treated as persistent errors. If input_payload_format
+ * is not set, then the message data will be treated as an opaque binary and
+ * no output format can be set on the Pipeline through the
+ * Pipeline.Destination.output_payload_format field. Any Mediations on the
+ * Pipeline that involve access to the data field will fail as persistent
+ * errors.
+ * @type \Google\Cloud\Eventarc\V1\LoggingConfig $logging_config
+ * Optional. Config to control Platform Logging for Pipelines.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\RetryPolicy $retry_policy
+ * Optional. The retry policy to use in the pipeline.
+ * @type string $etag
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
+ * client has an up-to-date value before proceeding.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Identifier. The resource name of the Pipeline. Must be unique within the
+ * location of the project and must be in
+ * `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
+ *
+ * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Identifier. The resource name of the Pipeline. Must be unique within the
+ * location of the project and must be in
+ * `projects/{project}/locations/{location}/pipelines/{pipeline}` format.
+ *
+ * Generated from protobuf field string name = 1 [(.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. The creation time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getCreateTime()
+ {
+ return $this->create_time;
+ }
+
+ public function hasCreateTime()
+ {
+ return isset($this->create_time);
+ }
+
+ public function clearCreateTime()
+ {
+ unset($this->create_time);
+ }
+
+ /**
+ * Output only. The creation time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setCreateTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->create_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The last-modified time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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 last-modified time.
+ * A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up
+ * to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
+ * "2014-10-02T15:01:23.045123456Z".
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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;
+ }
+
+ /**
+ * Optional. User labels attached to the Pipeline that can be used to group
+ * resources. An object containing a list of "key": value pairs. Example: {
+ * "name": "wrench", "mass": "1.3kg", "count": "3" }.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. User labels attached to the Pipeline that can be used to group
+ * resources. An object containing a list of "key": value pairs. Example: {
+ * "name": "wrench", "mass": "1.3kg", "count": "3" }.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Server-assigned unique identifier for the Pipeline. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @return string
+ */
+ public function getUid()
+ {
+ return $this->uid;
+ }
+
+ /**
+ * Output only. Server-assigned unique identifier for the Pipeline. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
+ *
+ * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setUid($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uid = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. User-defined annotations. See
+ * https://google.aip.dev/128#annotations.
+ *
+ * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getAnnotations()
+ {
+ return $this->annotations;
+ }
+
+ /**
+ * Optional. User-defined annotations. See
+ * https://google.aip.dev/128#annotations.
+ *
+ * Generated from protobuf field map annotations = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setAnnotations($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->annotations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Display name of resource.
+ *
+ * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getDisplayName()
+ {
+ return $this->display_name;
+ }
+
+ /**
+ * Optional. Display name of resource.
+ *
+ * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setDisplayName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->display_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. List of destinations to which messages will be forwarded.
+ * Currently, exactly one destination is supported per Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Destination destinations = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getDestinations()
+ {
+ return $this->destinations;
+ }
+
+ /**
+ * Required. List of destinations to which messages will be forwarded.
+ * Currently, exactly one destination is supported per Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Destination destinations = 8 [(.google.api.field_behavior) = REQUIRED];
+ * @param array<\Google\Cloud\Eventarc\V1\Pipeline\Destination>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setDestinations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Pipeline\Destination::class);
+ $this->destinations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. List of mediation operations to be performed on the message.
+ * Currently, only one Transformation operation is allowed in each Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Mediation mediations = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getMediations()
+ {
+ return $this->mediations;
+ }
+
+ /**
+ * Optional. List of mediation operations to be performed on the message.
+ * Currently, only one Transformation operation is allowed in each Pipeline.
+ *
+ * Generated from protobuf field repeated .google.cloud.eventarc.v1.Pipeline.Mediation mediations = 9 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\Eventarc\V1\Pipeline\Mediation>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setMediations($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Pipeline\Mediation::class);
+ $this->mediations = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt the event data. If not set, an internal Google-owned key
+ * will be used to encrypt messages. It must match the pattern
+ * "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}".
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getCryptoKeyName()
+ {
+ return $this->crypto_key_name;
+ }
+
+ /**
+ * Optional. Resource name of a KMS crypto key (managed by the user) used to
+ * encrypt/decrypt the event data. If not set, an internal Google-owned key
+ * will be used to encrypt messages. It must match the pattern
+ * "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}".
+ *
+ * Generated from protobuf field string crypto_key_name = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setCryptoKeyName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->crypto_key_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The payload format expected for the messages received by the
+ * Pipeline. If input_payload_format is set then any messages not matching
+ * this format will be treated as persistent errors. If input_payload_format
+ * is not set, then the message data will be treated as an opaque binary and
+ * no output format can be set on the Pipeline through the
+ * Pipeline.Destination.output_payload_format field. Any Mediations on the
+ * Pipeline that involve access to the data field will fail as persistent
+ * errors.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat input_payload_format = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat|null
+ */
+ public function getInputPayloadFormat()
+ {
+ return $this->input_payload_format;
+ }
+
+ public function hasInputPayloadFormat()
+ {
+ return isset($this->input_payload_format);
+ }
+
+ public function clearInputPayloadFormat()
+ {
+ unset($this->input_payload_format);
+ }
+
+ /**
+ * Optional. The payload format expected for the messages received by the
+ * Pipeline. If input_payload_format is set then any messages not matching
+ * this format will be treated as persistent errors. If input_payload_format
+ * is not set, then the message data will be treated as an opaque binary and
+ * no output format can be set on the Pipeline through the
+ * Pipeline.Destination.output_payload_format field. Any Mediations on the
+ * Pipeline that involve access to the data field will fail as persistent
+ * errors.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat input_payload_format = 11 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat $var
+ * @return $this
+ */
+ public function setInputPayloadFormat($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat::class);
+ $this->input_payload_format = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Config to control Platform Logging for Pipelines.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\LoggingConfig|null
+ */
+ public function getLoggingConfig()
+ {
+ return $this->logging_config;
+ }
+
+ public function hasLoggingConfig()
+ {
+ return isset($this->logging_config);
+ }
+
+ public function clearLoggingConfig()
+ {
+ unset($this->logging_config);
+ }
+
+ /**
+ * Optional. Config to control Platform Logging for Pipelines.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.LoggingConfig logging_config = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\LoggingConfig $var
+ * @return $this
+ */
+ public function setLoggingConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\LoggingConfig::class);
+ $this->logging_config = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The retry policy to use in the pipeline.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.RetryPolicy retry_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\RetryPolicy|null
+ */
+ public function getRetryPolicy()
+ {
+ return $this->retry_policy;
+ }
+
+ public function hasRetryPolicy()
+ {
+ return isset($this->retry_policy);
+ }
+
+ public function clearRetryPolicy()
+ {
+ unset($this->retry_policy);
+ }
+
+ /**
+ * Optional. The retry policy to use in the pipeline.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.RetryPolicy retry_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\RetryPolicy $var
+ * @return $this
+ */
+ public function setRetryPolicy($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\RetryPolicy::class);
+ $this->retry_policy = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
+ * client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 99;
+ * @return string
+ */
+ public function getEtag()
+ {
+ return $this->etag;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
+ * client has an up-to-date value before proceeding.
+ *
+ * Generated from protobuf field string etag = 99;
+ * @param string $var
+ * @return $this
+ */
+ public function setEtag($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->etag = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/Pipeline/Destination.php b/Eventarc/src/V1/Pipeline/Destination.php
new file mode 100644
index 000000000000..3ca75ce13faf
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination.php
@@ -0,0 +1,375 @@
+google.cloud.eventarc.v1.Pipeline.Destination
+ */
+class Destination extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Network config is used to configure how Pipeline resolves and
+ * connects to a destination.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig network_config = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $network_config = null;
+ /**
+ * Optional. An authentication config used to authenticate message requests,
+ * such that destinations can verify the source. For example, this can be
+ * used with private GCP destinations that require GCP credentials to access
+ * like Cloud Run. This field is optional and should be set only by users
+ * interested in authenticated push
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig authentication_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $authentication_config = null;
+ /**
+ * Optional. The message format before it is delivered to the destination.
+ * If not set, the message will be delivered in the format it was originally
+ * delivered to the Pipeline. This field can only be set if
+ * Pipeline.input_payload_format is also set.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat output_payload_format = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $output_payload_format = null;
+ protected $destination_descriptor;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Destination\NetworkConfig $network_config
+ * Optional. Network config is used to configure how Pipeline resolves and
+ * connects to a destination.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Destination\HttpEndpoint $http_endpoint
+ * Optional. An HTTP endpoint destination described by an URI.
+ * If a DNS FQDN is provided as the endpoint, Pipeline will create a
+ * peering zone to the consumer VPC and forward DNS requests to the VPC
+ * specified by network config to resolve the service endpoint. See:
+ * https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones
+ * @type string $workflow
+ * Optional. The resource name of the Workflow whose Executions are
+ * triggered by the events. The Workflow resource should be deployed in
+ * the same project as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/workflows/{workflow}`
+ * @type string $message_bus
+ * Optional. The resource name of the Message Bus to which events should
+ * be published. The Message Bus resource should exist in the same project
+ * as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/messageBuses/{message_bus}`
+ * @type string $topic
+ * Optional. The resource name of the Pub/Sub topic to which events should
+ * be published. Format:
+ * `projects/{project}/locations/{location}/topics/{topic}`
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig $authentication_config
+ * Optional. An authentication config used to authenticate message requests,
+ * such that destinations can verify the source. For example, this can be
+ * used with private GCP destinations that require GCP credentials to access
+ * like Cloud Run. This field is optional and should be set only by users
+ * interested in authenticated push
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat $output_payload_format
+ * Optional. The message format before it is delivered to the destination.
+ * If not set, the message will be delivered in the format it was originally
+ * delivered to the Pipeline. This field can only be set if
+ * Pipeline.input_payload_format is also set.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Network config is used to configure how Pipeline resolves and
+ * connects to a destination.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig network_config = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Destination\NetworkConfig|null
+ */
+ public function getNetworkConfig()
+ {
+ return $this->network_config;
+ }
+
+ public function hasNetworkConfig()
+ {
+ return isset($this->network_config);
+ }
+
+ public function clearNetworkConfig()
+ {
+ unset($this->network_config);
+ }
+
+ /**
+ * Optional. Network config is used to configure how Pipeline resolves and
+ * connects to a destination.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig network_config = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Destination\NetworkConfig $var
+ * @return $this
+ */
+ public function setNetworkConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Destination\NetworkConfig::class);
+ $this->network_config = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. An HTTP endpoint destination described by an URI.
+ * If a DNS FQDN is provided as the endpoint, Pipeline will create a
+ * peering zone to the consumer VPC and forward DNS requests to the VPC
+ * specified by network config to resolve the service endpoint. See:
+ * https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint http_endpoint = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Destination\HttpEndpoint|null
+ */
+ public function getHttpEndpoint()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasHttpEndpoint()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Optional. An HTTP endpoint destination described by an URI.
+ * If a DNS FQDN is provided as the endpoint, Pipeline will create a
+ * peering zone to the consumer VPC and forward DNS requests to the VPC
+ * specified by network config to resolve the service endpoint. See:
+ * https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint http_endpoint = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Destination\HttpEndpoint $var
+ * @return $this
+ */
+ public function setHttpEndpoint($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Destination\HttpEndpoint::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. The resource name of the Workflow whose Executions are
+ * triggered by the events. The Workflow resource should be deployed in
+ * the same project as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/workflows/{workflow}`
+ *
+ * Generated from protobuf field string workflow = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getWorkflow()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasWorkflow()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Optional. The resource name of the Workflow whose Executions are
+ * triggered by the events. The Workflow resource should be deployed in
+ * the same project as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/workflows/{workflow}`
+ *
+ * Generated from protobuf field string workflow = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setWorkflow($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. The resource name of the Message Bus to which events should
+ * be published. The Message Bus resource should exist in the same project
+ * as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/messageBuses/{message_bus}`
+ *
+ * Generated from protobuf field string message_bus = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getMessageBus()
+ {
+ return $this->readOneof(4);
+ }
+
+ public function hasMessageBus()
+ {
+ return $this->hasOneof(4);
+ }
+
+ /**
+ * Optional. The resource name of the Message Bus to which events should
+ * be published. The Message Bus resource should exist in the same project
+ * as the Pipeline. Format:
+ * `projects/{project}/locations/{location}/messageBuses/{message_bus}`
+ *
+ * Generated from protobuf field string message_bus = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setMessageBus($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(4, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. The resource name of the Pub/Sub topic to which events should
+ * be published. Format:
+ * `projects/{project}/locations/{location}/topics/{topic}`
+ *
+ * Generated from protobuf field string topic = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getTopic()
+ {
+ return $this->readOneof(8);
+ }
+
+ public function hasTopic()
+ {
+ return $this->hasOneof(8);
+ }
+
+ /**
+ * Optional. The resource name of the Pub/Sub topic to which events should
+ * be published. Format:
+ * `projects/{project}/locations/{location}/topics/{topic}`
+ *
+ * Generated from protobuf field string topic = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setTopic($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->writeOneof(8, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. An authentication config used to authenticate message requests,
+ * such that destinations can verify the source. For example, this can be
+ * used with private GCP destinations that require GCP credentials to access
+ * like Cloud Run. This field is optional and should be set only by users
+ * interested in authenticated push
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig authentication_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig|null
+ */
+ public function getAuthenticationConfig()
+ {
+ return $this->authentication_config;
+ }
+
+ public function hasAuthenticationConfig()
+ {
+ return isset($this->authentication_config);
+ }
+
+ public function clearAuthenticationConfig()
+ {
+ unset($this->authentication_config);
+ }
+
+ /**
+ * Optional. An authentication config used to authenticate message requests,
+ * such that destinations can verify the source. For example, this can be
+ * used with private GCP destinations that require GCP credentials to access
+ * like Cloud Run. This field is optional and should be set only by users
+ * interested in authenticated push
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig authentication_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig $var
+ * @return $this
+ */
+ public function setAuthenticationConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig::class);
+ $this->authentication_config = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The message format before it is delivered to the destination.
+ * If not set, the message will be delivered in the format it was originally
+ * delivered to the Pipeline. This field can only be set if
+ * Pipeline.input_payload_format is also set.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat output_payload_format = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat|null
+ */
+ public function getOutputPayloadFormat()
+ {
+ return $this->output_payload_format;
+ }
+
+ public function hasOutputPayloadFormat()
+ {
+ return isset($this->output_payload_format);
+ }
+
+ public function clearOutputPayloadFormat()
+ {
+ unset($this->output_payload_format);
+ }
+
+ /**
+ * Optional. The message format before it is delivered to the destination.
+ * If not set, the message will be delivered in the format it was originally
+ * delivered to the Pipeline. This field can only be set if
+ * Pipeline.input_payload_format is also set.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat output_payload_format = 6 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat $var
+ * @return $this
+ */
+ public function setOutputPayloadFormat($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat::class);
+ $this->output_payload_format = $var;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDestinationDescriptor()
+ {
+ return $this->whichOneof("destination_descriptor");
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig.php b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig.php
new file mode 100644
index 000000000000..5bba2ffb9e28
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig.php
@@ -0,0 +1,127 @@
+google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig
+ */
+class AuthenticationConfig extends \Google\Protobuf\Internal\Message
+{
+ protected $authentication_method_descriptor;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OidcToken $google_oidc
+ * Optional. This authenticate method will apply Google OIDC tokens
+ * signed by a GCP service account to the requests.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OAuthToken $oauth_token
+ * Optional. If specified, an [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2) will
+ * be generated and attached as an `Authorization` header in the HTTP
+ * request.
+ * This type of authorization should generally only be used when calling
+ * Google APIs hosted on *.googleapis.com.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. This authenticate method will apply Google OIDC tokens
+ * signed by a GCP service account to the requests.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken google_oidc = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OidcToken|null
+ */
+ public function getGoogleOidc()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasGoogleOidc()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Optional. This authenticate method will apply Google OIDC tokens
+ * signed by a GCP service account to the requests.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken google_oidc = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OidcToken $var
+ * @return $this
+ */
+ public function setGoogleOidc($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OidcToken::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. If specified, an [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2) will
+ * be generated and attached as an `Authorization` header in the HTTP
+ * request.
+ * This type of authorization should generally only be used when calling
+ * Google APIs hosted on *.googleapis.com.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken oauth_token = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OAuthToken|null
+ */
+ public function getOauthToken()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasOauthToken()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Optional. If specified, an [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2) will
+ * be generated and attached as an `Authorization` header in the HTTP
+ * request.
+ * This type of authorization should generally only be used when calling
+ * Google APIs hosted on *.googleapis.com.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken oauth_token = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OAuthToken $var
+ * @return $this
+ */
+ public function setOauthToken($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Destination\AuthenticationConfig\OAuthToken::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAuthenticationMethodDescriptor()
+ {
+ return $this->whichOneof("authentication_method_descriptor");
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OAuthToken.php b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OAuthToken.php
new file mode 100644
index 000000000000..323b00a3ab69
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OAuthToken.php
@@ -0,0 +1,141 @@
+google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken
+ */
+class OAuthToken extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Service account email used to generate the [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2).
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
+ * to create OAuth2 tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $service_account = '';
+ /**
+ * Optional. OAuth scope to be used for generating OAuth access token.
+ * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ * will be used.
+ *
+ * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $scope = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service_account
+ * Required. Service account email used to generate the [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2).
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
+ * to create OAuth2 tokens for authenticated requests.
+ * @type string $scope
+ * Optional. OAuth scope to be used for generating OAuth access token.
+ * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ * will be used.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Service account email used to generate the [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2).
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
+ * to create OAuth2 tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getServiceAccount()
+ {
+ return $this->service_account;
+ }
+
+ /**
+ * Required. Service account email used to generate the [OAuth
+ * token](https://developers.google.com/identity/protocols/OAuth2).
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline
+ * to create OAuth2 tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceAccount($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_account = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. OAuth scope to be used for generating OAuth access token.
+ * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ * will be used.
+ *
+ * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getScope()
+ {
+ return $this->scope;
+ }
+
+ /**
+ * Optional. OAuth scope to be used for generating OAuth access token.
+ * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ * will be used.
+ *
+ * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setScope($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->scope = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OidcToken.php b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OidcToken.php
new file mode 100644
index 000000000000..db97a3e1f937
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination/AuthenticationConfig/OidcToken.php
@@ -0,0 +1,137 @@
+google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken
+ */
+class OidcToken extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Service account email used to generate the OIDC Token.
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow the
+ * Pipeline to create OpenID tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $service_account = '';
+ /**
+ * Optional. Audience to be used to generate the OIDC Token. The
+ * audience claim identifies the recipient that the JWT is intended for.
+ * If unspecified, the destination URI will be used.
+ *
+ * Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $audience = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $service_account
+ * Required. Service account email used to generate the OIDC Token.
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow the
+ * Pipeline to create OpenID tokens for authenticated requests.
+ * @type string $audience
+ * Optional. Audience to be used to generate the OIDC Token. The
+ * audience claim identifies the recipient that the JWT is intended for.
+ * If unspecified, the destination URI will be used.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Service account email used to generate the OIDC Token.
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow the
+ * Pipeline to create OpenID tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getServiceAccount()
+ {
+ return $this->service_account;
+ }
+
+ /**
+ * Required. Service account email used to generate the OIDC Token.
+ * The principal who calls this API must have
+ * iam.serviceAccounts.actAs permission in the service account. See
+ * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
+ * for more information. Eventarc service agents must have
+ * roles/roles/iam.serviceAccountTokenCreator role to allow the
+ * Pipeline to create OpenID tokens for authenticated requests.
+ *
+ * Generated from protobuf field string service_account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceAccount($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_account = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Audience to be used to generate the OIDC Token. The
+ * audience claim identifies the recipient that the JWT is intended for.
+ * If unspecified, the destination URI will be used.
+ *
+ * Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getAudience()
+ {
+ return $this->audience;
+ }
+
+ /**
+ * Optional. Audience to be used to generate the OIDC Token. The
+ * audience claim identifies the recipient that the JWT is intended for.
+ * If unspecified, the destination URI will be used.
+ *
+ * Generated from protobuf field string audience = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setAudience($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->audience = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Destination/HttpEndpoint.php b/Eventarc/src/V1/Pipeline/Destination/HttpEndpoint.php
new file mode 100644
index 000000000000..c7900af14d5c
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination/HttpEndpoint.php
@@ -0,0 +1,738 @@
+google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint
+ */
+class HttpEndpoint extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `https://svc.us-central1.p.local:8080/route`.
+ * Only the HTTPS protocol is supported.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $uri = '';
+ /**
+ * Optional. The CEL expression used to modify how the destination-bound
+ * HTTP request is constructed.
+ * If a binding expression is not specified here, the message
+ * is treated as a CloudEvent and is mapped to the HTTP request according
+ * to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this
+ * representation, all fields except the `data` and `datacontenttype`
+ * field on the message are mapped to HTTP request headers with a prefix
+ * of `ce-`.
+ * To construct the HTTP request payload and the value of the content-type
+ * HTTP header, the payload format is defined as follows:
+ * 1) Use the output_payload_format_type on the Pipeline.Destination if it
+ * is set, else:
+ * 2) Use the input_payload_format_type on the Pipeline if it is set,
+ * else:
+ * 3) Treat the payload as opaque binary data.
+ * The `data` field of the message is converted to the payload format or
+ * left as-is for case 3) and then attached as the payload of the HTTP
+ * request. The `content-type` header on the HTTP request is set to the
+ * payload format type or left empty for case 3). However, if a mediation
+ * has updated the `datacontenttype` field on the message so that it is
+ * not the same as the payload format type but it is still a prefix of the
+ * payload format type, then the `content-type` header on the HTTP request
+ * is set to this `datacontenttype` value. For example, if the
+ * `datacontenttype` is "application/json" and the payload format type is
+ * "application/json; charset=utf-8", then the `content-type` header on
+ * the HTTP request is set to "application/json; charset=utf-8".
+ * If a non-empty binding expression is specified then this expression is
+ * used to modify the default CloudEvent HTTP Protocol Binding Binary
+ * Content representation.
+ * The result of the CEL expression must be a map of key/value pairs
+ * which is used as follows:
+ * - If a map named `headers` exists on the result of the expression,
+ * then its key/value pairs are directly mapped to the HTTP request
+ * headers. The headers values are constructed from the corresponding
+ * value type’s canonical representation. If the `headers` field doesn’t
+ * exist then the resulting HTTP request will be the headers of the
+ * CloudEvent HTTP Binding Binary Content Mode representation of the final
+ * message. Note: If the specified binding expression, has updated the
+ * `datacontenttype` field on the message so that it is not the same as
+ * the payload format type but it is still a prefix of the payload format
+ * type, then the `content-type` header in the `headers` map is set to
+ * this `datacontenttype` value.
+ * - If a field named `body` exists on the result of the expression then
+ * its value is directly mapped to the body of the request. If the value
+ * of the `body` field is of type bytes or string then it is used for
+ * the HTTP request body as-is, with no conversion. If the body field is
+ * of any other type then it is converted to a JSON string. If the body
+ * field does not exist then the resulting payload of the HTTP request
+ * will be data value of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message as described earlier.
+ * - Any other fields in the resulting expression will be ignored.
+ * The CEL expression may access the incoming CloudEvent message in its
+ * definition, as follows:
+ * - The `data` field of the incoming CloudEvent message can be accessed
+ * using the `message.data` value. Subfields of `message.data` may also be
+ * accessed if an input_payload_format has been specified on the Pipeline.
+ * - Each attribute of the incoming CloudEvent message can be accessed
+ * using the `message.` value, where is replaced with the
+ * name of the attribute.
+ * - Existing headers can be accessed in the CEL expression using the
+ * `headers` variable. The `headers` variable defines a map of key/value
+ * pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
+ * Binary Content Mode representation of the final message as described
+ * earlier. For example, the following CEL expression can be used to
+ * construct an HTTP request by adding an additional header to the HTTP
+ * headers of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message and by overwriting the body of the
+ * request:
+ * ```
+ * {
+ * "headers": headers.merge({"new-header-key": "new-header-value"}),
+ * "body": "new-body"
+ * }
+ * ```
+ * Additionally, the following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - toBase64Url:
+ * map.toBase64Url() -> string
+ * - Converts a CelValue to a base64url encoded string
+ * - toJsonString: map.toJsonString() -> string
+ * - Converts a CelValue to a JSON string
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ * The Pipeline expects that the message it receives adheres to the
+ * standard CloudEvent format. If it doesn’t then the outgoing message
+ * request may fail with a persistent error.
+ *
+ * Generated from protobuf field string message_binding_template = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $message_binding_template = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $uri
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `https://svc.us-central1.p.local:8080/route`.
+ * Only the HTTPS protocol is supported.
+ * @type string $message_binding_template
+ * Optional. The CEL expression used to modify how the destination-bound
+ * HTTP request is constructed.
+ * If a binding expression is not specified here, the message
+ * is treated as a CloudEvent and is mapped to the HTTP request according
+ * to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this
+ * representation, all fields except the `data` and `datacontenttype`
+ * field on the message are mapped to HTTP request headers with a prefix
+ * of `ce-`.
+ * To construct the HTTP request payload and the value of the content-type
+ * HTTP header, the payload format is defined as follows:
+ * 1) Use the output_payload_format_type on the Pipeline.Destination if it
+ * is set, else:
+ * 2) Use the input_payload_format_type on the Pipeline if it is set,
+ * else:
+ * 3) Treat the payload as opaque binary data.
+ * The `data` field of the message is converted to the payload format or
+ * left as-is for case 3) and then attached as the payload of the HTTP
+ * request. The `content-type` header on the HTTP request is set to the
+ * payload format type or left empty for case 3). However, if a mediation
+ * has updated the `datacontenttype` field on the message so that it is
+ * not the same as the payload format type but it is still a prefix of the
+ * payload format type, then the `content-type` header on the HTTP request
+ * is set to this `datacontenttype` value. For example, if the
+ * `datacontenttype` is "application/json" and the payload format type is
+ * "application/json; charset=utf-8", then the `content-type` header on
+ * the HTTP request is set to "application/json; charset=utf-8".
+ * If a non-empty binding expression is specified then this expression is
+ * used to modify the default CloudEvent HTTP Protocol Binding Binary
+ * Content representation.
+ * The result of the CEL expression must be a map of key/value pairs
+ * which is used as follows:
+ * - If a map named `headers` exists on the result of the expression,
+ * then its key/value pairs are directly mapped to the HTTP request
+ * headers. The headers values are constructed from the corresponding
+ * value type’s canonical representation. If the `headers` field doesn’t
+ * exist then the resulting HTTP request will be the headers of the
+ * CloudEvent HTTP Binding Binary Content Mode representation of the final
+ * message. Note: If the specified binding expression, has updated the
+ * `datacontenttype` field on the message so that it is not the same as
+ * the payload format type but it is still a prefix of the payload format
+ * type, then the `content-type` header in the `headers` map is set to
+ * this `datacontenttype` value.
+ * - If a field named `body` exists on the result of the expression then
+ * its value is directly mapped to the body of the request. If the value
+ * of the `body` field is of type bytes or string then it is used for
+ * the HTTP request body as-is, with no conversion. If the body field is
+ * of any other type then it is converted to a JSON string. If the body
+ * field does not exist then the resulting payload of the HTTP request
+ * will be data value of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message as described earlier.
+ * - Any other fields in the resulting expression will be ignored.
+ * The CEL expression may access the incoming CloudEvent message in its
+ * definition, as follows:
+ * - The `data` field of the incoming CloudEvent message can be accessed
+ * using the `message.data` value. Subfields of `message.data` may also be
+ * accessed if an input_payload_format has been specified on the Pipeline.
+ * - Each attribute of the incoming CloudEvent message can be accessed
+ * using the `message.` value, where is replaced with the
+ * name of the attribute.
+ * - Existing headers can be accessed in the CEL expression using the
+ * `headers` variable. The `headers` variable defines a map of key/value
+ * pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
+ * Binary Content Mode representation of the final message as described
+ * earlier. For example, the following CEL expression can be used to
+ * construct an HTTP request by adding an additional header to the HTTP
+ * headers of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message and by overwriting the body of the
+ * request:
+ * ```
+ * {
+ * "headers": headers.merge({"new-header-key": "new-header-value"}),
+ * "body": "new-body"
+ * }
+ * ```
+ * Additionally, the following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - toBase64Url:
+ * map.toBase64Url() -> string
+ * - Converts a CelValue to a base64url encoded string
+ * - toJsonString: map.toJsonString() -> string
+ * - Converts a CelValue to a JSON string
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ * The Pipeline expects that the message it receives adheres to the
+ * standard CloudEvent format. If it doesn’t then the outgoing message
+ * request may fail with a persistent error.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `https://svc.us-central1.p.local:8080/route`.
+ * Only the HTTPS protocol is supported.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getUri()
+ {
+ return $this->uri;
+ }
+
+ /**
+ * Required. The URI of the HTTP enpdoint.
+ * The value must be a RFC2396 URI string.
+ * Examples: `https://svc.us-central1.p.local:8080/route`.
+ * Only the HTTPS protocol is supported.
+ *
+ * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setUri($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->uri = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The CEL expression used to modify how the destination-bound
+ * HTTP request is constructed.
+ * If a binding expression is not specified here, the message
+ * is treated as a CloudEvent and is mapped to the HTTP request according
+ * to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this
+ * representation, all fields except the `data` and `datacontenttype`
+ * field on the message are mapped to HTTP request headers with a prefix
+ * of `ce-`.
+ * To construct the HTTP request payload and the value of the content-type
+ * HTTP header, the payload format is defined as follows:
+ * 1) Use the output_payload_format_type on the Pipeline.Destination if it
+ * is set, else:
+ * 2) Use the input_payload_format_type on the Pipeline if it is set,
+ * else:
+ * 3) Treat the payload as opaque binary data.
+ * The `data` field of the message is converted to the payload format or
+ * left as-is for case 3) and then attached as the payload of the HTTP
+ * request. The `content-type` header on the HTTP request is set to the
+ * payload format type or left empty for case 3). However, if a mediation
+ * has updated the `datacontenttype` field on the message so that it is
+ * not the same as the payload format type but it is still a prefix of the
+ * payload format type, then the `content-type` header on the HTTP request
+ * is set to this `datacontenttype` value. For example, if the
+ * `datacontenttype` is "application/json" and the payload format type is
+ * "application/json; charset=utf-8", then the `content-type` header on
+ * the HTTP request is set to "application/json; charset=utf-8".
+ * If a non-empty binding expression is specified then this expression is
+ * used to modify the default CloudEvent HTTP Protocol Binding Binary
+ * Content representation.
+ * The result of the CEL expression must be a map of key/value pairs
+ * which is used as follows:
+ * - If a map named `headers` exists on the result of the expression,
+ * then its key/value pairs are directly mapped to the HTTP request
+ * headers. The headers values are constructed from the corresponding
+ * value type’s canonical representation. If the `headers` field doesn’t
+ * exist then the resulting HTTP request will be the headers of the
+ * CloudEvent HTTP Binding Binary Content Mode representation of the final
+ * message. Note: If the specified binding expression, has updated the
+ * `datacontenttype` field on the message so that it is not the same as
+ * the payload format type but it is still a prefix of the payload format
+ * type, then the `content-type` header in the `headers` map is set to
+ * this `datacontenttype` value.
+ * - If a field named `body` exists on the result of the expression then
+ * its value is directly mapped to the body of the request. If the value
+ * of the `body` field is of type bytes or string then it is used for
+ * the HTTP request body as-is, with no conversion. If the body field is
+ * of any other type then it is converted to a JSON string. If the body
+ * field does not exist then the resulting payload of the HTTP request
+ * will be data value of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message as described earlier.
+ * - Any other fields in the resulting expression will be ignored.
+ * The CEL expression may access the incoming CloudEvent message in its
+ * definition, as follows:
+ * - The `data` field of the incoming CloudEvent message can be accessed
+ * using the `message.data` value. Subfields of `message.data` may also be
+ * accessed if an input_payload_format has been specified on the Pipeline.
+ * - Each attribute of the incoming CloudEvent message can be accessed
+ * using the `message.` value, where is replaced with the
+ * name of the attribute.
+ * - Existing headers can be accessed in the CEL expression using the
+ * `headers` variable. The `headers` variable defines a map of key/value
+ * pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
+ * Binary Content Mode representation of the final message as described
+ * earlier. For example, the following CEL expression can be used to
+ * construct an HTTP request by adding an additional header to the HTTP
+ * headers of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message and by overwriting the body of the
+ * request:
+ * ```
+ * {
+ * "headers": headers.merge({"new-header-key": "new-header-value"}),
+ * "body": "new-body"
+ * }
+ * ```
+ * Additionally, the following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - toBase64Url:
+ * map.toBase64Url() -> string
+ * - Converts a CelValue to a base64url encoded string
+ * - toJsonString: map.toJsonString() -> string
+ * - Converts a CelValue to a JSON string
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ * The Pipeline expects that the message it receives adheres to the
+ * standard CloudEvent format. If it doesn’t then the outgoing message
+ * request may fail with a persistent error.
+ *
+ * Generated from protobuf field string message_binding_template = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getMessageBindingTemplate()
+ {
+ return $this->message_binding_template;
+ }
+
+ /**
+ * Optional. The CEL expression used to modify how the destination-bound
+ * HTTP request is constructed.
+ * If a binding expression is not specified here, the message
+ * is treated as a CloudEvent and is mapped to the HTTP request according
+ * to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this
+ * representation, all fields except the `data` and `datacontenttype`
+ * field on the message are mapped to HTTP request headers with a prefix
+ * of `ce-`.
+ * To construct the HTTP request payload and the value of the content-type
+ * HTTP header, the payload format is defined as follows:
+ * 1) Use the output_payload_format_type on the Pipeline.Destination if it
+ * is set, else:
+ * 2) Use the input_payload_format_type on the Pipeline if it is set,
+ * else:
+ * 3) Treat the payload as opaque binary data.
+ * The `data` field of the message is converted to the payload format or
+ * left as-is for case 3) and then attached as the payload of the HTTP
+ * request. The `content-type` header on the HTTP request is set to the
+ * payload format type or left empty for case 3). However, if a mediation
+ * has updated the `datacontenttype` field on the message so that it is
+ * not the same as the payload format type but it is still a prefix of the
+ * payload format type, then the `content-type` header on the HTTP request
+ * is set to this `datacontenttype` value. For example, if the
+ * `datacontenttype` is "application/json" and the payload format type is
+ * "application/json; charset=utf-8", then the `content-type` header on
+ * the HTTP request is set to "application/json; charset=utf-8".
+ * If a non-empty binding expression is specified then this expression is
+ * used to modify the default CloudEvent HTTP Protocol Binding Binary
+ * Content representation.
+ * The result of the CEL expression must be a map of key/value pairs
+ * which is used as follows:
+ * - If a map named `headers` exists on the result of the expression,
+ * then its key/value pairs are directly mapped to the HTTP request
+ * headers. The headers values are constructed from the corresponding
+ * value type’s canonical representation. If the `headers` field doesn’t
+ * exist then the resulting HTTP request will be the headers of the
+ * CloudEvent HTTP Binding Binary Content Mode representation of the final
+ * message. Note: If the specified binding expression, has updated the
+ * `datacontenttype` field on the message so that it is not the same as
+ * the payload format type but it is still a prefix of the payload format
+ * type, then the `content-type` header in the `headers` map is set to
+ * this `datacontenttype` value.
+ * - If a field named `body` exists on the result of the expression then
+ * its value is directly mapped to the body of the request. If the value
+ * of the `body` field is of type bytes or string then it is used for
+ * the HTTP request body as-is, with no conversion. If the body field is
+ * of any other type then it is converted to a JSON string. If the body
+ * field does not exist then the resulting payload of the HTTP request
+ * will be data value of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message as described earlier.
+ * - Any other fields in the resulting expression will be ignored.
+ * The CEL expression may access the incoming CloudEvent message in its
+ * definition, as follows:
+ * - The `data` field of the incoming CloudEvent message can be accessed
+ * using the `message.data` value. Subfields of `message.data` may also be
+ * accessed if an input_payload_format has been specified on the Pipeline.
+ * - Each attribute of the incoming CloudEvent message can be accessed
+ * using the `message.` value, where is replaced with the
+ * name of the attribute.
+ * - Existing headers can be accessed in the CEL expression using the
+ * `headers` variable. The `headers` variable defines a map of key/value
+ * pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding
+ * Binary Content Mode representation of the final message as described
+ * earlier. For example, the following CEL expression can be used to
+ * construct an HTTP request by adding an additional header to the HTTP
+ * headers of the CloudEvent HTTP Binding Binary Content Mode
+ * representation of the final message and by overwriting the body of the
+ * request:
+ * ```
+ * {
+ * "headers": headers.merge({"new-header-key": "new-header-value"}),
+ * "body": "new-body"
+ * }
+ * ```
+ * Additionally, the following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - toBase64Url:
+ * map.toBase64Url() -> string
+ * - Converts a CelValue to a base64url encoded string
+ * - toJsonString: map.toJsonString() -> string
+ * - Converts a CelValue to a JSON string
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ * The Pipeline expects that the message it receives adheres to the
+ * standard CloudEvent format. If it doesn’t then the outgoing message
+ * request may fail with a persistent error.
+ *
+ * Generated from protobuf field string message_binding_template = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setMessageBindingTemplate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->message_binding_template = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Destination/NetworkConfig.php b/Eventarc/src/V1/Pipeline/Destination/NetworkConfig.php
new file mode 100644
index 000000000000..eaede052b443
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Destination/NetworkConfig.php
@@ -0,0 +1,77 @@
+google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig
+ */
+class NetworkConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * consumer VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ */
+ protected $network_attachment = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $network_attachment
+ * Required. Name of the NetworkAttachment that allows access to the
+ * consumer VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * consumer VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @return string
+ */
+ public function getNetworkAttachment()
+ {
+ return $this->network_attachment;
+ }
+
+ /**
+ * Required. Name of the NetworkAttachment that allows access to the
+ * consumer VPC. Format:
+ * `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}`
+ *
+ * Generated from protobuf field string network_attachment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
+ * @param string $var
+ * @return $this
+ */
+ public function setNetworkAttachment($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->network_attachment = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Mediation.php b/Eventarc/src/V1/Pipeline/Mediation.php
new file mode 100644
index 000000000000..026629778c07
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Mediation.php
@@ -0,0 +1,76 @@
+google.cloud.eventarc.v1.Pipeline.Mediation
+ */
+class Mediation extends \Google\Protobuf\Internal\Message
+{
+ protected $mediation_descriptor;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\Mediation\Transformation $transformation
+ * Optional. How the Pipeline is to transform messages
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. How the Pipeline is to transform messages
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Mediation.Transformation transformation = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\Mediation\Transformation|null
+ */
+ public function getTransformation()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasTransformation()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Optional. How the Pipeline is to transform messages
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.Mediation.Transformation transformation = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\Mediation\Transformation $var
+ * @return $this
+ */
+ public function setTransformation($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\Mediation\Transformation::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMediationDescriptor()
+ {
+ return $this->whichOneof("mediation_descriptor");
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/Mediation/Transformation.php b/Eventarc/src/V1/Pipeline/Mediation/Transformation.php
new file mode 100644
index 000000000000..7c4ad3d64610
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/Mediation/Transformation.php
@@ -0,0 +1,368 @@
+google.cloud.eventarc.v1.Pipeline.Mediation.Transformation
+ */
+class Transformation extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The CEL expression template to apply to transform messages.
+ * The following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ *
+ * Generated from protobuf field string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $transformation_template = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $transformation_template
+ * Optional. The CEL expression template to apply to transform messages.
+ * The following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The CEL expression template to apply to transform messages.
+ * The following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ *
+ * Generated from protobuf field string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getTransformationTemplate()
+ {
+ return $this->transformation_template;
+ }
+
+ /**
+ * Optional. The CEL expression template to apply to transform messages.
+ * The following CEL extension functions are provided for
+ * use in this CEL expression:
+ * - merge:
+ * map1.merge(map2) -> map3
+ * - Merges the passed CEL map with the existing CEL map the
+ * function is applied to.
+ * - If the same key exists in both maps, if the key's value is type
+ * map both maps are merged else the value from the passed map is
+ * used.
+ * - denormalize:
+ * map.denormalize() -> map
+ * - Denormalizes a CEL map such that every value of type map or key
+ * in the map is expanded to return a single level map.
+ * - The resulting keys are "." separated indices of the map keys.
+ * - For example:
+ * {
+ * "a": 1,
+ * "b": {
+ * "c": 2,
+ * "d": 3
+ * }
+ * "e": [4, 5]
+ * }
+ * .denormalize()
+ * -> {
+ * "a": 1,
+ * "b.c": 2,
+ * "b.d": 3,
+ * "e.0": 4,
+ * "e.1": 5
+ * }
+ * - setField:
+ * map.setField(key, value) -> message
+ * - Sets the field of the message with the given key to the
+ * given value.
+ * - If the field is not present it will be added.
+ * - If the field is present it will be overwritten.
+ * - The key can be a dot separated path to set a field in a nested
+ * message.
+ * - Key must be of type string.
+ * - Value may be any valid type.
+ * - removeFields:
+ * map.removeFields([key1, key2, ...]) -> message
+ * - Removes the fields of the map with the given keys.
+ * - The keys can be a dot separated path to remove a field in a
+ * nested message.
+ * - If a key is not found it will be ignored.
+ * - Keys must be of type string.
+ * - toMap:
+ * [map1, map2, ...].toMap() -> map
+ * - Converts a CEL list of CEL maps to a single CEL map
+ * - toDestinationPayloadFormat():
+ * message.data.toDestinationPayloadFormat() -> string or bytes
+ * - Converts the message data to the destination payload format
+ * specified in Pipeline.Destination.output_payload_format
+ * - This function is meant to be applied to the message.data field.
+ * - If the destination payload format is not set, the function will
+ * return the message data unchanged.
+ * - toCloudEventJsonWithPayloadFormat:
+ * message.toCloudEventJsonWithPayloadFormat() -> map
+ * - Converts a message to the corresponding structure of JSON
+ * format for CloudEvents
+ * - This function applies toDestinationPayloadFormat() to the
+ * message data. It also sets the corresponding datacontenttype of
+ * the CloudEvent, as indicated by
+ * Pipeline.Destination.output_payload_format. If no
+ * output_payload_format is set it will use the existing
+ * datacontenttype on the CloudEvent if present, else leave
+ * datacontenttype absent.
+ * - This function expects that the content of the message will
+ * adhere to the standard CloudEvent format. If it doesn’t then this
+ * function will fail.
+ * - The result is a CEL map that corresponds to the JSON
+ * representation of the CloudEvent. To convert that data to a JSON
+ * string it can be chained with the toJsonString function.
+ *
+ * Generated from protobuf field string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setTransformationTemplate($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->transformation_template = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/MessagePayloadFormat.php b/Eventarc/src/V1/Pipeline/MessagePayloadFormat.php
new file mode 100644
index 000000000000..34a284ece569
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/MessagePayloadFormat.php
@@ -0,0 +1,142 @@
+google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat
+ */
+class MessagePayloadFormat extends \Google\Protobuf\Internal\Message
+{
+ protected $kind;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\ProtobufFormat $protobuf
+ * Optional. Protobuf format.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\AvroFormat $avro
+ * Optional. Avro format.
+ * @type \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\JsonFormat $json
+ * Optional. JSON format.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Protobuf format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat protobuf = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\ProtobufFormat|null
+ */
+ public function getProtobuf()
+ {
+ return $this->readOneof(1);
+ }
+
+ public function hasProtobuf()
+ {
+ return $this->hasOneof(1);
+ }
+
+ /**
+ * Optional. Protobuf format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat protobuf = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\ProtobufFormat $var
+ * @return $this
+ */
+ public function setProtobuf($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\ProtobufFormat::class);
+ $this->writeOneof(1, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. Avro format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat avro = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\AvroFormat|null
+ */
+ public function getAvro()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasAvro()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * Optional. Avro format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat avro = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\AvroFormat $var
+ * @return $this
+ */
+ public function setAvro($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\AvroFormat::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * Optional. JSON format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat json = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\JsonFormat|null
+ */
+ public function getJson()
+ {
+ return $this->readOneof(3);
+ }
+
+ public function hasJson()
+ {
+ return $this->hasOneof(3);
+ }
+
+ /**
+ * Optional. JSON format.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat json = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\JsonFormat $var
+ * @return $this
+ */
+ public function setJson($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline\MessagePayloadFormat\JsonFormat::class);
+ $this->writeOneof(3, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->whichOneof("kind");
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/MessagePayloadFormat/AvroFormat.php b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/AvroFormat.php
new file mode 100644
index 000000000000..b992b9198ef6
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/AvroFormat.php
@@ -0,0 +1,68 @@
+google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat
+ */
+class AvroFormat extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $schema_definition = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $schema_definition
+ * Optional. The entire schema definition is stored in this field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getSchemaDefinition()
+ {
+ return $this->schema_definition;
+ }
+
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaDefinition($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_definition = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/MessagePayloadFormat/JsonFormat.php b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/JsonFormat.php
new file mode 100644
index 000000000000..49534a82ce76
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/JsonFormat.php
@@ -0,0 +1,34 @@
+google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat
+ */
+class JsonFormat extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/MessagePayloadFormat/ProtobufFormat.php b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/ProtobufFormat.php
new file mode 100644
index 000000000000..bdb6f706b7dc
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/MessagePayloadFormat/ProtobufFormat.php
@@ -0,0 +1,68 @@
+google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat
+ */
+class ProtobufFormat extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $schema_definition = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $schema_definition
+ * Optional. The entire schema definition is stored in this field.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getSchemaDefinition()
+ {
+ return $this->schema_definition;
+ }
+
+ /**
+ * Optional. The entire schema definition is stored in this field.
+ *
+ * Generated from protobuf field string schema_definition = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setSchemaDefinition($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->schema_definition = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Pipeline/RetryPolicy.php b/Eventarc/src/V1/Pipeline/RetryPolicy.php
new file mode 100644
index 000000000000..af44930dedca
--- /dev/null
+++ b/Eventarc/src/V1/Pipeline/RetryPolicy.php
@@ -0,0 +1,183 @@
+google.cloud.eventarc.v1.Pipeline.RetryPolicy
+ */
+class RetryPolicy extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The maximum number of delivery attempts for any message. The
+ * value must be between 1 and 100. The default value for this field is 5.
+ *
+ * Generated from protobuf field int32 max_attempts = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $max_attempts = 0;
+ /**
+ * Optional. The minimum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 5.
+ *
+ * Generated from protobuf field .google.protobuf.Duration min_retry_delay = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $min_retry_delay = null;
+ /**
+ * Optional. The maximum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 60.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_retry_delay = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $max_retry_delay = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $max_attempts
+ * Optional. The maximum number of delivery attempts for any message. The
+ * value must be between 1 and 100. The default value for this field is 5.
+ * @type \Google\Protobuf\Duration $min_retry_delay
+ * Optional. The minimum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 5.
+ * @type \Google\Protobuf\Duration $max_retry_delay
+ * Optional. The maximum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 60.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Pipeline::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The maximum number of delivery attempts for any message. The
+ * value must be between 1 and 100. The default value for this field is 5.
+ *
+ * Generated from protobuf field int32 max_attempts = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMaxAttempts()
+ {
+ return $this->max_attempts;
+ }
+
+ /**
+ * Optional. The maximum number of delivery attempts for any message. The
+ * value must be between 1 and 100. The default value for this field is 5.
+ *
+ * Generated from protobuf field int32 max_attempts = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMaxAttempts($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->max_attempts = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The minimum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 5.
+ *
+ * Generated from protobuf field .google.protobuf.Duration min_retry_delay = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getMinRetryDelay()
+ {
+ return $this->min_retry_delay;
+ }
+
+ public function hasMinRetryDelay()
+ {
+ return isset($this->min_retry_delay);
+ }
+
+ public function clearMinRetryDelay()
+ {
+ unset($this->min_retry_delay);
+ }
+
+ /**
+ * Optional. The minimum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 5.
+ *
+ * Generated from protobuf field .google.protobuf.Duration min_retry_delay = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setMinRetryDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->min_retry_delay = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The maximum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 60.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_retry_delay = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getMaxRetryDelay()
+ {
+ return $this->max_retry_delay;
+ }
+
+ public function hasMaxRetryDelay()
+ {
+ return isset($this->max_retry_delay);
+ }
+
+ public function clearMaxRetryDelay()
+ {
+ unset($this->max_retry_delay);
+ }
+
+ /**
+ * Optional. The maximum amount of seconds to wait between retry attempts.
+ * The value must be between 1 and 600. The default value for this field
+ * is 60.
+ *
+ * Generated from protobuf field .google.protobuf.Duration max_retry_delay = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setMaxRetryDelay($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->max_retry_delay = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/Eventarc/src/V1/Provider.php b/Eventarc/src/V1/Provider.php
index 2cab34dc5b9d..6afe5e7cb8af 100644
--- a/Eventarc/src/V1/Provider.php
+++ b/Eventarc/src/V1/Provider.php
@@ -16,14 +16,15 @@
class Provider extends \Google\Protobuf\Internal\Message
{
/**
- * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}`
- * format.
+ * Output only. In
+ * `projects/{project}/locations/{location}/providers/{provider_id}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
protected $name = '';
/**
- * Output only. Human friendly name for the Provider. For example "Cloud Storage".
+ * Output only. Human friendly name for the Provider. For example "Cloud
+ * Storage".
*
* Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -42,10 +43,11 @@ class Provider extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $name
- * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}`
- * format.
+ * Output only. In
+ * `projects/{project}/locations/{location}/providers/{provider_id}` format.
* @type string $display_name
- * Output only. Human friendly name for the Provider. For example "Cloud Storage".
+ * Output only. Human friendly name for the Provider. For example "Cloud
+ * Storage".
* @type array<\Google\Cloud\Eventarc\V1\EventType>|\Google\Protobuf\Internal\RepeatedField $event_types
* Output only. Event types for this provider.
* }
@@ -56,8 +58,8 @@ public function __construct($data = NULL) {
}
/**
- * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}`
- * format.
+ * Output only. In
+ * `projects/{project}/locations/{location}/providers/{provider_id}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return string
@@ -68,8 +70,8 @@ public function getName()
}
/**
- * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}`
- * format.
+ * Output only. In
+ * `projects/{project}/locations/{location}/providers/{provider_id}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param string $var
@@ -84,7 +86,8 @@ public function setName($var)
}
/**
- * Output only. Human friendly name for the Provider. For example "Cloud Storage".
+ * Output only. Human friendly name for the Provider. For example "Cloud
+ * Storage".
*
* Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return string
@@ -95,7 +98,8 @@ public function getDisplayName()
}
/**
- * Output only. Human friendly name for the Provider. For example "Cloud Storage".
+ * Output only. Human friendly name for the Provider. For example "Cloud
+ * Storage".
*
* Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param string $var
diff --git a/Eventarc/src/V1/Pubsub.php b/Eventarc/src/V1/Pubsub.php
index 438692870f62..651c38bc08f3 100644
--- a/Eventarc/src/V1/Pubsub.php
+++ b/Eventarc/src/V1/Pubsub.php
@@ -27,8 +27,8 @@ class Pubsub extends \Google\Protobuf\Internal\Message
*/
protected $topic = '';
/**
- * Output only. The name of the Pub/Sub subscription created and managed by Eventarc
- * as a transport for the event delivery. Format:
+ * Output only. The name of the Pub/Sub subscription created and managed by
+ * Eventarc as a transport for the event delivery. Format:
* `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
*
* Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -49,8 +49,8 @@ class Pubsub extends \Google\Protobuf\Internal\Message
* `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide
* here is not deleted by Eventarc at trigger deletion.
* @type string $subscription
- * Output only. The name of the Pub/Sub subscription created and managed by Eventarc
- * as a transport for the event delivery. Format:
+ * Output only. The name of the Pub/Sub subscription created and managed by
+ * Eventarc as a transport for the event delivery. Format:
* `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
* }
*/
@@ -96,8 +96,8 @@ public function setTopic($var)
}
/**
- * Output only. The name of the Pub/Sub subscription created and managed by Eventarc
- * as a transport for the event delivery. Format:
+ * Output only. The name of the Pub/Sub subscription created and managed by
+ * Eventarc as a transport for the event delivery. Format:
* `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
*
* Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -109,8 +109,8 @@ public function getSubscription()
}
/**
- * Output only. The name of the Pub/Sub subscription created and managed by Eventarc
- * as a transport for the event delivery. Format:
+ * Output only. The name of the Pub/Sub subscription created and managed by
+ * Eventarc as a transport for the event delivery. Format:
* `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
*
* Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
diff --git a/Eventarc/src/V1/Trigger.php b/Eventarc/src/V1/Trigger.php
index 144b812b9f05..9a7a92ad8544 100644
--- a/Eventarc/src/V1/Trigger.php
+++ b/Eventarc/src/V1/Trigger.php
@@ -16,16 +16,17 @@
class Trigger extends \Google\Protobuf\Internal\Message
{
/**
- * Required. The resource name of the trigger. Must be unique within the location of the
- * project and must be in
+ * Required. The resource name of the trigger. Must be unique within the
+ * location of the project and must be in
* `projects/{project}/locations/{location}/triggers/{trigger}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
protected $name = '';
/**
- * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
- * string and guaranteed to remain unchanged until the resource is deleted.
+ * Output only. Server-assigned unique identifier for the trigger. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
*
* Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@@ -43,8 +44,9 @@ class Trigger extends \Google\Protobuf\Internal\Message
*/
protected $update_time = null;
/**
- * Required. Unordered list. The list of filters that applies to event attributes. Only events that
- * match all the provided filters are sent to the destination.
+ * Required. Unordered list. The list of filters that applies to event
+ * attributes. Only events that match all the provided filters are sent to the
+ * destination.
*
* Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
*/
@@ -52,16 +54,11 @@ class Trigger extends \Google\Protobuf\Internal\Message
/**
* Optional. The IAM service account email associated with the trigger. The
* service account represents the identity of the trigger.
- * The principal who calls this API must have the `iam.serviceAccounts.actAs`
- * permission in the service account. See
- * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
- * for more information.
- * For Cloud Run destinations, this service account is used to generate
- * identity tokens when invoking the service. See
- * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
- * for information on how to invoke authenticated Cloud Run services.
- * To create Audit Log triggers, the service account should also
- * have the `roles/eventarc.eventReceiver` IAM role.
+ * The `iam.serviceAccounts.actAs` permission must be granted on the service
+ * account to allow a principal to impersonate the service account. For more
+ * information, see the
+ * [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific
+ * to the trigger destination.
*
* Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
*/
@@ -73,7 +70,7 @@ class Trigger extends \Google\Protobuf\Internal\Message
*/
protected $destination = null;
/**
- * Optional. To deliver messages, Eventarc might use other GCP
+ * Optional. To deliver messages, Eventarc might use other Google Cloud
* products as a transport intermediary. This field contains a reference to
* that transport intermediary. This information can be used for debugging
* purposes.
@@ -82,7 +79,8 @@ class Trigger extends \Google\Protobuf\Internal\Message
*/
protected $transport = null;
/**
- * Optional. User labels attached to the triggers that can be used to group resources.
+ * Optional. User labels attached to the triggers that can be used to group
+ * resources.
*
* Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL];
*/
@@ -102,8 +100,23 @@ class Trigger extends \Google\Protobuf\Internal\Message
*/
private $conditions;
/**
- * Output only. This checksum is computed by the server based on the value of other
- * fields, and might be sent only on create requests to ensure that the
+ * Optional. EventDataContentType specifies the type of payload in MIME
+ * format that is expected from the CloudEvent data field. This is set to
+ * `application/json` if the value is not defined.
+ *
+ * Generated from protobuf field string event_data_content_type = 16 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $event_data_content_type = '';
+ /**
+ * Output only. Whether or not this Trigger satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ protected $satisfies_pzs = false;
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
* client has an up-to-date value before proceeding.
*
* Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -117,50 +130,55 @@ class Trigger extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $name
- * Required. The resource name of the trigger. Must be unique within the location of the
- * project and must be in
+ * Required. The resource name of the trigger. Must be unique within the
+ * location of the project and must be in
* `projects/{project}/locations/{location}/triggers/{trigger}` format.
* @type string $uid
- * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
- * string and guaranteed to remain unchanged until the resource is deleted.
+ * Output only. Server-assigned unique identifier for the trigger. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
* @type \Google\Protobuf\Timestamp $create_time
* Output only. The creation time.
* @type \Google\Protobuf\Timestamp $update_time
* Output only. The last-modified time.
* @type array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters
- * Required. Unordered list. The list of filters that applies to event attributes. Only events that
- * match all the provided filters are sent to the destination.
+ * Required. Unordered list. The list of filters that applies to event
+ * attributes. Only events that match all the provided filters are sent to the
+ * destination.
* @type string $service_account
* Optional. The IAM service account email associated with the trigger. The
* service account represents the identity of the trigger.
- * The principal who calls this API must have the `iam.serviceAccounts.actAs`
- * permission in the service account. See
- * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
- * for more information.
- * For Cloud Run destinations, this service account is used to generate
- * identity tokens when invoking the service. See
- * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
- * for information on how to invoke authenticated Cloud Run services.
- * To create Audit Log triggers, the service account should also
- * have the `roles/eventarc.eventReceiver` IAM role.
+ * The `iam.serviceAccounts.actAs` permission must be granted on the service
+ * account to allow a principal to impersonate the service account. For more
+ * information, see the
+ * [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific
+ * to the trigger destination.
* @type \Google\Cloud\Eventarc\V1\Destination $destination
* Required. Destination specifies where the events should be sent to.
* @type \Google\Cloud\Eventarc\V1\Transport $transport
- * Optional. To deliver messages, Eventarc might use other GCP
+ * Optional. To deliver messages, Eventarc might use other Google Cloud
* products as a transport intermediary. This field contains a reference to
* that transport intermediary. This information can be used for debugging
* purposes.
* @type array|\Google\Protobuf\Internal\MapField $labels
- * Optional. User labels attached to the triggers that can be used to group resources.
+ * Optional. User labels attached to the triggers that can be used to group
+ * resources.
* @type string $channel
* Optional. The name of the channel associated with the trigger in
* `projects/{project}/locations/{location}/channels/{channel}` format.
* You must provide a channel to receive events from Eventarc SaaS partners.
* @type array|\Google\Protobuf\Internal\MapField $conditions
* Output only. The reason(s) why a trigger is in FAILED state.
+ * @type string $event_data_content_type
+ * Optional. EventDataContentType specifies the type of payload in MIME
+ * format that is expected from the CloudEvent data field. This is set to
+ * `application/json` if the value is not defined.
+ * @type bool $satisfies_pzs
+ * Output only. Whether or not this Trigger satisfies the requirements of
+ * physical zone separation
* @type string $etag
- * Output only. This checksum is computed by the server based on the value of other
- * fields, and might be sent only on create requests to ensure that the
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
* client has an up-to-date value before proceeding.
* }
*/
@@ -170,8 +188,8 @@ public function __construct($data = NULL) {
}
/**
- * Required. The resource name of the trigger. Must be unique within the location of the
- * project and must be in
+ * Required. The resource name of the trigger. Must be unique within the
+ * location of the project and must be in
* `projects/{project}/locations/{location}/triggers/{trigger}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -183,8 +201,8 @@ public function getName()
}
/**
- * Required. The resource name of the trigger. Must be unique within the location of the
- * project and must be in
+ * Required. The resource name of the trigger. Must be unique within the
+ * location of the project and must be in
* `projects/{project}/locations/{location}/triggers/{trigger}` format.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -200,8 +218,9 @@ public function setName($var)
}
/**
- * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
- * string and guaranteed to remain unchanged until the resource is deleted.
+ * Output only. Server-assigned unique identifier for the trigger. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
*
* Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return string
@@ -212,8 +231,9 @@ public function getUid()
}
/**
- * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
- * string and guaranteed to remain unchanged until the resource is deleted.
+ * Output only. Server-assigned unique identifier for the trigger. The value
+ * is a UUID4 string and guaranteed to remain unchanged until the resource is
+ * deleted.
*
* Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param string $var
@@ -300,8 +320,9 @@ public function setUpdateTime($var)
}
/**
- * Required. Unordered list. The list of filters that applies to event attributes. Only events that
- * match all the provided filters are sent to the destination.
+ * Required. Unordered list. The list of filters that applies to event
+ * attributes. Only events that match all the provided filters are sent to the
+ * destination.
*
* Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
* @return \Google\Protobuf\Internal\RepeatedField
@@ -312,8 +333,9 @@ public function getEventFilters()
}
/**
- * Required. Unordered list. The list of filters that applies to event attributes. Only events that
- * match all the provided filters are sent to the destination.
+ * Required. Unordered list. The list of filters that applies to event
+ * attributes. Only events that match all the provided filters are sent to the
+ * destination.
*
* Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
* @param array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var
@@ -330,16 +352,11 @@ public function setEventFilters($var)
/**
* Optional. The IAM service account email associated with the trigger. The
* service account represents the identity of the trigger.
- * The principal who calls this API must have the `iam.serviceAccounts.actAs`
- * permission in the service account. See
- * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
- * for more information.
- * For Cloud Run destinations, this service account is used to generate
- * identity tokens when invoking the service. See
- * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
- * for information on how to invoke authenticated Cloud Run services.
- * To create Audit Log triggers, the service account should also
- * have the `roles/eventarc.eventReceiver` IAM role.
+ * The `iam.serviceAccounts.actAs` permission must be granted on the service
+ * account to allow a principal to impersonate the service account. For more
+ * information, see the
+ * [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific
+ * to the trigger destination.
*
* Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
* @return string
@@ -352,16 +369,11 @@ public function getServiceAccount()
/**
* Optional. The IAM service account email associated with the trigger. The
* service account represents the identity of the trigger.
- * The principal who calls this API must have the `iam.serviceAccounts.actAs`
- * permission in the service account. See
- * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
- * for more information.
- * For Cloud Run destinations, this service account is used to generate
- * identity tokens when invoking the service. See
- * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
- * for information on how to invoke authenticated Cloud Run services.
- * To create Audit Log triggers, the service account should also
- * have the `roles/eventarc.eventReceiver` IAM role.
+ * The `iam.serviceAccounts.actAs` permission must be granted on the service
+ * account to allow a principal to impersonate the service account. For more
+ * information, see the
+ * [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific
+ * to the trigger destination.
*
* Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
* @param string $var
@@ -412,7 +424,7 @@ public function setDestination($var)
}
/**
- * Optional. To deliver messages, Eventarc might use other GCP
+ * Optional. To deliver messages, Eventarc might use other Google Cloud
* products as a transport intermediary. This field contains a reference to
* that transport intermediary. This information can be used for debugging
* purposes.
@@ -436,7 +448,7 @@ public function clearTransport()
}
/**
- * Optional. To deliver messages, Eventarc might use other GCP
+ * Optional. To deliver messages, Eventarc might use other Google Cloud
* products as a transport intermediary. This field contains a reference to
* that transport intermediary. This information can be used for debugging
* purposes.
@@ -454,7 +466,8 @@ public function setTransport($var)
}
/**
- * Optional. User labels attached to the triggers that can be used to group resources.
+ * Optional. User labels attached to the triggers that can be used to group
+ * resources.
*
* Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL];
* @return \Google\Protobuf\Internal\MapField
@@ -465,7 +478,8 @@ public function getLabels()
}
/**
- * Optional. User labels attached to the triggers that can be used to group resources.
+ * Optional. User labels attached to the triggers that can be used to group
+ * resources.
*
* Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL];
* @param array|\Google\Protobuf\Internal\MapField $var
@@ -536,8 +550,66 @@ public function setConditions($var)
}
/**
- * Output only. This checksum is computed by the server based on the value of other
- * fields, and might be sent only on create requests to ensure that the
+ * Optional. EventDataContentType specifies the type of payload in MIME
+ * format that is expected from the CloudEvent data field. This is set to
+ * `application/json` if the value is not defined.
+ *
+ * Generated from protobuf field string event_data_content_type = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getEventDataContentType()
+ {
+ return $this->event_data_content_type;
+ }
+
+ /**
+ * Optional. EventDataContentType specifies the type of payload in MIME
+ * format that is expected from the CloudEvent data field. This is set to
+ * `application/json` if the value is not defined.
+ *
+ * Generated from protobuf field string event_data_content_type = 16 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setEventDataContentType($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->event_data_content_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether or not this Trigger satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getSatisfiesPzs()
+ {
+ return $this->satisfies_pzs;
+ }
+
+ /**
+ * Output only. Whether or not this Trigger satisfies the requirements of
+ * physical zone separation
+ *
+ * Generated from protobuf field bool satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setSatisfiesPzs($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->satisfies_pzs = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
* client has an up-to-date value before proceeding.
*
* Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -549,8 +621,8 @@ public function getEtag()
}
/**
- * Output only. This checksum is computed by the server based on the value of other
- * fields, and might be sent only on create requests to ensure that the
+ * Output only. This checksum is computed by the server based on the value of
+ * other fields, and might be sent only on create requests to ensure that the
* client has an up-to-date value before proceeding.
*
* Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];
diff --git a/Eventarc/src/V1/UpdateChannelRequest.php b/Eventarc/src/V1/UpdateChannelRequest.php
index ebfe981eb675..3cee00e08c23 100644
--- a/Eventarc/src/V1/UpdateChannelRequest.php
+++ b/Eventarc/src/V1/UpdateChannelRequest.php
@@ -30,10 +30,10 @@ class UpdateChannelRequest extends \Google\Protobuf\Internal\Message
*/
protected $update_mask = null;
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -67,7 +67,7 @@ public static function build(\Google\Cloud\Eventarc\V1\Channel $channel, \Google
* If no field mask is provided, all provided fields in the request are
* updated. To update all fields, provide a field mask of "*".
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -153,10 +153,10 @@ public function setUpdateMask($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -165,10 +165,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/UpdateEnrollmentRequest.php b/Eventarc/src/V1/UpdateEnrollmentRequest.php
new file mode 100644
index 000000000000..70255d125bfe
--- /dev/null
+++ b/Eventarc/src/V1/UpdateEnrollmentRequest.php
@@ -0,0 +1,222 @@
+google.cloud.eventarc.v1.UpdateEnrollmentRequest
+ */
+class UpdateEnrollmentRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The Enrollment to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $enrollment = null;
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $update_mask = null;
+ /**
+ * Optional. If set to true, and the Enrollment is not found, a new Enrollment
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param \Google\Cloud\Eventarc\V1\Enrollment $enrollment Required. The Enrollment to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * @return \Google\Cloud\Eventarc\V1\UpdateEnrollmentRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\Eventarc\V1\Enrollment $enrollment, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setEnrollment($enrollment)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Enrollment $enrollment
+ * Required. The Enrollment to be updated.
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ * @type bool $allow_missing
+ * Optional. If set to true, and the Enrollment is not found, a new Enrollment
+ * will be created. In this situation, `update_mask` is ignored.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The Enrollment to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\Enrollment|null
+ */
+ public function getEnrollment()
+ {
+ return $this->enrollment;
+ }
+
+ public function hasEnrollment()
+ {
+ return isset($this->enrollment);
+ }
+
+ public function clearEnrollment()
+ {
+ unset($this->enrollment);
+ }
+
+ /**
+ * Required. The Enrollment to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Enrollment enrollment = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\Enrollment $var
+ * @return $this
+ */
+ public function setEnrollment($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Enrollment::class);
+ $this->enrollment = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the Enrollment is not found, a new Enrollment
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the Enrollment is not found, a new Enrollment
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/UpdateGoogleApiSourceRequest.php b/Eventarc/src/V1/UpdateGoogleApiSourceRequest.php
new file mode 100644
index 000000000000..420c284a32ab
--- /dev/null
+++ b/Eventarc/src/V1/UpdateGoogleApiSourceRequest.php
@@ -0,0 +1,226 @@
+google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest
+ */
+class UpdateGoogleApiSourceRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The GoogleApiSource to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $google_api_source = null;
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $update_mask = null;
+ /**
+ * Optional. If set to true, and the GoogleApiSource is not found, a new
+ * GoogleApiSource will be created. In this situation, `update_mask` is
+ * ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param \Google\Cloud\Eventarc\V1\GoogleApiSource $googleApiSource Required. The GoogleApiSource to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * @return \Google\Cloud\Eventarc\V1\UpdateGoogleApiSourceRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\Eventarc\V1\GoogleApiSource $googleApiSource, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setGoogleApiSource($googleApiSource)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\GoogleApiSource $google_api_source
+ * Required. The GoogleApiSource to be updated.
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ * @type bool $allow_missing
+ * Optional. If set to true, and the GoogleApiSource is not found, a new
+ * GoogleApiSource will be created. In this situation, `update_mask` is
+ * ignored.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The GoogleApiSource to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\GoogleApiSource|null
+ */
+ public function getGoogleApiSource()
+ {
+ return $this->google_api_source;
+ }
+
+ public function hasGoogleApiSource()
+ {
+ return isset($this->google_api_source);
+ }
+
+ public function clearGoogleApiSource()
+ {
+ unset($this->google_api_source);
+ }
+
+ /**
+ * Required. The GoogleApiSource to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.GoogleApiSource google_api_source = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\GoogleApiSource $var
+ * @return $this
+ */
+ public function setGoogleApiSource($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GoogleApiSource::class);
+ $this->google_api_source = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the GoogleApiSource is not found, a new
+ * GoogleApiSource will be created. In this situation, `update_mask` is
+ * ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the GoogleApiSource is not found, a new
+ * GoogleApiSource will be created. In this situation, `update_mask` is
+ * ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/UpdateMessageBusRequest.php b/Eventarc/src/V1/UpdateMessageBusRequest.php
new file mode 100644
index 000000000000..0699200ebaf8
--- /dev/null
+++ b/Eventarc/src/V1/UpdateMessageBusRequest.php
@@ -0,0 +1,222 @@
+google.cloud.eventarc.v1.UpdateMessageBusRequest
+ */
+class UpdateMessageBusRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The MessageBus to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $message_bus = null;
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $update_mask = null;
+ /**
+ * Optional. If set to true, and the MessageBus is not found, a new MessageBus
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param \Google\Cloud\Eventarc\V1\MessageBus $messageBus Required. The MessageBus to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * @return \Google\Cloud\Eventarc\V1\UpdateMessageBusRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\Eventarc\V1\MessageBus $messageBus, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setMessageBus($messageBus)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\MessageBus $message_bus
+ * Required. The MessageBus to be updated.
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ * @type bool $allow_missing
+ * Optional. If set to true, and the MessageBus is not found, a new MessageBus
+ * will be created. In this situation, `update_mask` is ignored.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The MessageBus to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\MessageBus|null
+ */
+ public function getMessageBus()
+ {
+ return $this->message_bus;
+ }
+
+ public function hasMessageBus()
+ {
+ return isset($this->message_bus);
+ }
+
+ public function clearMessageBus()
+ {
+ unset($this->message_bus);
+ }
+
+ /**
+ * Required. The MessageBus to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.MessageBus message_bus = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\MessageBus $var
+ * @return $this
+ */
+ public function setMessageBus($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\MessageBus::class);
+ $this->message_bus = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, a new MessageBus
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the MessageBus is not found, a new MessageBus
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/UpdatePipelineRequest.php b/Eventarc/src/V1/UpdatePipelineRequest.php
new file mode 100644
index 000000000000..05d4848fe829
--- /dev/null
+++ b/Eventarc/src/V1/UpdatePipelineRequest.php
@@ -0,0 +1,222 @@
+google.cloud.eventarc.v1.UpdatePipelineRequest
+ */
+class UpdatePipelineRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The Pipeline to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ protected $pipeline = null;
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $update_mask = null;
+ /**
+ * Optional. If set to true, and the Pipeline is not found, a new Pipeline
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $allow_missing = false;
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ protected $validate_only = false;
+
+ /**
+ * @param \Google\Cloud\Eventarc\V1\Pipeline $pipeline Required. The Pipeline to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * @return \Google\Cloud\Eventarc\V1\UpdatePipelineRequest
+ *
+ * @experimental
+ */
+ public static function build(\Google\Cloud\Eventarc\V1\Pipeline $pipeline, \Google\Protobuf\FieldMask $updateMask): self
+ {
+ return (new self())
+ ->setPipeline($pipeline)
+ ->setUpdateMask($updateMask);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Eventarc\V1\Pipeline $pipeline
+ * Required. The Pipeline to be updated.
+ * @type \Google\Protobuf\FieldMask $update_mask
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ * @type bool $allow_missing
+ * Optional. If set to true, and the Pipeline is not found, a new Pipeline
+ * will be created. In this situation, `update_mask` is ignored.
+ * @type bool $validate_only
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The Pipeline to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Eventarc\V1\Pipeline|null
+ */
+ public function getPipeline()
+ {
+ return $this->pipeline;
+ }
+
+ public function hasPipeline()
+ {
+ return isset($this->pipeline);
+ }
+
+ public function clearPipeline()
+ {
+ unset($this->pipeline);
+ }
+
+ /**
+ * Required. The Pipeline to be updated.
+ *
+ * Generated from protobuf field .google.cloud.eventarc.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Eventarc\V1\Pipeline $var
+ * @return $this
+ */
+ public function setPipeline($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pipeline::class);
+ $this->pipeline = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\FieldMask|null
+ */
+ public function getUpdateMask()
+ {
+ return $this->update_mask;
+ }
+
+ public function hasUpdateMask()
+ {
+ return isset($this->update_mask);
+ }
+
+ public function clearUpdateMask()
+ {
+ unset($this->update_mask);
+ }
+
+ /**
+ * Optional. The fields to be updated; only fields explicitly provided are
+ * updated. If no field mask is provided, all provided fields in the request
+ * are updated. To update all fields, provide a field mask of "*".
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\FieldMask $var
+ * @return $this
+ */
+ public function setUpdateMask($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
+ $this->update_mask = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set to true, and the Pipeline is not found, a new Pipeline
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getAllowMissing()
+ {
+ return $this->allow_missing;
+ }
+
+ /**
+ * Optional. If set to true, and the Pipeline is not found, a new Pipeline
+ * will be created. In this situation, `update_mask` is ignored.
+ *
+ * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setAllowMissing($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->allow_missing = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getValidateOnly()
+ {
+ return $this->validate_only;
+ }
+
+ /**
+ * Optional. If set, validate the request and preview the review, but do not
+ * post it.
+ *
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setValidateOnly($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->validate_only = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/Eventarc/src/V1/UpdateTriggerRequest.php b/Eventarc/src/V1/UpdateTriggerRequest.php
index 0063f4cb5469..6091f1a892eb 100644
--- a/Eventarc/src/V1/UpdateTriggerRequest.php
+++ b/Eventarc/src/V1/UpdateTriggerRequest.php
@@ -37,10 +37,10 @@ class UpdateTriggerRequest extends \Google\Protobuf\Internal\Message
*/
protected $allow_missing = false;
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $validate_only = false;
@@ -80,7 +80,7 @@ public static function build(\Google\Cloud\Eventarc\V1\Trigger $trigger, \Google
* If set to true, and the trigger is not found, a new trigger will be
* created. In this situation, `update_mask` is ignored.
* @type bool $validate_only
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
* }
*/
@@ -194,10 +194,10 @@ public function setAllowMissing($var)
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getValidateOnly()
@@ -206,10 +206,10 @@ public function getValidateOnly()
}
/**
- * Required. If set, validate the request and preview the review, but do not
+ * Optional. If set, validate the request and preview the review, but do not
* post it.
*
- * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
diff --git a/Eventarc/src/V1/gapic_metadata.json b/Eventarc/src/V1/gapic_metadata.json
index ac94c299f66f..a6223f4e4409 100644
--- a/Eventarc/src/V1/gapic_metadata.json
+++ b/Eventarc/src/V1/gapic_metadata.json
@@ -20,6 +20,26 @@
"createChannelConnection"
]
},
+ "CreateEnrollment": {
+ "methods": [
+ "createEnrollment"
+ ]
+ },
+ "CreateGoogleApiSource": {
+ "methods": [
+ "createGoogleApiSource"
+ ]
+ },
+ "CreateMessageBus": {
+ "methods": [
+ "createMessageBus"
+ ]
+ },
+ "CreatePipeline": {
+ "methods": [
+ "createPipeline"
+ ]
+ },
"CreateTrigger": {
"methods": [
"createTrigger"
@@ -35,6 +55,26 @@
"deleteChannelConnection"
]
},
+ "DeleteEnrollment": {
+ "methods": [
+ "deleteEnrollment"
+ ]
+ },
+ "DeleteGoogleApiSource": {
+ "methods": [
+ "deleteGoogleApiSource"
+ ]
+ },
+ "DeleteMessageBus": {
+ "methods": [
+ "deleteMessageBus"
+ ]
+ },
+ "DeletePipeline": {
+ "methods": [
+ "deletePipeline"
+ ]
+ },
"DeleteTrigger": {
"methods": [
"deleteTrigger"
@@ -50,11 +90,31 @@
"getChannelConnection"
]
},
+ "GetEnrollment": {
+ "methods": [
+ "getEnrollment"
+ ]
+ },
+ "GetGoogleApiSource": {
+ "methods": [
+ "getGoogleApiSource"
+ ]
+ },
"GetGoogleChannelConfig": {
"methods": [
"getGoogleChannelConfig"
]
},
+ "GetMessageBus": {
+ "methods": [
+ "getMessageBus"
+ ]
+ },
+ "GetPipeline": {
+ "methods": [
+ "getPipeline"
+ ]
+ },
"GetProvider": {
"methods": [
"getProvider"
@@ -75,6 +135,31 @@
"listChannels"
]
},
+ "ListEnrollments": {
+ "methods": [
+ "listEnrollments"
+ ]
+ },
+ "ListGoogleApiSources": {
+ "methods": [
+ "listGoogleApiSources"
+ ]
+ },
+ "ListMessageBusEnrollments": {
+ "methods": [
+ "listMessageBusEnrollments"
+ ]
+ },
+ "ListMessageBuses": {
+ "methods": [
+ "listMessageBuses"
+ ]
+ },
+ "ListPipelines": {
+ "methods": [
+ "listPipelines"
+ ]
+ },
"ListProviders": {
"methods": [
"listProviders"
@@ -90,11 +175,31 @@
"updateChannel"
]
},
+ "UpdateEnrollment": {
+ "methods": [
+ "updateEnrollment"
+ ]
+ },
+ "UpdateGoogleApiSource": {
+ "methods": [
+ "updateGoogleApiSource"
+ ]
+ },
"UpdateGoogleChannelConfig": {
"methods": [
"updateGoogleChannelConfig"
]
},
+ "UpdateMessageBus": {
+ "methods": [
+ "updateMessageBus"
+ ]
+ },
+ "UpdatePipeline": {
+ "methods": [
+ "updatePipeline"
+ ]
+ },
"UpdateTrigger": {
"methods": [
"updateTrigger"
diff --git a/Eventarc/src/V1/resources/eventarc_client_config.json b/Eventarc/src/V1/resources/eventarc_client_config.json
index 31759d36a3b7..5203bf50f2ef 100644
--- a/Eventarc/src/V1/resources/eventarc_client_config.json
+++ b/Eventarc/src/V1/resources/eventarc_client_config.json
@@ -2,7 +2,12 @@
"interfaces": {
"google.cloud.eventarc.v1.Eventarc": {
"retry_codes": {
- "no_retry_codes": []
+ "no_retry_codes": [],
+ "retry_policy_1_codes": [
+ "UNAVAILABLE",
+ "UNKNOWN"
+ ],
+ "no_retry_1_codes": []
},
"retry_params": {
"no_retry_params": {
@@ -13,98 +18,221 @@
"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": 60000,
+ "initial_rpc_timeout_millis": 60000,
+ "rpc_timeout_multiplier": 1.0,
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 60000
+ },
+ "no_retry_1_params": {
+ "initial_retry_delay_millis": 0,
+ "retry_delay_multiplier": 0.0,
+ "max_retry_delay_millis": 0,
+ "initial_rpc_timeout_millis": 60000,
+ "rpc_timeout_multiplier": 1.0,
+ "max_rpc_timeout_millis": 60000,
+ "total_timeout_millis": 60000
}
},
"methods": {
"CreateChannel": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"CreateChannelConnection": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "CreateEnrollment": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "CreateGoogleApiSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "CreateMessageBus": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "CreatePipeline": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"CreateTrigger": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"DeleteChannel": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"DeleteChannelConnection": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "DeleteEnrollment": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "DeleteGoogleApiSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "DeleteMessageBus": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "DeletePipeline": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"DeleteTrigger": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"GetChannel": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"GetChannelConnection": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetEnrollment": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetGoogleApiSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"GetGoogleChannelConfig": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetMessageBus": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "GetPipeline": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"GetProvider": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"GetTrigger": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"ListChannelConnections": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"ListChannels": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListEnrollments": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListGoogleApiSources": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListMessageBusEnrollments": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListMessageBuses": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
+ },
+ "ListPipelines": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"ListProviders": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"ListTriggers": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "retry_policy_1_codes",
+ "retry_params_name": "retry_policy_1_params"
},
"UpdateChannel": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdateEnrollment": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdateGoogleApiSource": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"UpdateGoogleChannelConfig": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdateMessageBus": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
+ "UpdatePipeline": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"UpdateTrigger": {
"timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
},
"GetLocation": {
"timeout_millis": 60000,
diff --git a/Eventarc/src/V1/resources/eventarc_descriptor_config.php b/Eventarc/src/V1/resources/eventarc_descriptor_config.php
index 54f8e9ee8eb1..062cd5f67467 100644
--- a/Eventarc/src/V1/resources/eventarc_descriptor_config.php
+++ b/Eventarc/src/V1/resources/eventarc_descriptor_config.php
@@ -61,6 +61,82 @@
],
],
],
+ 'CreateEnrollment' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Enrollment',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'CreateGoogleApiSource' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\GoogleApiSource',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'CreateMessageBus' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\MessageBus',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'CreatePipeline' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Pipeline',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'CreateTrigger' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger',
@@ -118,6 +194,82 @@
],
],
],
+ 'DeleteEnrollment' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Enrollment',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteGoogleApiSource' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\GoogleApiSource',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteMessageBus' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\MessageBus',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeletePipeline' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Pipeline',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteTrigger' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger',
@@ -157,6 +309,86 @@
],
],
],
+ 'UpdateEnrollment' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Enrollment',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'enrollment.name',
+ 'fieldAccessors' => [
+ 'getEnrollment',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateGoogleApiSource' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\GoogleApiSource',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'google_api_source.name',
+ 'fieldAccessors' => [
+ 'getGoogleApiSource',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateMessageBus' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\MessageBus',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'message_bus.name',
+ 'fieldAccessors' => [
+ 'getMessageBus',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdatePipeline' => [
+ 'longRunning' => [
+ 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Pipeline',
+ 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata',
+ 'initialPollDelayMillis' => '500',
+ 'pollDelayMultiplier' => '1.5',
+ 'maxPollDelayMillis' => '5000',
+ 'totalPollTimeoutMillis' => '300000',
+ ],
+ 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
+ 'headerParams' => [
+ [
+ 'keyName' => 'pipeline.name',
+ 'fieldAccessors' => [
+ 'getPipeline',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'UpdateTrigger' => [
'longRunning' => [
'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger',
@@ -201,6 +433,30 @@
],
],
],
+ 'GetEnrollment' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\Enrollment',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetGoogleApiSource' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\GoogleApiSource',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetGoogleChannelConfig' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\Eventarc\V1\GoogleChannelConfig',
@@ -213,6 +469,30 @@
],
],
],
+ 'GetMessageBus' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\MessageBus',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetPipeline' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\Pipeline',
+ 'headerParams' => [
+ [
+ 'keyName' => 'name',
+ 'fieldAccessors' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetProvider' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\Eventarc\V1\Provider',
@@ -277,6 +557,106 @@
],
],
],
+ 'ListEnrollments' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getEnrollments',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\ListEnrollmentsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListGoogleApiSources' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getGoogleApiSources',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\ListGoogleApiSourcesResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListMessageBusEnrollments' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getEnrollments',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\ListMessageBusEnrollmentsResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListMessageBuses' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getMessageBuses',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\ListMessageBusesResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListPipelines' => [
+ 'pageStreaming' => [
+ 'requestPageTokenGetMethod' => 'getPageToken',
+ 'requestPageTokenSetMethod' => 'setPageToken',
+ 'requestPageSizeGetMethod' => 'getPageSize',
+ 'requestPageSizeSetMethod' => 'setPageSize',
+ 'responsePageTokenGetMethod' => 'getNextPageToken',
+ 'resourcesGetMethod' => 'getPipelines',
+ ],
+ 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
+ 'responseType' => 'Google\Cloud\Eventarc\V1\ListPipelinesResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'parent',
+ 'fieldAccessors' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListProviders' => [
'pageStreaming' => [
'requestPageTokenGetMethod' => 'getPageToken',
@@ -408,10 +788,16 @@
'channelConnection' => 'projects/{project}/locations/{location}/channelConnections/{channel_connection}',
'cloudFunction' => 'projects/{project}/locations/{location}/functions/{function}',
'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}',
+ 'enrollment' => 'projects/{project}/locations/{location}/enrollments/{enrollment}',
+ 'googleApiSource' => 'projects/{project}/locations/{location}/googleApiSources/{google_api_source}',
'googleChannelConfig' => 'projects/{project}/locations/{location}/googleChannelConfig',
'location' => 'projects/{project}/locations/{location}',
+ 'messageBus' => 'projects/{project}/locations/{location}/messageBuses/{message_bus}',
+ 'networkAttachment' => 'projects/{project}/regions/{region}/networkAttachments/{networkattachment}',
+ 'pipeline' => 'projects/{project}/locations/{location}/pipelines/{pipeline}',
'provider' => 'projects/{project}/locations/{location}/providers/{provider}',
'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}',
+ 'topic' => 'projects/{project}/topics/{topic}',
'trigger' => 'projects/{project}/locations/{location}/triggers/{trigger}',
'workflow' => 'projects/{project}/locations/{location}/workflows/{workflow}',
],
diff --git a/Eventarc/src/V1/resources/eventarc_rest_client_config.php b/Eventarc/src/V1/resources/eventarc_rest_client_config.php
index 7a534674fed2..44f6aec3f1aa 100644
--- a/Eventarc/src/V1/resources/eventarc_rest_client_config.php
+++ b/Eventarc/src/V1/resources/eventarc_rest_client_config.php
@@ -36,7 +36,6 @@
],
'queryParams' => [
'channel_id',
- 'validate_only',
],
],
'CreateChannelConnection' => [
@@ -54,6 +53,66 @@
'channel_connection_id',
],
],
+ 'CreateEnrollment' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/enrollments',
+ 'body' => 'enrollment',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'enrollment_id',
+ ],
+ ],
+ 'CreateGoogleApiSource' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/googleApiSources',
+ 'body' => 'google_api_source',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'google_api_source_id',
+ ],
+ ],
+ 'CreateMessageBus' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/messageBuses',
+ 'body' => 'message_bus',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'message_bus_id',
+ ],
+ ],
+ 'CreatePipeline' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/pipelines',
+ 'body' => 'pipeline',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ 'queryParams' => [
+ 'pipeline_id',
+ ],
+ ],
'CreateTrigger' => [
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/triggers',
@@ -67,7 +126,6 @@
],
'queryParams' => [
'trigger_id',
- 'validate_only',
],
],
'DeleteChannel' => [
@@ -80,9 +138,6 @@
],
],
],
- 'queryParams' => [
- 'validate_only',
- ],
],
'DeleteChannelConnection' => [
'method' => 'delete',
@@ -95,6 +150,50 @@
],
],
],
+ 'DeleteEnrollment' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/enrollments/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteGoogleApiSource' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/googleApiSources/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeleteMessageBus' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/messageBuses/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'DeletePipeline' => [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelines/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'DeleteTrigger' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/locations/*/triggers/*}',
@@ -105,9 +204,6 @@
],
],
],
- 'queryParams' => [
- 'validate_only',
- ],
],
'GetChannel' => [
'method' => 'get',
@@ -131,6 +227,28 @@
],
],
],
+ 'GetEnrollment' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/enrollments/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetGoogleApiSource' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/googleApiSources/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetGoogleChannelConfig' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/googleChannelConfig}',
@@ -142,6 +260,28 @@
],
],
],
+ 'GetMessageBus' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/messageBuses/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'GetPipeline' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelines/*}',
+ 'placeholders' => [
+ 'name' => [
+ 'getters' => [
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'GetProvider' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/locations/*/providers/*}',
@@ -186,6 +326,61 @@
],
],
],
+ 'ListEnrollments' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/enrollments',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListGoogleApiSources' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/googleApiSources',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListMessageBusEnrollments' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListMessageBuses' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/messageBuses',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
+ 'ListPipelines' => [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/pipelines',
+ 'placeholders' => [
+ 'parent' => [
+ 'getters' => [
+ 'getParent',
+ ],
+ ],
+ ],
+ ],
'ListProviders' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/locations/*}/providers',
@@ -220,8 +415,31 @@
],
],
],
- 'queryParams' => [
- 'validate_only',
+ ],
+ 'UpdateEnrollment' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{enrollment.name=projects/*/locations/*/enrollments/*}',
+ 'body' => 'enrollment',
+ 'placeholders' => [
+ 'enrollment.name' => [
+ 'getters' => [
+ 'getEnrollment',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdateGoogleApiSource' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}',
+ 'body' => 'google_api_source',
+ 'placeholders' => [
+ 'google_api_source.name' => [
+ 'getters' => [
+ 'getGoogleApiSource',
+ 'getName',
+ ],
+ ],
],
],
'UpdateGoogleChannelConfig' => [
@@ -237,6 +455,32 @@
],
],
],
+ 'UpdateMessageBus' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{message_bus.name=projects/*/locations/*/messageBuses/*}',
+ 'body' => 'message_bus',
+ 'placeholders' => [
+ 'message_bus.name' => [
+ 'getters' => [
+ 'getMessageBus',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
+ 'UpdatePipeline' => [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{pipeline.name=projects/*/locations/*/pipelines/*}',
+ 'body' => 'pipeline',
+ 'placeholders' => [
+ 'pipeline.name' => [
+ 'getters' => [
+ 'getPipeline',
+ 'getName',
+ ],
+ ],
+ ],
+ ],
'UpdateTrigger' => [
'method' => 'patch',
'uriTemplate' => '/v1/{trigger.name=projects/*/locations/*/triggers/*}',
@@ -249,9 +493,6 @@
],
],
],
- 'queryParams' => [
- 'validate_only',
- ],
],
],
'google.cloud.location.Locations' => [
@@ -291,6 +532,22 @@
'method' => 'get',
'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:getIamPolicy',
],
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/messageBuses/*}:getIamPolicy',
+ ],
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/enrollments/*}:getIamPolicy',
+ ],
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/pipelines/*}:getIamPolicy',
+ ],
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/googleApiSources/*}:getIamPolicy',
+ ],
],
'placeholders' => [
'resource' => [
@@ -315,6 +572,26 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:setIamPolicy',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/messageBuses/*}:setIamPolicy',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/enrollments/*}:setIamPolicy',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/pipelines/*}:setIamPolicy',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/googleApiSources/*}:setIamPolicy',
+ 'body' => '*',
+ ],
],
'placeholders' => [
'resource' => [
@@ -339,6 +616,26 @@
'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:testIamPermissions',
'body' => '*',
],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/messageBuses/*}:testIamPermissions',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/enrollments/*}:testIamPermissions',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/pipelines/*}:testIamPermissions',
+ 'body' => '*',
+ ],
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/googleApiSources/*}:testIamPermissions',
+ 'body' => '*',
+ ],
],
'placeholders' => [
'resource' => [
diff --git a/Eventarc/tests/Unit/V1/Client/EventarcClientTest.php b/Eventarc/tests/Unit/V1/Client/EventarcClientTest.php
index 78e8f4bee9df..8e425091a8bd 100644
--- a/Eventarc/tests/Unit/V1/Client/EventarcClientTest.php
+++ b/Eventarc/tests/Unit/V1/Client/EventarcClientTest.php
@@ -31,29 +31,59 @@
use Google\Cloud\Eventarc\V1\Client\EventarcClient;
use Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\CreateChannelRequest;
+use Google\Cloud\Eventarc\V1\CreateEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\CreateGoogleApiSourceRequest;
+use Google\Cloud\Eventarc\V1\CreateMessageBusRequest;
+use Google\Cloud\Eventarc\V1\CreatePipelineRequest;
use Google\Cloud\Eventarc\V1\CreateTriggerRequest;
use Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\DeleteChannelRequest;
+use Google\Cloud\Eventarc\V1\DeleteEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\DeleteGoogleApiSourceRequest;
+use Google\Cloud\Eventarc\V1\DeleteMessageBusRequest;
+use Google\Cloud\Eventarc\V1\DeletePipelineRequest;
use Google\Cloud\Eventarc\V1\DeleteTriggerRequest;
use Google\Cloud\Eventarc\V1\Destination;
+use Google\Cloud\Eventarc\V1\Enrollment;
use Google\Cloud\Eventarc\V1\GetChannelConnectionRequest;
use Google\Cloud\Eventarc\V1\GetChannelRequest;
+use Google\Cloud\Eventarc\V1\GetEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\GetGoogleApiSourceRequest;
use Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest;
+use Google\Cloud\Eventarc\V1\GetMessageBusRequest;
+use Google\Cloud\Eventarc\V1\GetPipelineRequest;
use Google\Cloud\Eventarc\V1\GetProviderRequest;
use Google\Cloud\Eventarc\V1\GetTriggerRequest;
+use Google\Cloud\Eventarc\V1\GoogleApiSource;
use Google\Cloud\Eventarc\V1\GoogleChannelConfig;
use Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest;
use Google\Cloud\Eventarc\V1\ListChannelConnectionsResponse;
use Google\Cloud\Eventarc\V1\ListChannelsRequest;
use Google\Cloud\Eventarc\V1\ListChannelsResponse;
+use Google\Cloud\Eventarc\V1\ListEnrollmentsRequest;
+use Google\Cloud\Eventarc\V1\ListEnrollmentsResponse;
+use Google\Cloud\Eventarc\V1\ListGoogleApiSourcesRequest;
+use Google\Cloud\Eventarc\V1\ListGoogleApiSourcesResponse;
+use Google\Cloud\Eventarc\V1\ListMessageBusEnrollmentsRequest;
+use Google\Cloud\Eventarc\V1\ListMessageBusEnrollmentsResponse;
+use Google\Cloud\Eventarc\V1\ListMessageBusesRequest;
+use Google\Cloud\Eventarc\V1\ListMessageBusesResponse;
+use Google\Cloud\Eventarc\V1\ListPipelinesRequest;
+use Google\Cloud\Eventarc\V1\ListPipelinesResponse;
use Google\Cloud\Eventarc\V1\ListProvidersRequest;
use Google\Cloud\Eventarc\V1\ListProvidersResponse;
use Google\Cloud\Eventarc\V1\ListTriggersRequest;
use Google\Cloud\Eventarc\V1\ListTriggersResponse;
+use Google\Cloud\Eventarc\V1\MessageBus;
+use Google\Cloud\Eventarc\V1\Pipeline;
use Google\Cloud\Eventarc\V1\Provider;
use Google\Cloud\Eventarc\V1\Trigger;
use Google\Cloud\Eventarc\V1\UpdateChannelRequest;
+use Google\Cloud\Eventarc\V1\UpdateEnrollmentRequest;
+use Google\Cloud\Eventarc\V1\UpdateGoogleApiSourceRequest;
use Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest;
+use Google\Cloud\Eventarc\V1\UpdateMessageBusRequest;
+use Google\Cloud\Eventarc\V1\UpdatePipelineRequest;
use Google\Cloud\Eventarc\V1\UpdateTriggerRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
@@ -128,6 +158,7 @@ public function createChannelTest()
$pubsubTopic = 'pubsubTopic-338126829';
$activationToken = 'activationToken1250030992';
$cryptoKeyName = 'cryptoKeyName-184663511';
+ $satisfiesPzs = false;
$expectedResponse = new Channel();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -135,6 +166,7 @@ public function createChannelTest()
$expectedResponse->setPubsubTopic($pubsubTopic);
$expectedResponse->setActivationToken($activationToken);
$expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
@@ -148,12 +180,10 @@ public function createChannelTest()
$channelName = 'channelName273953326';
$channel->setName($channelName);
$channelId = 'channelId-1930808873';
- $validateOnly = false;
$request = (new CreateChannelRequest())
->setParent($formattedParent)
->setChannel($channel)
- ->setChannelId($channelId)
- ->setValidateOnly($validateOnly);
+ ->setChannelId($channelId);
$response = $gapicClient->createChannel($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -170,8 +200,6 @@ public function createChannelTest()
$this->assertProtobufEquals($channel, $actualValue);
$actualValue = $actualApiRequestObject->getChannelId();
$this->assertProtobufEquals($channelId, $actualValue);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
$expectedOperationsRequestObject->setName('operations/createChannelTest');
$response->pollUntilComplete([
@@ -231,12 +259,10 @@ public function createChannelExceptionTest()
$channelName = 'channelName273953326';
$channel->setName($channelName);
$channelId = 'channelId-1930808873';
- $validateOnly = false;
$request = (new CreateChannelRequest())
->setParent($formattedParent)
->setChannel($channel)
- ->setChannelId($channelId)
- ->setValidateOnly($validateOnly);
+ ->setChannelId($channelId);
$response = $gapicClient->createChannel($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -412,7 +438,7 @@ public function createChannelConnectionExceptionTest()
}
/** @test */
- public function createTriggerTest()
+ public function createEnrollmentTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -429,44 +455,46 @@ public function createTriggerTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createTriggerTest');
+ $incompleteOperation->setName('operations/createEnrollmentTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$name = 'name3373707';
$uid = 'uid115792';
- $serviceAccount = 'serviceAccount-1948028253';
- $channel = 'channel738950403';
$etag = 'etag3123477';
- $expectedResponse = new Trigger();
+ $displayName = 'displayName1615086568';
+ $celMatch = 'celMatch1270406544';
+ $messageBus = 'messageBus-872787384';
+ $destination = 'destination-1429847026';
+ $expectedResponse = new Enrollment();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setChannel($channel);
$expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCelMatch($celMatch);
+ $expectedResponse->setMessageBus($messageBus);
+ $expectedResponse->setDestination($destination);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/createTriggerTest');
+ $completeOperation->setName('operations/createEnrollmentTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $trigger = new Trigger();
- $triggerName = 'triggerName-681138077';
- $trigger->setName($triggerName);
- $triggerEventFilters = [];
- $trigger->setEventFilters($triggerEventFilters);
- $triggerDestination = new Destination();
- $trigger->setDestination($triggerDestination);
- $triggerId = 'triggerId1363517698';
- $validateOnly = false;
- $request = (new CreateTriggerRequest())
+ $enrollment = new Enrollment();
+ $enrollmentCelMatch = 'enrollmentCelMatch2137295551';
+ $enrollment->setCelMatch($enrollmentCelMatch);
+ $enrollmentMessageBus = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $enrollment->setMessageBus($enrollmentMessageBus);
+ $enrollmentDestination = 'enrollmentDestination-400605590';
+ $enrollment->setDestination($enrollmentDestination);
+ $enrollmentId = 'enrollmentId976814134';
+ $request = (new CreateEnrollmentRequest())
->setParent($formattedParent)
- ->setTrigger($trigger)
- ->setTriggerId($triggerId)
- ->setValidateOnly($validateOnly);
- $response = $gapicClient->createTrigger($request);
+ ->setEnrollment($enrollment)
+ ->setEnrollmentId($enrollmentId);
+ $response = $gapicClient->createEnrollment($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -475,17 +503,15 @@ public function createTriggerTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', $actualApiFuncCall);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateEnrollment', $actualApiFuncCall);
$actualValue = $actualApiRequestObject->getParent();
$this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getTrigger();
- $this->assertProtobufEquals($trigger, $actualValue);
- $actualValue = $actualApiRequestObject->getTriggerId();
- $this->assertProtobufEquals($triggerId, $actualValue);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
+ $actualValue = $actualApiRequestObject->getEnrollment();
+ $this->assertProtobufEquals($enrollment, $actualValue);
+ $actualValue = $actualApiRequestObject->getEnrollmentId();
+ $this->assertProtobufEquals($enrollmentId, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createTriggerTest');
+ $expectedOperationsRequestObject->setName('operations/createEnrollmentTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -504,7 +530,7 @@ public function createTriggerTest()
}
/** @test */
- public function createTriggerExceptionTest()
+ public function createEnrollmentExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -521,7 +547,7 @@ public function createTriggerExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createTriggerTest');
+ $incompleteOperation->setName('operations/createEnrollmentTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -539,25 +565,23 @@ public function createTriggerExceptionTest()
$operationsTransport->addResponse(null, $status);
// Mock request
$formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $trigger = new Trigger();
- $triggerName = 'triggerName-681138077';
- $trigger->setName($triggerName);
- $triggerEventFilters = [];
- $trigger->setEventFilters($triggerEventFilters);
- $triggerDestination = new Destination();
- $trigger->setDestination($triggerDestination);
- $triggerId = 'triggerId1363517698';
- $validateOnly = false;
- $request = (new CreateTriggerRequest())
+ $enrollment = new Enrollment();
+ $enrollmentCelMatch = 'enrollmentCelMatch2137295551';
+ $enrollment->setCelMatch($enrollmentCelMatch);
+ $enrollmentMessageBus = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $enrollment->setMessageBus($enrollmentMessageBus);
+ $enrollmentDestination = 'enrollmentDestination-400605590';
+ $enrollment->setDestination($enrollmentDestination);
+ $enrollmentId = 'enrollmentId976814134';
+ $request = (new CreateEnrollmentRequest())
->setParent($formattedParent)
- ->setTrigger($trigger)
- ->setTriggerId($triggerId)
- ->setValidateOnly($validateOnly);
- $response = $gapicClient->createTrigger($request);
+ ->setEnrollment($enrollment)
+ ->setEnrollmentId($enrollmentId);
+ $response = $gapicClient->createEnrollment($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createTriggerTest');
+ $expectedOperationsRequestObject->setName('operations/createEnrollmentTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -576,7 +600,7 @@ public function createTriggerExceptionTest()
}
/** @test */
- public function deleteChannelTest()
+ public function createGoogleApiSourceTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -593,34 +617,40 @@ public function deleteChannelTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteChannelTest');
+ $incompleteOperation->setName('operations/createGoogleApiSourceTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
+ $name = 'name3373707';
$uid = 'uid115792';
- $provider = 'provider-987494927';
- $pubsubTopic = 'pubsubTopic-338126829';
- $activationToken = 'activationToken1250030992';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $destination = 'destination-1429847026';
$cryptoKeyName = 'cryptoKeyName-184663511';
- $expectedResponse = new Channel();
- $expectedResponse->setName($name2);
+ $expectedResponse = new GoogleApiSource();
+ $expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setProvider($provider);
- $expectedResponse->setPubsubTopic($pubsubTopic);
- $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDestination($destination);
$expectedResponse->setCryptoKeyName($cryptoKeyName);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/deleteChannelTest');
+ $completeOperation->setName('operations/createGoogleApiSourceTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
- $validateOnly = false;
- $request = (new DeleteChannelRequest())->setName($formattedName)->setValidateOnly($validateOnly);
- $response = $gapicClient->deleteChannel($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $googleApiSource = new GoogleApiSource();
+ $googleApiSourceDestination = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $googleApiSource->setDestination($googleApiSourceDestination);
+ $googleApiSourceId = 'googleApiSourceId-1909472172';
+ $request = (new CreateGoogleApiSourceRequest())
+ ->setParent($formattedParent)
+ ->setGoogleApiSource($googleApiSource)
+ ->setGoogleApiSourceId($googleApiSourceId);
+ $response = $gapicClient->createGoogleApiSource($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -629,13 +659,15 @@ public function deleteChannelTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateGoogleApiSource', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getGoogleApiSource();
+ $this->assertProtobufEquals($googleApiSource, $actualValue);
+ $actualValue = $actualApiRequestObject->getGoogleApiSourceId();
+ $this->assertProtobufEquals($googleApiSourceId, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteChannelTest');
+ $expectedOperationsRequestObject->setName('operations/createGoogleApiSourceTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -654,7 +686,7 @@ public function deleteChannelTest()
}
/** @test */
- public function deleteChannelExceptionTest()
+ public function createGoogleApiSourceExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -671,7 +703,7 @@ public function deleteChannelExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteChannelTest');
+ $incompleteOperation->setName('operations/createGoogleApiSourceTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -688,14 +720,20 @@ public function deleteChannelExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
- $validateOnly = false;
- $request = (new DeleteChannelRequest())->setName($formattedName)->setValidateOnly($validateOnly);
- $response = $gapicClient->deleteChannel($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $googleApiSource = new GoogleApiSource();
+ $googleApiSourceDestination = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $googleApiSource->setDestination($googleApiSourceDestination);
+ $googleApiSourceId = 'googleApiSourceId-1909472172';
+ $request = (new CreateGoogleApiSourceRequest())
+ ->setParent($formattedParent)
+ ->setGoogleApiSource($googleApiSource)
+ ->setGoogleApiSourceId($googleApiSourceId);
+ $response = $gapicClient->createGoogleApiSource($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteChannelTest');
+ $expectedOperationsRequestObject->setName('operations/createGoogleApiSourceTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -714,7 +752,7 @@ public function deleteChannelExceptionTest()
}
/** @test */
- public function deleteChannelConnectionTest()
+ public function createMessageBusTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -731,29 +769,36 @@ public function deleteChannelConnectionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteChannelConnectionTest');
+ $incompleteOperation->setName('operations/createMessageBusTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
+ $name = 'name3373707';
$uid = 'uid115792';
- $channel = 'channel738950403';
- $activationToken = 'activationToken1250030992';
- $expectedResponse = new ChannelConnection();
- $expectedResponse->setName($name2);
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new MessageBus();
+ $expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setChannel($channel);
- $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/deleteChannelConnectionTest');
+ $completeOperation->setName('operations/createMessageBusTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
- $request = (new DeleteChannelConnectionRequest())->setName($formattedName);
- $response = $gapicClient->deleteChannelConnection($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $messageBus = new MessageBus();
+ $messageBusId = 'messageBusId523147890';
+ $request = (new CreateMessageBusRequest())
+ ->setParent($formattedParent)
+ ->setMessageBus($messageBus)
+ ->setMessageBusId($messageBusId);
+ $response = $gapicClient->createMessageBus($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -762,11 +807,15 @@ public function deleteChannelConnectionTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateMessageBus', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getMessageBus();
+ $this->assertProtobufEquals($messageBus, $actualValue);
+ $actualValue = $actualApiRequestObject->getMessageBusId();
+ $this->assertProtobufEquals($messageBusId, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest');
+ $expectedOperationsRequestObject->setName('operations/createMessageBusTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -785,7 +834,7 @@ public function deleteChannelConnectionTest()
}
/** @test */
- public function deleteChannelConnectionExceptionTest()
+ public function createMessageBusExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -802,7 +851,7 @@ public function deleteChannelConnectionExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteChannelConnectionTest');
+ $incompleteOperation->setName('operations/createMessageBusTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -819,13 +868,18 @@ public function deleteChannelConnectionExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
- $request = (new DeleteChannelConnectionRequest())->setName($formattedName);
- $response = $gapicClient->deleteChannelConnection($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $messageBus = new MessageBus();
+ $messageBusId = 'messageBusId523147890';
+ $request = (new CreateMessageBusRequest())
+ ->setParent($formattedParent)
+ ->setMessageBus($messageBus)
+ ->setMessageBusId($messageBusId);
+ $response = $gapicClient->createMessageBus($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest');
+ $expectedOperationsRequestObject->setName('operations/createMessageBusTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -844,7 +898,7 @@ public function deleteChannelConnectionExceptionTest()
}
/** @test */
- public function deleteTriggerTest()
+ public function createPipelineTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -861,32 +915,38 @@ public function deleteTriggerTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteTriggerTest');
+ $incompleteOperation->setName('operations/createPipelineTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
+ $name = 'name3373707';
$uid = 'uid115792';
- $serviceAccount = 'serviceAccount-1948028253';
- $channel = 'channel738950403';
- $etag2 = 'etag2-1293302904';
- $expectedResponse = new Trigger();
- $expectedResponse->setName($name2);
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $etag = 'etag3123477';
+ $expectedResponse = new Pipeline();
+ $expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setChannel($channel);
- $expectedResponse->setEtag($etag2);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setEtag($etag);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/deleteTriggerTest');
+ $completeOperation->setName('operations/createPipelineTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
- $validateOnly = false;
- $request = (new DeleteTriggerRequest())->setName($formattedName)->setValidateOnly($validateOnly);
- $response = $gapicClient->deleteTrigger($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $pipeline = new Pipeline();
+ $pipelineDestinations = [];
+ $pipeline->setDestinations($pipelineDestinations);
+ $pipelineId = 'pipelineId981478360';
+ $request = (new CreatePipelineRequest())
+ ->setParent($formattedParent)
+ ->setPipeline($pipeline)
+ ->setPipelineId($pipelineId);
+ $response = $gapicClient->createPipeline($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -895,13 +955,15 @@ public function deleteTriggerTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreatePipeline', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getPipeline();
+ $this->assertProtobufEquals($pipeline, $actualValue);
+ $actualValue = $actualApiRequestObject->getPipelineId();
+ $this->assertProtobufEquals($pipelineId, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteTriggerTest');
+ $expectedOperationsRequestObject->setName('operations/createPipelineTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -920,7 +982,7 @@ public function deleteTriggerTest()
}
/** @test */
- public function deleteTriggerExceptionTest()
+ public function createPipelineExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -937,7 +999,7 @@ public function deleteTriggerExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteTriggerTest');
+ $incompleteOperation->setName('operations/createPipelineTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -954,14 +1016,20 @@ public function deleteTriggerExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
- $validateOnly = false;
- $request = (new DeleteTriggerRequest())->setName($formattedName)->setValidateOnly($validateOnly);
- $response = $gapicClient->deleteTrigger($request);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $pipeline = new Pipeline();
+ $pipelineDestinations = [];
+ $pipeline->setDestinations($pipelineDestinations);
+ $pipelineId = 'pipelineId981478360';
+ $request = (new CreatePipelineRequest())
+ ->setParent($formattedParent)
+ ->setPipeline($pipeline)
+ ->setPipelineId($pipelineId);
+ $response = $gapicClient->createPipeline($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteTriggerTest');
+ $expectedOperationsRequestObject->setName('operations/createPipelineTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -980,45 +1048,1938 @@ public function deleteTriggerExceptionTest()
}
/** @test */
- public function getChannelTest()
+ public function createTriggerTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createTriggerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
$uid = 'uid115792';
- $provider = 'provider-987494927';
- $pubsubTopic = 'pubsubTopic-338126829';
- $activationToken = 'activationToken1250030992';
- $cryptoKeyName = 'cryptoKeyName-184663511';
- $expectedResponse = new Channel();
- $expectedResponse->setName($name2);
+ $serviceAccount = 'serviceAccount-1948028253';
+ $channel = 'channel738950403';
+ $eventDataContentType = 'eventDataContentType-440836272';
+ $satisfiesPzs = false;
+ $etag = 'etag3123477';
+ $expectedResponse = new Trigger();
+ $expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setProvider($provider);
- $expectedResponse->setPubsubTopic($pubsubTopic);
- $expectedResponse->setActivationToken($activationToken);
- $expectedResponse->setCryptoKeyName($cryptoKeyName);
- $transport->addResponse($expectedResponse);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setChannel($channel);
+ $expectedResponse->setEventDataContentType($eventDataContentType);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $expectedResponse->setEtag($etag);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/createTriggerTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
- $request = (new GetChannelRequest())->setName($formattedName);
- $response = $gapicClient->getChannel($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.eventarc.v1.Eventarc/GetChannel', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $trigger = new Trigger();
+ $triggerName = 'triggerName-681138077';
+ $trigger->setName($triggerName);
+ $triggerEventFilters = [];
+ $trigger->setEventFilters($triggerEventFilters);
+ $triggerDestination = new Destination();
+ $trigger->setDestination($triggerDestination);
+ $triggerId = 'triggerId1363517698';
+ $request = (new CreateTriggerRequest())
+ ->setParent($formattedParent)
+ ->setTrigger($trigger)
+ ->setTriggerId($triggerId);
+ $response = $gapicClient->createTrigger($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $actualValue = $actualApiRequestObject->getTrigger();
+ $this->assertProtobufEquals($trigger, $actualValue);
+ $actualValue = $actualApiRequestObject->getTriggerId();
+ $this->assertProtobufEquals($triggerId, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createTriggerTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function getChannelExceptionTest()
+ public function createTriggerExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/createTriggerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $trigger = new Trigger();
+ $triggerName = 'triggerName-681138077';
+ $trigger->setName($triggerName);
+ $triggerEventFilters = [];
+ $trigger->setEventFilters($triggerEventFilters);
+ $triggerDestination = new Destination();
+ $trigger->setDestination($triggerDestination);
+ $triggerId = 'triggerId1363517698';
+ $request = (new CreateTriggerRequest())
+ ->setParent($formattedParent)
+ ->setTrigger($trigger)
+ ->setTriggerId($triggerId);
+ $response = $gapicClient->createTrigger($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/createTriggerTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteChannelTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteChannelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $provider = 'provider-987494927';
+ $pubsubTopic = 'pubsubTopic-338126829';
+ $activationToken = 'activationToken1250030992';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $satisfiesPzs = false;
+ $expectedResponse = new Channel();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setProvider($provider);
+ $expectedResponse->setPubsubTopic($pubsubTopic);
+ $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteChannelTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
+ $request = (new DeleteChannelRequest())->setName($formattedName);
+ $response = $gapicClient->deleteChannel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteChannelTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteChannelExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteChannelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
+ $request = (new DeleteChannelRequest())->setName($formattedName);
+ $response = $gapicClient->deleteChannel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteChannelTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteChannelConnectionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteChannelConnectionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $channel = 'channel738950403';
+ $activationToken = 'activationToken1250030992';
+ $expectedResponse = new ChannelConnection();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setChannel($channel);
+ $expectedResponse->setActivationToken($activationToken);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteChannelConnectionTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
+ $request = (new DeleteChannelConnectionRequest())->setName($formattedName);
+ $response = $gapicClient->deleteChannelConnection($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteChannelConnectionExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteChannelConnectionTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
+ $request = (new DeleteChannelConnectionRequest())->setName($formattedName);
+ $response = $gapicClient->deleteChannelConnection($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteEnrollmentTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteEnrollmentTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag2 = 'etag2-1293302904';
+ $displayName = 'displayName1615086568';
+ $celMatch = 'celMatch1270406544';
+ $messageBus = 'messageBus-872787384';
+ $destination = 'destination-1429847026';
+ $expectedResponse = new Enrollment();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag2);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCelMatch($celMatch);
+ $expectedResponse->setMessageBus($messageBus);
+ $expectedResponse->setDestination($destination);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteEnrollmentTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+ $request = (new DeleteEnrollmentRequest())->setName($formattedName);
+ $response = $gapicClient->deleteEnrollment($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteEnrollment', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteEnrollmentTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteEnrollmentExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteEnrollmentTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+ $request = (new DeleteEnrollmentRequest())->setName($formattedName);
+ $response = $gapicClient->deleteEnrollment($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteEnrollmentTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteGoogleApiSourceTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteGoogleApiSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag2 = 'etag2-1293302904';
+ $displayName = 'displayName1615086568';
+ $destination = 'destination-1429847026';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new GoogleApiSource();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag2);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDestination($destination);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteGoogleApiSourceTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->googleApiSourceName('[PROJECT]', '[LOCATION]', '[GOOGLE_API_SOURCE]');
+ $request = (new DeleteGoogleApiSourceRequest())->setName($formattedName);
+ $response = $gapicClient->deleteGoogleApiSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteGoogleApiSource', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteGoogleApiSourceTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteGoogleApiSourceExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteGoogleApiSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->googleApiSourceName('[PROJECT]', '[LOCATION]', '[GOOGLE_API_SOURCE]');
+ $request = (new DeleteGoogleApiSourceRequest())->setName($formattedName);
+ $response = $gapicClient->deleteGoogleApiSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteGoogleApiSourceTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteMessageBusTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteMessageBusTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag2 = 'etag2-1293302904';
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new MessageBus();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag2);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteMessageBusTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new DeleteMessageBusRequest())->setName($formattedName);
+ $response = $gapicClient->deleteMessageBus($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteMessageBus', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteMessageBusTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteMessageBusExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteMessageBusTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new DeleteMessageBusRequest())->setName($formattedName);
+ $response = $gapicClient->deleteMessageBus($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteMessageBusTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deletePipelineTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deletePipelineTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $etag2 = 'etag2-1293302904';
+ $expectedResponse = new Pipeline();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setEtag($etag2);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deletePipelineTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+ $request = (new DeletePipelineRequest())->setName($formattedName);
+ $response = $gapicClient->deletePipeline($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeletePipeline', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deletePipelineTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deletePipelineExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deletePipelineTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+ $request = (new DeletePipelineRequest())->setName($formattedName);
+ $response = $gapicClient->deletePipeline($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deletePipelineTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteTriggerTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteTriggerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $serviceAccount = 'serviceAccount-1948028253';
+ $channel = 'channel738950403';
+ $eventDataContentType = 'eventDataContentType-440836272';
+ $satisfiesPzs = false;
+ $etag2 = 'etag2-1293302904';
+ $expectedResponse = new Trigger();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setChannel($channel);
+ $expectedResponse->setEventDataContentType($eventDataContentType);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $expectedResponse->setEtag($etag2);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/deleteTriggerTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ // Mock request
+ $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
+ $request = (new DeleteTriggerRequest())->setName($formattedName);
+ $response = $gapicClient->deleteTrigger($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteTriggerTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function deleteTriggerExceptionTest()
+ {
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ 'operationsClient' => $operationsClient,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/deleteTriggerTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $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
+ );
+ $operationsTransport->addResponse(null, $status);
+ // Mock request
+ $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
+ $request = (new DeleteTriggerRequest())->setName($formattedName);
+ $response = $gapicClient->deleteTrigger($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/deleteTriggerTest');
+ try {
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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 stubs are exhausted
+ $transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ }
+
+ /** @test */
+ public function getChannelTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $provider = 'provider-987494927';
+ $pubsubTopic = 'pubsubTopic-338126829';
+ $activationToken = 'activationToken1250030992';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $satisfiesPzs = false;
+ $expectedResponse = new Channel();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setProvider($provider);
+ $expectedResponse->setPubsubTopic($pubsubTopic);
+ $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
+ $request = (new GetChannelRequest())->setName($formattedName);
+ $response = $gapicClient->getChannel($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.eventarc.v1.Eventarc/GetChannel', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getChannelExceptionTest()
+ {
+ $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
+ $request = (new GetChannelRequest())->setName($formattedName);
+ try {
+ $gapicClient->getChannel($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 getChannelConnectionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $channel = 'channel738950403';
+ $activationToken = 'activationToken1250030992';
+ $expectedResponse = new ChannelConnection();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setChannel($channel);
+ $expectedResponse->setActivationToken($activationToken);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
+ $request = (new GetChannelConnectionRequest())->setName($formattedName);
+ $response = $gapicClient->getChannelConnection($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.eventarc.v1.Eventarc/GetChannelConnection', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getChannelConnectionExceptionTest()
+ {
+ $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->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
+ $request = (new GetChannelConnectionRequest())->setName($formattedName);
+ try {
+ $gapicClient->getChannelConnection($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 getEnrollmentTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $celMatch = 'celMatch1270406544';
+ $messageBus = 'messageBus-872787384';
+ $destination = 'destination-1429847026';
+ $expectedResponse = new Enrollment();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCelMatch($celMatch);
+ $expectedResponse->setMessageBus($messageBus);
+ $expectedResponse->setDestination($destination);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+ $request = (new GetEnrollmentRequest())->setName($formattedName);
+ $response = $gapicClient->getEnrollment($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.eventarc.v1.Eventarc/GetEnrollment', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getEnrollmentExceptionTest()
+ {
+ $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->enrollmentName('[PROJECT]', '[LOCATION]', '[ENROLLMENT]');
+ $request = (new GetEnrollmentRequest())->setName($formattedName);
+ try {
+ $gapicClient->getEnrollment($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 getGoogleApiSourceTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $destination = 'destination-1429847026';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new GoogleApiSource();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDestination($destination);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->googleApiSourceName('[PROJECT]', '[LOCATION]', '[GOOGLE_API_SOURCE]');
+ $request = (new GetGoogleApiSourceRequest())->setName($formattedName);
+ $response = $gapicClient->getGoogleApiSource($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.eventarc.v1.Eventarc/GetGoogleApiSource', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getGoogleApiSourceExceptionTest()
+ {
+ $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->googleApiSourceName('[PROJECT]', '[LOCATION]', '[GOOGLE_API_SOURCE]');
+ $request = (new GetGoogleApiSourceRequest())->setName($formattedName);
+ try {
+ $gapicClient->getGoogleApiSource($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 getGoogleChannelConfigTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new GoogleChannelConfig();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]');
+ $request = (new GetGoogleChannelConfigRequest())->setName($formattedName);
+ $response = $gapicClient->getGoogleChannelConfig($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.eventarc.v1.Eventarc/GetGoogleChannelConfig', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getGoogleChannelConfigExceptionTest()
+ {
+ $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->googleChannelConfigName('[PROJECT]', '[LOCATION]');
+ $request = (new GetGoogleChannelConfigRequest())->setName($formattedName);
+ try {
+ $gapicClient->getGoogleChannelConfig($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 getMessageBusTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new MessageBus();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new GetMessageBusRequest())->setName($formattedName);
+ $response = $gapicClient->getMessageBus($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.eventarc.v1.Eventarc/GetMessageBus', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getMessageBusExceptionTest()
+ {
+ $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->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new GetMessageBusRequest())->setName($formattedName);
+ try {
+ $gapicClient->getMessageBus($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 getPipelineTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $displayName = 'displayName1615086568';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $etag = 'etag3123477';
+ $expectedResponse = new Pipeline();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setEtag($etag);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+ $request = (new GetPipelineRequest())->setName($formattedName);
+ $response = $gapicClient->getPipeline($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.eventarc.v1.Eventarc/GetPipeline', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getPipelineExceptionTest()
+ {
+ $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->pipelineName('[PROJECT]', '[LOCATION]', '[PIPELINE]');
+ $request = (new GetPipelineRequest())->setName($formattedName);
+ try {
+ $gapicClient->getPipeline($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 getProviderTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $displayName = 'displayName1615086568';
+ $expectedResponse = new Provider();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setDisplayName($displayName);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]');
+ $request = (new GetProviderRequest())->setName($formattedName);
+ $response = $gapicClient->getProvider($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.eventarc.v1.Eventarc/GetProvider', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getProviderExceptionTest()
+ {
+ $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->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]');
+ $request = (new GetProviderRequest())->setName($formattedName);
+ try {
+ $gapicClient->getProvider($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 getTriggerTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $name2 = 'name2-1052831874';
+ $uid = 'uid115792';
+ $serviceAccount = 'serviceAccount-1948028253';
+ $channel = 'channel738950403';
+ $eventDataContentType = 'eventDataContentType-440836272';
+ $satisfiesPzs = false;
+ $etag = 'etag3123477';
+ $expectedResponse = new Trigger();
+ $expectedResponse->setName($name2);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setServiceAccount($serviceAccount);
+ $expectedResponse->setChannel($channel);
+ $expectedResponse->setEventDataContentType($eventDataContentType);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $expectedResponse->setEtag($etag);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
+ $request = (new GetTriggerRequest())->setName($formattedName);
+ $response = $gapicClient->getTrigger($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.eventarc.v1.Eventarc/GetTrigger', $actualFuncCall);
+ $actualValue = $actualRequestObject->getName();
+ $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function getTriggerExceptionTest()
+ {
+ $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->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
+ $request = (new GetTriggerRequest())->setName($formattedName);
+ try {
+ $gapicClient->getTrigger($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 listChannelConnectionsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $channelConnectionsElement = new ChannelConnection();
+ $channelConnections = [$channelConnectionsElement];
+ $expectedResponse = new ListChannelConnectionsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setChannelConnections($channelConnections);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListChannelConnectionsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listChannelConnections($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getChannelConnections()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listChannelConnectionsExceptionTest()
+ {
+ $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 ListChannelConnectionsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listChannelConnections($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 listChannelsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $channelsElement = new Channel();
+ $channels = [$channelsElement];
+ $expectedResponse = new ListChannelsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setChannels($channels);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListChannelsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listChannels($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannels', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listChannelsExceptionTest()
+ {
+ $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 ListChannelsRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listChannels($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 listEnrollmentsTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $enrollmentsElement = new Enrollment();
+ $enrollments = [$enrollmentsElement];
+ $expectedResponse = new ListEnrollmentsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setEnrollments($enrollments);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListEnrollmentsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listEnrollments($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getEnrollments()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListEnrollments', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listEnrollmentsExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1039,10 +3000,10 @@ public function getChannelExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
- $request = (new GetChannelRequest())->setName($formattedName);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListEnrollmentsRequest())->setParent($formattedParent);
try {
- $gapicClient->getChannel($request);
+ $gapicClient->listEnrollments($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) {
@@ -1055,7 +3016,7 @@ public function getChannelExceptionTest()
}
/** @test */
- public function getChannelConnectionTest()
+ public function listGoogleApiSourcesTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1063,33 +3024,33 @@ public function getChannelConnectionTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $channel = 'channel738950403';
- $activationToken = 'activationToken1250030992';
- $expectedResponse = new ChannelConnection();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setChannel($channel);
- $expectedResponse->setActivationToken($activationToken);
+ $nextPageToken = '';
+ $googleApiSourcesElement = new GoogleApiSource();
+ $googleApiSources = [$googleApiSourcesElement];
+ $expectedResponse = new ListGoogleApiSourcesResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setGoogleApiSources($googleApiSources);
$transport->addResponse($expectedResponse);
// Mock request
- $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
- $request = (new GetChannelConnectionRequest())->setName($formattedName);
- $response = $gapicClient->getChannelConnection($request);
- $this->assertEquals($expectedResponse, $response);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListGoogleApiSourcesRequest())->setParent($formattedParent);
+ $response = $gapicClient->listGoogleApiSources($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getGoogleApiSources()[0], $resources[0]);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetChannelConnection', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListGoogleApiSources', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
$this->assertTrue($transport->isExhausted());
}
/** @test */
- public function getChannelConnectionExceptionTest()
+ public function listGoogleApiSourcesExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1110,10 +3071,10 @@ public function getChannelConnectionExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]');
- $request = (new GetChannelConnectionRequest())->setName($formattedName);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListGoogleApiSourcesRequest())->setParent($formattedParent);
try {
- $gapicClient->getChannelConnection($request);
+ $gapicClient->listGoogleApiSources($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) {
@@ -1126,7 +3087,7 @@ public function getChannelConnectionExceptionTest()
}
/** @test */
- public function getGoogleChannelConfigTest()
+ public function listMessageBusEnrollmentsTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1134,29 +3095,33 @@ public function getGoogleChannelConfigTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
- $cryptoKeyName = 'cryptoKeyName-184663511';
- $expectedResponse = new GoogleChannelConfig();
- $expectedResponse->setName($name2);
- $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $nextPageToken = '';
+ $enrollmentsElement = 'enrollmentsElement-1920310100';
+ $enrollments = [$enrollmentsElement];
+ $expectedResponse = new ListMessageBusEnrollmentsResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setEnrollments($enrollments);
$transport->addResponse($expectedResponse);
// Mock request
- $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]');
- $request = (new GetGoogleChannelConfigRequest())->setName($formattedName);
- $response = $gapicClient->getGoogleChannelConfig($request);
- $this->assertEquals($expectedResponse, $response);
+ $formattedParent = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new ListMessageBusEnrollmentsRequest())->setParent($formattedParent);
+ $response = $gapicClient->listMessageBusEnrollments($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getEnrollments()[0], $resources[0]);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListMessageBusEnrollments', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
$this->assertTrue($transport->isExhausted());
}
/** @test */
- public function getGoogleChannelConfigExceptionTest()
+ public function listMessageBusEnrollmentsExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1177,10 +3142,10 @@ public function getGoogleChannelConfigExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]');
- $request = (new GetGoogleChannelConfigRequest())->setName($formattedName);
+ $formattedParent = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $request = (new ListMessageBusEnrollmentsRequest())->setParent($formattedParent);
try {
- $gapicClient->getGoogleChannelConfig($request);
+ $gapicClient->listMessageBusEnrollments($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) {
@@ -1193,7 +3158,7 @@ public function getGoogleChannelConfigExceptionTest()
}
/** @test */
- public function getProviderTest()
+ public function listMessageBusesTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1201,29 +3166,33 @@ public function getProviderTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Provider();
- $expectedResponse->setName($name2);
- $expectedResponse->setDisplayName($displayName);
+ $nextPageToken = '';
+ $messageBusesElement = new MessageBus();
+ $messageBuses = [$messageBusesElement];
+ $expectedResponse = new ListMessageBusesResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setMessageBuses($messageBuses);
$transport->addResponse($expectedResponse);
// Mock request
- $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]');
- $request = (new GetProviderRequest())->setName($formattedName);
- $response = $gapicClient->getProvider($request);
- $this->assertEquals($expectedResponse, $response);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListMessageBusesRequest())->setParent($formattedParent);
+ $response = $gapicClient->listMessageBuses($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getMessageBuses()[0], $resources[0]);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetProvider', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListMessageBuses', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
$this->assertTrue($transport->isExhausted());
}
/** @test */
- public function getProviderExceptionTest()
+ public function listMessageBusesExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1244,10 +3213,10 @@ public function getProviderExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]');
- $request = (new GetProviderRequest())->setName($formattedName);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListMessageBusesRequest())->setParent($formattedParent);
try {
- $gapicClient->getProvider($request);
+ $gapicClient->listMessageBuses($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) {
@@ -1260,7 +3229,7 @@ public function getProviderExceptionTest()
}
/** @test */
- public function getTriggerTest()
+ public function listPipelinesTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1268,35 +3237,175 @@ public function getTriggerTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $serviceAccount = 'serviceAccount-1948028253';
- $channel = 'channel738950403';
- $etag = 'etag3123477';
- $expectedResponse = new Trigger();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setServiceAccount($serviceAccount);
- $expectedResponse->setChannel($channel);
- $expectedResponse->setEtag($etag);
+ $nextPageToken = '';
+ $pipelinesElement = new Pipeline();
+ $pipelines = [$pipelinesElement];
+ $expectedResponse = new ListPipelinesResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setPipelines($pipelines);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListPipelinesRequest())->setParent($formattedParent);
+ $response = $gapicClient->listPipelines($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getPipelines()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListPipelines', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listPipelinesExceptionTest()
+ {
+ $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 ListPipelinesRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listPipelines($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 listProvidersTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $providersElement = new Provider();
+ $providers = [$providersElement];
+ $expectedResponse = new ListProvidersResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setProviders($providers);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListProvidersRequest())->setParent($formattedParent);
+ $response = $gapicClient->listProviders($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getProviders()[0], $resources[0]);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListProviders', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function listProvidersExceptionTest()
+ {
+ $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 ListProvidersRequest())->setParent($formattedParent);
+ try {
+ $gapicClient->listProviders($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 listTriggersTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $nextPageToken = '';
+ $triggersElement = new Trigger();
+ $triggers = [$triggersElement];
+ $expectedResponse = new ListTriggersResponse();
+ $expectedResponse->setNextPageToken($nextPageToken);
+ $expectedResponse->setTriggers($triggers);
$transport->addResponse($expectedResponse);
// Mock request
- $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
- $request = (new GetTriggerRequest())->setName($formattedName);
- $response = $gapicClient->getTrigger($request);
- $this->assertEquals($expectedResponse, $response);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListTriggersRequest())->setParent($formattedParent);
+ $response = $gapicClient->listTriggers($request);
+ $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
+ $resources = iterator_to_array($response->iterateAllElements());
+ $this->assertSame(1, count($resources));
+ $this->assertEquals($expectedResponse->getTriggers()[0], $resources[0]);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetTrigger', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListTriggers', $actualFuncCall);
+ $actualValue = $actualRequestObject->getParent();
+ $this->assertProtobufEquals($formattedParent, $actualValue);
$this->assertTrue($transport->isExhausted());
}
/** @test */
- public function getTriggerExceptionTest()
+ public function listTriggersExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1317,10 +3426,10 @@ public function getTriggerExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]');
- $request = (new GetTriggerRequest())->setName($formattedName);
+ $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
+ $request = (new ListTriggersRequest())->setParent($formattedParent);
try {
- $gapicClient->getTrigger($request);
+ $gapicClient->listTriggers($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) {
@@ -1333,47 +3442,99 @@ public function getTriggerExceptionTest()
}
/** @test */
- public function listChannelConnectionsTest()
+ public function updateChannelTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $nextPageToken = '';
- $channelConnectionsElement = new ChannelConnection();
- $channelConnections = [$channelConnectionsElement];
- $expectedResponse = new ListChannelConnectionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setChannelConnections($channelConnections);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListChannelConnectionsRequest())->setParent($formattedParent);
- $response = $gapicClient->listChannelConnections($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getChannelConnections()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateChannelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $uid = 'uid115792';
+ $provider = 'provider-987494927';
+ $pubsubTopic = 'pubsubTopic-338126829';
+ $activationToken = 'activationToken1250030992';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $satisfiesPzs = false;
+ $expectedResponse = new Channel();
+ $expectedResponse->setName($name);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setProvider($provider);
+ $expectedResponse->setPubsubTopic($pubsubTopic);
+ $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updateChannelTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
+ $request = new UpdateChannelRequest();
+ $response = $gapicClient->updateChannel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', $actualApiFuncCall);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateChannelTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listChannelConnectionsExceptionTest()
+ public function updateChannelExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateChannelTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -1386,65 +3547,134 @@ public function listChannelConnectionsExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListChannelConnectionsRequest())->setParent($formattedParent);
+ $operationsTransport->addResponse(null, $status);
+ $request = new UpdateChannelRequest();
+ $response = $gapicClient->updateChannel($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateChannelTest');
try {
- $gapicClient->listChannelConnections($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listChannelsTest()
+ public function updateEnrollmentTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $nextPageToken = '';
- $channelsElement = new Channel();
- $channels = [$channelsElement];
- $expectedResponse = new ListChannelsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setChannels($channels);
- $transport->addResponse($expectedResponse);
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateEnrollmentTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $uid = 'uid115792';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $celMatch = 'celMatch1270406544';
+ $messageBus = 'messageBus-872787384';
+ $destination = 'destination-1429847026';
+ $expectedResponse = new Enrollment();
+ $expectedResponse->setName($name);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setCelMatch($celMatch);
+ $expectedResponse->setMessageBus($messageBus);
+ $expectedResponse->setDestination($destination);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updateEnrollmentTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListChannelsRequest())->setParent($formattedParent);
- $response = $gapicClient->listChannels($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannels', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
+ $enrollment = new Enrollment();
+ $enrollmentCelMatch = 'enrollmentCelMatch2137295551';
+ $enrollment->setCelMatch($enrollmentCelMatch);
+ $enrollmentMessageBus = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $enrollment->setMessageBus($enrollmentMessageBus);
+ $enrollmentDestination = 'enrollmentDestination-400605590';
+ $enrollment->setDestination($enrollmentDestination);
+ $request = (new UpdateEnrollmentRequest())->setEnrollment($enrollment);
+ $response = $gapicClient->updateEnrollment($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateEnrollment', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getEnrollment();
+ $this->assertProtobufEquals($enrollment, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateEnrollmentTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listChannelsExceptionTest()
+ public function updateEnrollmentExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateEnrollmentTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -1457,65 +3687,136 @@ public function listChannelsExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
+ $operationsTransport->addResponse(null, $status);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListChannelsRequest())->setParent($formattedParent);
+ $enrollment = new Enrollment();
+ $enrollmentCelMatch = 'enrollmentCelMatch2137295551';
+ $enrollment->setCelMatch($enrollmentCelMatch);
+ $enrollmentMessageBus = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $enrollment->setMessageBus($enrollmentMessageBus);
+ $enrollmentDestination = 'enrollmentDestination-400605590';
+ $enrollment->setDestination($enrollmentDestination);
+ $request = (new UpdateEnrollmentRequest())->setEnrollment($enrollment);
+ $response = $gapicClient->updateEnrollment($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateEnrollmentTest');
try {
- $gapicClient->listChannels($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listProvidersTest()
+ public function updateGoogleApiSourceTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
- $nextPageToken = '';
- $providersElement = new Provider();
- $providers = [$providersElement];
- $expectedResponse = new ListProvidersResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setProviders($providers);
- $transport->addResponse($expectedResponse);
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateGoogleApiSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
+ $name = 'name3373707';
+ $uid = 'uid115792';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
+ $destination = 'destination-1429847026';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new GoogleApiSource();
+ $expectedResponse->setName($name);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
+ $expectedResponse->setDestination($destination);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updateGoogleApiSourceTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListProvidersRequest())->setParent($formattedParent);
- $response = $gapicClient->listProviders($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getProviders()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListProviders', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
+ $googleApiSource = new GoogleApiSource();
+ $googleApiSourceDestination = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $googleApiSource->setDestination($googleApiSourceDestination);
+ $request = (new UpdateGoogleApiSourceRequest())->setGoogleApiSource($googleApiSource);
+ $response = $gapicClient->updateGoogleApiSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleApiSource', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getGoogleApiSource();
+ $this->assertProtobufEquals($googleApiSource, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateGoogleApiSourceTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listProvidersExceptionTest()
+ public function updateGoogleApiSourceExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updateGoogleApiSourceTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -1528,25 +3829,36 @@ public function listProvidersExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
+ $operationsTransport->addResponse(null, $status);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListProvidersRequest())->setParent($formattedParent);
+ $googleApiSource = new GoogleApiSource();
+ $googleApiSourceDestination = $gapicClient->messageBusName('[PROJECT]', '[LOCATION]', '[MESSAGE_BUS]');
+ $googleApiSource->setDestination($googleApiSourceDestination);
+ $request = (new UpdateGoogleApiSourceRequest())->setGoogleApiSource($googleApiSource);
+ $response = $gapicClient->updateGoogleApiSource($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updateGoogleApiSourceTest');
try {
- $gapicClient->listProviders($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function listTriggersTest()
+ public function updateGoogleChannelConfigTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1554,33 +3866,31 @@ public function listTriggersTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $nextPageToken = '';
- $triggersElement = new Trigger();
- $triggers = [$triggersElement];
- $expectedResponse = new ListTriggersResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setTriggers($triggers);
+ $name = 'name3373707';
+ $cryptoKeyName = 'cryptoKeyName-184663511';
+ $expectedResponse = new GoogleChannelConfig();
+ $expectedResponse->setName($name);
+ $expectedResponse->setCryptoKeyName($cryptoKeyName);
$transport->addResponse($expectedResponse);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListTriggersRequest())->setParent($formattedParent);
- $response = $gapicClient->listTriggers($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getTriggers()[0], $resources[0]);
+ $googleChannelConfig = new GoogleChannelConfig();
+ $googleChannelConfigName = 'googleChannelConfigName-13357801';
+ $googleChannelConfig->setName($googleChannelConfigName);
+ $request = (new UpdateGoogleChannelConfigRequest())->setGoogleChannelConfig($googleChannelConfig);
+ $response = $gapicClient->updateGoogleChannelConfig($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.eventarc.v1.Eventarc/ListTriggers', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', $actualFuncCall);
+ $actualValue = $actualRequestObject->getGoogleChannelConfig();
+ $this->assertProtobufEquals($googleChannelConfig, $actualValue);
$this->assertTrue($transport->isExhausted());
}
/** @test */
- public function listTriggersExceptionTest()
+ public function updateGoogleChannelConfigExceptionTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -1601,10 +3911,12 @@ public function listTriggersExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListTriggersRequest())->setParent($formattedParent);
+ $googleChannelConfig = new GoogleChannelConfig();
+ $googleChannelConfigName = 'googleChannelConfigName-13357801';
+ $googleChannelConfig->setName($googleChannelConfigName);
+ $request = (new UpdateGoogleChannelConfigRequest())->setGoogleChannelConfig($googleChannelConfig);
try {
- $gapicClient->listTriggers($request);
+ $gapicClient->updateGoogleChannelConfig($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) {
@@ -1617,7 +3929,7 @@ public function listTriggersExceptionTest()
}
/** @test */
- public function updateChannelTest()
+ public function updateMessageBusTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -1634,33 +3946,31 @@ public function updateChannelTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateChannelTest');
+ $incompleteOperation->setName('operations/updateMessageBusTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$name = 'name3373707';
$uid = 'uid115792';
- $provider = 'provider-987494927';
- $pubsubTopic = 'pubsubTopic-338126829';
- $activationToken = 'activationToken1250030992';
+ $etag = 'etag3123477';
+ $displayName = 'displayName1615086568';
$cryptoKeyName = 'cryptoKeyName-184663511';
- $expectedResponse = new Channel();
+ $expectedResponse = new MessageBus();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
- $expectedResponse->setProvider($provider);
- $expectedResponse->setPubsubTopic($pubsubTopic);
- $expectedResponse->setActivationToken($activationToken);
+ $expectedResponse->setEtag($etag);
+ $expectedResponse->setDisplayName($displayName);
$expectedResponse->setCryptoKeyName($cryptoKeyName);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
- $completeOperation->setName('operations/updateChannelTest');
+ $completeOperation->setName('operations/updateMessageBusTest');
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
// Mock request
- $validateOnly = false;
- $request = (new UpdateChannelRequest())->setValidateOnly($validateOnly);
- $response = $gapicClient->updateChannel($request);
+ $messageBus = new MessageBus();
+ $request = (new UpdateMessageBusRequest())->setMessageBus($messageBus);
+ $response = $gapicClient->updateMessageBus($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$apiRequests = $transport->popReceivedCalls();
@@ -1669,11 +3979,11 @@ public function updateChannelTest()
$this->assertSame(0, count($operationsRequestsEmpty));
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateMessageBus', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getMessageBus();
+ $this->assertProtobufEquals($messageBus, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateChannelTest');
+ $expectedOperationsRequestObject->setName('operations/updateMessageBusTest');
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
]);
@@ -1692,7 +4002,7 @@ public function updateChannelTest()
}
/** @test */
- public function updateChannelExceptionTest()
+ public function updateMessageBusExceptionTest()
{
$operationsTransport = $this->createTransport();
$operationsClient = new OperationsClient([
@@ -1709,7 +4019,7 @@ public function updateChannelExceptionTest()
$this->assertTrue($operationsTransport->isExhausted());
// Mock response
$incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateChannelTest');
+ $incompleteOperation->setName('operations/updateMessageBusTest');
$incompleteOperation->setDone(false);
$transport->addResponse($incompleteOperation);
$status = new stdClass();
@@ -1726,13 +4036,13 @@ public function updateChannelExceptionTest()
);
$operationsTransport->addResponse(null, $status);
// Mock request
- $validateOnly = false;
- $request = (new UpdateChannelRequest())->setValidateOnly($validateOnly);
- $response = $gapicClient->updateChannel($request);
+ $messageBus = new MessageBus();
+ $request = (new UpdateMessageBusRequest())->setMessageBus($messageBus);
+ $response = $gapicClient->updateMessageBus($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
$expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateChannelTest');
+ $expectedOperationsRequestObject->setName('operations/updateMessageBusTest');
try {
$response->pollUntilComplete([
'initialPollDelayMillis' => 1,
@@ -1751,45 +4061,101 @@ public function updateChannelExceptionTest()
}
/** @test */
- public function updateGoogleChannelConfigTest()
+ public function updatePipelineTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
// Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updatePipelineTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$name = 'name3373707';
+ $uid = 'uid115792';
+ $displayName = 'displayName1615086568';
$cryptoKeyName = 'cryptoKeyName-184663511';
- $expectedResponse = new GoogleChannelConfig();
+ $etag = 'etag3123477';
+ $expectedResponse = new Pipeline();
$expectedResponse->setName($name);
+ $expectedResponse->setUid($uid);
+ $expectedResponse->setDisplayName($displayName);
$expectedResponse->setCryptoKeyName($cryptoKeyName);
- $transport->addResponse($expectedResponse);
+ $expectedResponse->setEtag($etag);
+ $anyResponse = new Any();
+ $anyResponse->setValue($expectedResponse->serializeToString());
+ $completeOperation = new Operation();
+ $completeOperation->setName('operations/updatePipelineTest');
+ $completeOperation->setDone(true);
+ $completeOperation->setResponse($anyResponse);
+ $operationsTransport->addResponse($completeOperation);
// Mock request
- $googleChannelConfig = new GoogleChannelConfig();
- $googleChannelConfigName = 'googleChannelConfigName-13357801';
- $googleChannelConfig->setName($googleChannelConfigName);
- $request = (new UpdateGoogleChannelConfigRequest())->setGoogleChannelConfig($googleChannelConfig);
- $response = $gapicClient->updateGoogleChannelConfig($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.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getGoogleChannelConfig();
- $this->assertProtobufEquals($googleChannelConfig, $actualValue);
+ $pipeline = new Pipeline();
+ $pipelineDestinations = [];
+ $pipeline->setDestinations($pipelineDestinations);
+ $request = (new UpdatePipelineRequest())->setPipeline($pipeline);
+ $response = $gapicClient->updatePipeline($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $apiRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($apiRequests));
+ $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
+ $this->assertSame(0, count($operationsRequestsEmpty));
+ $actualApiFuncCall = $apiRequests[0]->getFuncCall();
+ $actualApiRequestObject = $apiRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdatePipeline', $actualApiFuncCall);
+ $actualValue = $actualApiRequestObject->getPipeline();
+ $this->assertProtobufEquals($pipeline, $actualValue);
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updatePipelineTest');
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ $this->assertTrue($response->isDone());
+ $this->assertEquals($expectedResponse, $response->getResult());
+ $apiRequestsEmpty = $transport->popReceivedCalls();
+ $this->assertSame(0, count($apiRequestsEmpty));
+ $operationsRequests = $operationsTransport->popReceivedCalls();
+ $this->assertSame(1, count($operationsRequests));
+ $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
+ $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
+ $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
+ $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
- public function updateGoogleChannelConfigExceptionTest()
+ public function updatePipelineExceptionTest()
{
+ $operationsTransport = $this->createTransport();
+ $operationsClient = new OperationsClient([
+ 'apiEndpoint' => '',
+ 'transport' => $operationsTransport,
+ 'credentials' => $this->createCredentials(),
+ ]);
$transport = $this->createTransport();
$gapicClient = $this->createClient([
'transport' => $transport,
+ 'operationsClient' => $operationsClient,
]);
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
+ // Mock response
+ $incompleteOperation = new Operation();
+ $incompleteOperation->setName('operations/updatePipelineTest');
+ $incompleteOperation->setDone(false);
+ $transport->addResponse($incompleteOperation);
$status = new stdClass();
$status->code = Code::DATA_LOSS;
$status->details = 'internal error';
@@ -1802,23 +4168,32 @@ public function updateGoogleChannelConfigExceptionTest()
],
JSON_PRETTY_PRINT
);
- $transport->addResponse(null, $status);
+ $operationsTransport->addResponse(null, $status);
// Mock request
- $googleChannelConfig = new GoogleChannelConfig();
- $googleChannelConfigName = 'googleChannelConfigName-13357801';
- $googleChannelConfig->setName($googleChannelConfigName);
- $request = (new UpdateGoogleChannelConfigRequest())->setGoogleChannelConfig($googleChannelConfig);
+ $pipeline = new Pipeline();
+ $pipelineDestinations = [];
+ $pipeline->setDestinations($pipelineDestinations);
+ $request = (new UpdatePipelineRequest())->setPipeline($pipeline);
+ $response = $gapicClient->updatePipeline($request);
+ $this->assertFalse($response->isDone());
+ $this->assertNull($response->getResult());
+ $expectedOperationsRequestObject = new GetOperationRequest();
+ $expectedOperationsRequestObject->setName('operations/updatePipelineTest');
try {
- $gapicClient->updateGoogleChannelConfig($request);
- // If the $gapicClient method call did not throw, fail the test
+ $response->pollUntilComplete([
+ 'initialPollDelayMillis' => 1,
+ ]);
+ // If the pollUntilComplete() 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
+ // Call popReceivedCalls to ensure the stubs are exhausted
$transport->popReceivedCalls();
+ $operationsTransport->popReceivedCalls();
$this->assertTrue($transport->isExhausted());
+ $this->assertTrue($operationsTransport->isExhausted());
}
/** @test */
@@ -1846,12 +4221,16 @@ public function updateTriggerTest()
$uid = 'uid115792';
$serviceAccount = 'serviceAccount-1948028253';
$channel = 'channel738950403';
+ $eventDataContentType = 'eventDataContentType-440836272';
+ $satisfiesPzs = false;
$etag = 'etag3123477';
$expectedResponse = new Trigger();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
$expectedResponse->setServiceAccount($serviceAccount);
$expectedResponse->setChannel($channel);
+ $expectedResponse->setEventDataContentType($eventDataContentType);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
$expectedResponse->setEtag($etag);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
@@ -1860,9 +4239,7 @@ public function updateTriggerTest()
$completeOperation->setDone(true);
$completeOperation->setResponse($anyResponse);
$operationsTransport->addResponse($completeOperation);
- // Mock request
- $validateOnly = false;
- $request = (new UpdateTriggerRequest())->setValidateOnly($validateOnly);
+ $request = new UpdateTriggerRequest();
$response = $gapicClient->updateTrigger($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -1873,8 +4250,6 @@ public function updateTriggerTest()
$actualApiFuncCall = $apiRequests[0]->getFuncCall();
$actualApiRequestObject = $apiRequests[0]->getRequestObject();
$this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateTrigger', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
$expectedOperationsRequestObject->setName('operations/updateTriggerTest');
$response->pollUntilComplete([
@@ -1928,9 +4303,7 @@ public function updateTriggerExceptionTest()
JSON_PRETTY_PRINT
);
$operationsTransport->addResponse(null, $status);
- // Mock request
- $validateOnly = false;
- $request = (new UpdateTriggerRequest())->setValidateOnly($validateOnly);
+ $request = new UpdateTriggerRequest();
$response = $gapicClient->updateTrigger($request);
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2313,6 +4686,7 @@ public function createChannelAsyncTest()
$pubsubTopic = 'pubsubTopic-338126829';
$activationToken = 'activationToken1250030992';
$cryptoKeyName = 'cryptoKeyName-184663511';
+ $satisfiesPzs = false;
$expectedResponse = new Channel();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -2320,6 +4694,7 @@ public function createChannelAsyncTest()
$expectedResponse->setPubsubTopic($pubsubTopic);
$expectedResponse->setActivationToken($activationToken);
$expectedResponse->setCryptoKeyName($cryptoKeyName);
+ $expectedResponse->setSatisfiesPzs($satisfiesPzs);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
@@ -2333,12 +4708,10 @@ public function createChannelAsyncTest()
$channelName = 'channelName273953326';
$channel->setName($channelName);
$channelId = 'channelId-1930808873';
- $validateOnly = false;
$request = (new CreateChannelRequest())
->setParent($formattedParent)
->setChannel($channel)
- ->setChannelId($channelId)
- ->setValidateOnly($validateOnly);
+ ->setChannelId($channelId);
$response = $gapicClient->createChannelAsync($request)->wait();
$this->assertFalse($response->isDone());
$this->assertNull($response->getResult());
@@ -2355,8 +4728,6 @@ public function createChannelAsyncTest()
$this->assertProtobufEquals($channel, $actualValue);
$actualValue = $actualApiRequestObject->getChannelId();
$this->assertProtobufEquals($channelId, $actualValue);
- $actualValue = $actualApiRequestObject->getValidateOnly();
- $this->assertProtobufEquals($validateOnly, $actualValue);
$expectedOperationsRequestObject = new GetOperationRequest();
$expectedOperationsRequestObject->setName('operations/createChannelTest');
$response->pollUntilComplete([