diff --git a/PubSub/samples/V1/PublisherClient/create_topic.php b/PubSub/samples/V1/PublisherClient/create_topic.php
index b9ac42b616db..96a48d5a723a 100644
--- a/PubSub/samples/V1/PublisherClient/create_topic.php
+++ b/PubSub/samples/V1/PublisherClient/create_topic.php
@@ -29,7 +29,7 @@
/**
* Creates the given topic with the given name. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
*
* @param string $name The name of the topic. It must have the format
* `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
diff --git a/PubSub/samples/V1/SubscriberClient/create_snapshot.php b/PubSub/samples/V1/SubscriberClient/create_snapshot.php
index 2c895be4c181..6edc15b0fe7b 100644
--- a/PubSub/samples/V1/SubscriberClient/create_snapshot.php
+++ b/PubSub/samples/V1/SubscriberClient/create_snapshot.php
@@ -41,7 +41,7 @@
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
@@ -49,8 +49,8 @@
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`. Please see
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`. Please see
* {@see SubscriberClient::snapshotName()} for help formatting this field.
* @param string $formattedSubscription The subscription whose backlog the snapshot retains.
* Specifically, the created snapshot is guaranteed to retain:
diff --git a/PubSub/samples/V1/SubscriberClient/create_subscription.php b/PubSub/samples/V1/SubscriberClient/create_subscription.php
index 92a771aeaa38..2068030469fa 100644
--- a/PubSub/samples/V1/SubscriberClient/create_subscription.php
+++ b/PubSub/samples/V1/SubscriberClient/create_subscription.php
@@ -29,16 +29,16 @@
/**
* Creates a subscription to a given topic. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
*
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
- * name is populated in the returned Subscription object. Note that for REST
- * API requests, you must specify a name in the request.
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+ * generated name is populated in the returned Subscription object. Note that
+ * for REST API requests, you must specify a name in the request.
*
* @param string $name The name of the subscription. It must have the format
* `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
diff --git a/PubSub/src/V1/Client/PublisherClient.php b/PubSub/src/V1/Client/PublisherClient.php
index d12919331424..0e87283a1b16 100644
--- a/PubSub/src/V1/Client/PublisherClient.php
+++ b/PubSub/src/V1/Client/PublisherClient.php
@@ -319,7 +319,7 @@ public function __call($method, $args)
/**
* Creates the given topic with the given name. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
*
* The async variant is {@see PublisherClient::createTopicAsync()} .
*
diff --git a/PubSub/src/V1/Client/SubscriberClient.php b/PubSub/src/V1/Client/SubscriberClient.php
index 340b80e4206e..de7ee0ad07f2 100644
--- a/PubSub/src/V1/Client/SubscriberClient.php
+++ b/PubSub/src/V1/Client/SubscriberClient.php
@@ -374,7 +374,7 @@ public function acknowledge(AcknowledgeRequest $request, array $callOptions = []
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
@@ -401,16 +401,16 @@ public function createSnapshot(CreateSnapshotRequest $request, array $callOption
/**
* Creates a subscription to a given topic. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
*
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
- * name is populated in the returned Subscription object. Note that for REST
- * API requests, you must specify a name in the request.
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+ * generated name is populated in the returned Subscription object. Note that
+ * for REST API requests, you must specify a name in the request.
*
* The async variant is {@see SubscriberClient::createSubscriptionAsync()} .
*
diff --git a/PubSub/src/V1/CreateSnapshotRequest.php b/PubSub/src/V1/CreateSnapshotRequest.php
index acf5a0ded21e..7980aeb22690 100644
--- a/PubSub/src/V1/CreateSnapshotRequest.php
+++ b/PubSub/src/V1/CreateSnapshotRequest.php
@@ -20,8 +20,8 @@ class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`.
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -53,8 +53,8 @@ class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`. Please see
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`. Please see
* {@see SubscriberClient::snapshotName()} for help formatting this field.
* @param string $subscription Required. The subscription whose backlog the snapshot retains.
* Specifically, the created snapshot is guaranteed to retain:
@@ -89,8 +89,8 @@ public static function build(string $name, string $subscription): self
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`.
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`.
* @type string $subscription
* Required. The subscription whose backlog the snapshot retains.
* Specifically, the created snapshot is guaranteed to retain:
@@ -116,8 +116,8 @@ public function __construct($data = NULL) {
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`.
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -132,8 +132,8 @@ public function getName()
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`.
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/PubSub/src/V1/Gapic/PublisherGapicClient.php b/PubSub/src/V1/Gapic/PublisherGapicClient.php
index b65d08482fcb..68dcbeffbc06 100644
--- a/PubSub/src/V1/Gapic/PublisherGapicClient.php
+++ b/PubSub/src/V1/Gapic/PublisherGapicClient.php
@@ -413,7 +413,7 @@ public function __construct(array $options = [])
/**
* Creates the given topic with the given name. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
*
* Sample code:
* ```
diff --git a/PubSub/src/V1/Gapic/SubscriberGapicClient.php b/PubSub/src/V1/Gapic/SubscriberGapicClient.php
index 3e855db06f86..a2b23380c31c 100644
--- a/PubSub/src/V1/Gapic/SubscriberGapicClient.php
+++ b/PubSub/src/V1/Gapic/SubscriberGapicClient.php
@@ -489,7 +489,7 @@ public function acknowledge($subscription, $ackIds, array $optionalArgs = [])
* the request, the server will assign a random
* name for this snapshot on the same project as the subscription, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
* generated name is populated in the returned Snapshot object. Note that for
* REST API requests, you must specify a name in the request.
*
@@ -509,8 +509,8 @@ public function acknowledge($subscription, $ackIds, array $optionalArgs = [])
* in the request, the server will assign a random name for this snapshot on
* the same project as the subscription. Note that for REST API requests, you
* must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
- * is `projects/{project}/snapshots/{snap}`.
+ * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
+ * Format is `projects/{project}/snapshots/{snap}`.
* @param string $subscription Required. The subscription whose backlog the snapshot retains.
* Specifically, the created snapshot is guaranteed to retain:
* (a) The existing backlog on the subscription. More precisely, this is
@@ -554,16 +554,16 @@ public function createSnapshot($name, $subscription, array $optionalArgs = [])
/**
* Creates a subscription to a given topic. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names).
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
* If the subscription already exists, returns `ALREADY_EXISTS`.
* If the corresponding topic doesn't exist, returns `NOT_FOUND`.
*
* If the name is not provided in the request, the server will assign a random
* name for this subscription on the same project as the topic, conforming
* to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated
- * name is populated in the returned Subscription object. Note that for REST
- * API requests, you must specify a name in the request.
+ * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
+ * generated name is populated in the returned Subscription object. Note that
+ * for REST API requests, you must specify a name in the request.
*
* Sample code:
* ```
diff --git a/PubSub/src/V1/MessageStoragePolicy.php b/PubSub/src/V1/MessageStoragePolicy.php
index 97dec8075719..46d734edd1b4 100644
--- a/PubSub/src/V1/MessageStoragePolicy.php
+++ b/PubSub/src/V1/MessageStoragePolicy.php
@@ -16,11 +16,12 @@
class MessageStoragePolicy extends \Google\Protobuf\Internal\Message
{
/**
- * A list of IDs of GCP regions where messages that are published to the topic
- * may be persisted in storage. Messages published by publishers running in
- * non-allowed GCP regions (or running outside of GCP altogether) will be
- * routed for storage in one of the allowed regions. An empty list means that
- * no regions are allowed, and is not a valid configuration.
+ * A list of IDs of Google Cloud regions where messages that are published
+ * to the topic may be persisted in storage. Messages published by publishers
+ * running in non-allowed Google Cloud regions (or running outside of Google
+ * Cloud altogether) are routed for storage in one of the allowed regions.
+ * An empty list means that no regions are allowed, and is not a valid
+ * configuration.
*
* Generated from protobuf field repeated string allowed_persistence_regions = 1;
*/
@@ -33,11 +34,12 @@ class MessageStoragePolicy extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type array|\Google\Protobuf\Internal\RepeatedField $allowed_persistence_regions
- * A list of IDs of GCP regions where messages that are published to the topic
- * may be persisted in storage. Messages published by publishers running in
- * non-allowed GCP regions (or running outside of GCP altogether) will be
- * routed for storage in one of the allowed regions. An empty list means that
- * no regions are allowed, and is not a valid configuration.
+ * A list of IDs of Google Cloud regions where messages that are published
+ * to the topic may be persisted in storage. Messages published by publishers
+ * running in non-allowed Google Cloud regions (or running outside of Google
+ * Cloud altogether) are routed for storage in one of the allowed regions.
+ * An empty list means that no regions are allowed, and is not a valid
+ * configuration.
* }
*/
public function __construct($data = NULL) {
@@ -46,11 +48,12 @@ public function __construct($data = NULL) {
}
/**
- * A list of IDs of GCP regions where messages that are published to the topic
- * may be persisted in storage. Messages published by publishers running in
- * non-allowed GCP regions (or running outside of GCP altogether) will be
- * routed for storage in one of the allowed regions. An empty list means that
- * no regions are allowed, and is not a valid configuration.
+ * A list of IDs of Google Cloud regions where messages that are published
+ * to the topic may be persisted in storage. Messages published by publishers
+ * running in non-allowed Google Cloud regions (or running outside of Google
+ * Cloud altogether) are routed for storage in one of the allowed regions.
+ * An empty list means that no regions are allowed, and is not a valid
+ * configuration.
*
* Generated from protobuf field repeated string allowed_persistence_regions = 1;
* @return \Google\Protobuf\Internal\RepeatedField
@@ -61,11 +64,12 @@ public function getAllowedPersistenceRegions()
}
/**
- * A list of IDs of GCP regions where messages that are published to the topic
- * may be persisted in storage. Messages published by publishers running in
- * non-allowed GCP regions (or running outside of GCP altogether) will be
- * routed for storage in one of the allowed regions. An empty list means that
- * no regions are allowed, and is not a valid configuration.
+ * A list of IDs of Google Cloud regions where messages that are published
+ * to the topic may be persisted in storage. Messages published by publishers
+ * running in non-allowed Google Cloud regions (or running outside of Google
+ * Cloud altogether) are routed for storage in one of the allowed regions.
+ * An empty list means that no regions are allowed, and is not a valid
+ * configuration.
*
* Generated from protobuf field repeated string allowed_persistence_regions = 1;
* @param array|\Google\Protobuf\Internal\RepeatedField $var
diff --git a/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Pubsub.php b/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Pubsub.php
deleted file mode 100644
index 5df7ba5d4e3e..000000000000
Binary files a/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Pubsub.php and /dev/null differ
diff --git a/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Schema.php b/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Schema.php
deleted file mode 100644
index 71bdeb628cea..000000000000
Binary files a/owl-bot-staging/PubSub/v1/proto/src/GPBMetadata/Google/Pubsub/V1/Schema.php and /dev/null differ
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/AcknowledgeRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/AcknowledgeRequest.php
deleted file mode 100644
index bcea3e128240..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/AcknowledgeRequest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-google.pubsub.v1.AcknowledgeRequest
- */
-class AcknowledgeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- *
- * Generated from protobuf field repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $ack_ids;
-
- /**
- * @param string $subscription Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- * @param string[] $ackIds Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- *
- * @return \Google\Cloud\PubSub\V1\AcknowledgeRequest
- *
- * @experimental
- */
- public static function build(string $subscription, array $ackIds): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setAckIds($ackIds);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type array|\Google\Protobuf\Internal\RepeatedField $ack_ids
- * Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- *
- * Generated from protobuf field repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAckIds()
- {
- return $this->ack_ids;
- }
-
- /**
- * Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- *
- * Generated from protobuf field repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->ack_ids = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig.php
deleted file mode 100644
index d7e766a21e41..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig.php
+++ /dev/null
@@ -1,247 +0,0 @@
-google.pubsub.v1.BigQueryConfig
- */
-class BigQueryConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The name of the table to which to write data, of the form
- * {projectId}.{datasetId}.{tableId}
- *
- * Generated from protobuf field string table = 1;
- */
- protected $table = '';
- /**
- * When true, use the topic's schema as the columns to write to in BigQuery,
- * if it exists.
- *
- * Generated from protobuf field bool use_topic_schema = 2;
- */
- protected $use_topic_schema = false;
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key to additional columns in the table. The
- * subscription name, message_id, and publish_time fields are put in their own
- * columns while all other message properties (other than data) are written to
- * a JSON object in the attributes column.
- *
- * Generated from protobuf field bool write_metadata = 3;
- */
- protected $write_metadata = false;
- /**
- * When true and use_topic_schema is true, any fields that are a part of the
- * topic schema that are not part of the BigQuery table schema are dropped
- * when writing to BigQuery. Otherwise, the schemas must be kept in sync and
- * any messages with extra fields are not written and remain in the
- * subscription's backlog.
- *
- * Generated from protobuf field bool drop_unknown_fields = 4;
- */
- protected $drop_unknown_fields = false;
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $table
- * The name of the table to which to write data, of the form
- * {projectId}.{datasetId}.{tableId}
- * @type bool $use_topic_schema
- * When true, use the topic's schema as the columns to write to in BigQuery,
- * if it exists.
- * @type bool $write_metadata
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key to additional columns in the table. The
- * subscription name, message_id, and publish_time fields are put in their own
- * columns while all other message properties (other than data) are written to
- * a JSON object in the attributes column.
- * @type bool $drop_unknown_fields
- * When true and use_topic_schema is true, any fields that are a part of the
- * topic schema that are not part of the BigQuery table schema are dropped
- * when writing to BigQuery. Otherwise, the schemas must be kept in sync and
- * any messages with extra fields are not written and remain in the
- * subscription's backlog.
- * @type int $state
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The name of the table to which to write data, of the form
- * {projectId}.{datasetId}.{tableId}
- *
- * Generated from protobuf field string table = 1;
- * @return string
- */
- public function getTable()
- {
- return $this->table;
- }
-
- /**
- * The name of the table to which to write data, of the form
- * {projectId}.{datasetId}.{tableId}
- *
- * Generated from protobuf field string table = 1;
- * @param string $var
- * @return $this
- */
- public function setTable($var)
- {
- GPBUtil::checkString($var, True);
- $this->table = $var;
-
- return $this;
- }
-
- /**
- * When true, use the topic's schema as the columns to write to in BigQuery,
- * if it exists.
- *
- * Generated from protobuf field bool use_topic_schema = 2;
- * @return bool
- */
- public function getUseTopicSchema()
- {
- return $this->use_topic_schema;
- }
-
- /**
- * When true, use the topic's schema as the columns to write to in BigQuery,
- * if it exists.
- *
- * Generated from protobuf field bool use_topic_schema = 2;
- * @param bool $var
- * @return $this
- */
- public function setUseTopicSchema($var)
- {
- GPBUtil::checkBool($var);
- $this->use_topic_schema = $var;
-
- return $this;
- }
-
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key to additional columns in the table. The
- * subscription name, message_id, and publish_time fields are put in their own
- * columns while all other message properties (other than data) are written to
- * a JSON object in the attributes column.
- *
- * Generated from protobuf field bool write_metadata = 3;
- * @return bool
- */
- public function getWriteMetadata()
- {
- return $this->write_metadata;
- }
-
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key to additional columns in the table. The
- * subscription name, message_id, and publish_time fields are put in their own
- * columns while all other message properties (other than data) are written to
- * a JSON object in the attributes column.
- *
- * Generated from protobuf field bool write_metadata = 3;
- * @param bool $var
- * @return $this
- */
- public function setWriteMetadata($var)
- {
- GPBUtil::checkBool($var);
- $this->write_metadata = $var;
-
- return $this;
- }
-
- /**
- * When true and use_topic_schema is true, any fields that are a part of the
- * topic schema that are not part of the BigQuery table schema are dropped
- * when writing to BigQuery. Otherwise, the schemas must be kept in sync and
- * any messages with extra fields are not written and remain in the
- * subscription's backlog.
- *
- * Generated from protobuf field bool drop_unknown_fields = 4;
- * @return bool
- */
- public function getDropUnknownFields()
- {
- return $this->drop_unknown_fields;
- }
-
- /**
- * When true and use_topic_schema is true, any fields that are a part of the
- * topic schema that are not part of the BigQuery table schema are dropped
- * when writing to BigQuery. Otherwise, the schemas must be kept in sync and
- * any messages with extra fields are not written and remain in the
- * subscription's backlog.
- *
- * Generated from protobuf field bool drop_unknown_fields = 4;
- * @param bool $var
- * @return $this
- */
- public function setDropUnknownFields($var)
- {
- GPBUtil::checkBool($var);
- $this->drop_unknown_fields = $var;
-
- return $this;
- }
-
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\BigQueryConfig\State::class);
- $this->state = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig/State.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig/State.php
deleted file mode 100644
index f29925666077..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/BigQueryConfig/State.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.pubsub.v1.BigQueryConfig.State
- */
-class State
-{
- /**
- * Default value. This value is unused.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The subscription can actively send messages to BigQuery
- *
- * Generated from protobuf enum ACTIVE = 1;
- */
- const ACTIVE = 1;
- /**
- * Cannot write to the BigQuery table because of permission denied errors.
- * This can happen if
- * - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
- * permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
- * - bigquery.googleapis.com API is not enabled for the project
- * ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
- *
- * Generated from protobuf enum PERMISSION_DENIED = 2;
- */
- const PERMISSION_DENIED = 2;
- /**
- * Cannot write to the BigQuery table because it does not exist.
- *
- * Generated from protobuf enum NOT_FOUND = 3;
- */
- const NOT_FOUND = 3;
- /**
- * Cannot write to the BigQuery table due to a schema mismatch.
- *
- * Generated from protobuf enum SCHEMA_MISMATCH = 4;
- */
- const SCHEMA_MISMATCH = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::PERMISSION_DENIED => 'PERMISSION_DENIED',
- self::NOT_FOUND => 'NOT_FOUND',
- self::SCHEMA_MISMATCH => 'SCHEMA_MISMATCH',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\PubSub\V1\BigQueryConfig_State::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig.php
deleted file mode 100644
index ebddc091ed6c..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig.php
+++ /dev/null
@@ -1,366 +0,0 @@
-google.pubsub.v1.CloudStorageConfig
- */
-class CloudStorageConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. User-provided name for the Cloud Storage bucket.
- * The bucket must be created by the user. The bucket name must be without
- * any prefix like "gs://". See the [bucket naming
- * requirements] (https://cloud.google.com/storage/docs/buckets#naming).
- *
- * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $bucket = '';
- /**
- * User-provided prefix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming).
- *
- * Generated from protobuf field string filename_prefix = 2;
- */
- protected $filename_prefix = '';
- /**
- * User-provided suffix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming). Must
- * not end in "/".
- *
- * Generated from protobuf field string filename_suffix = 3;
- */
- protected $filename_suffix = '';
- /**
- * The maximum duration that can elapse before a new Cloud Storage file is
- * created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
- * the subscription's acknowledgement deadline.
- *
- * Generated from protobuf field .google.protobuf.Duration max_duration = 6;
- */
- protected $max_duration = null;
- /**
- * The maximum bytes that can be written to a Cloud Storage file before a new
- * file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
- * in cases where messages are larger than the limit.
- *
- * Generated from protobuf field int64 max_bytes = 7;
- */
- protected $max_bytes = 0;
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- protected $output_format;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $bucket
- * Required. User-provided name for the Cloud Storage bucket.
- * The bucket must be created by the user. The bucket name must be without
- * any prefix like "gs://". See the [bucket naming
- * requirements] (https://cloud.google.com/storage/docs/buckets#naming).
- * @type string $filename_prefix
- * User-provided prefix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming).
- * @type string $filename_suffix
- * User-provided suffix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming). Must
- * not end in "/".
- * @type \Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig $text_config
- * If set, message data will be written to Cloud Storage in text format.
- * @type \Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig $avro_config
- * If set, message data will be written to Cloud Storage in Avro format.
- * @type \Google\Protobuf\Duration $max_duration
- * The maximum duration that can elapse before a new Cloud Storage file is
- * created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
- * the subscription's acknowledgement deadline.
- * @type int|string $max_bytes
- * The maximum bytes that can be written to a Cloud Storage file before a new
- * file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
- * in cases where messages are larger than the limit.
- * @type int $state
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. User-provided name for the Cloud Storage bucket.
- * The bucket must be created by the user. The bucket name must be without
- * any prefix like "gs://". See the [bucket naming
- * requirements] (https://cloud.google.com/storage/docs/buckets#naming).
- *
- * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getBucket()
- {
- return $this->bucket;
- }
-
- /**
- * Required. User-provided name for the Cloud Storage bucket.
- * The bucket must be created by the user. The bucket name must be without
- * any prefix like "gs://". See the [bucket naming
- * requirements] (https://cloud.google.com/storage/docs/buckets#naming).
- *
- * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setBucket($var)
- {
- GPBUtil::checkString($var, True);
- $this->bucket = $var;
-
- return $this;
- }
-
- /**
- * User-provided prefix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming).
- *
- * Generated from protobuf field string filename_prefix = 2;
- * @return string
- */
- public function getFilenamePrefix()
- {
- return $this->filename_prefix;
- }
-
- /**
- * User-provided prefix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming).
- *
- * Generated from protobuf field string filename_prefix = 2;
- * @param string $var
- * @return $this
- */
- public function setFilenamePrefix($var)
- {
- GPBUtil::checkString($var, True);
- $this->filename_prefix = $var;
-
- return $this;
- }
-
- /**
- * User-provided suffix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming). Must
- * not end in "/".
- *
- * Generated from protobuf field string filename_suffix = 3;
- * @return string
- */
- public function getFilenameSuffix()
- {
- return $this->filename_suffix;
- }
-
- /**
- * User-provided suffix for Cloud Storage filename. See the [object naming
- * requirements](https://cloud.google.com/storage/docs/objects#naming). Must
- * not end in "/".
- *
- * Generated from protobuf field string filename_suffix = 3;
- * @param string $var
- * @return $this
- */
- public function setFilenameSuffix($var)
- {
- GPBUtil::checkString($var, True);
- $this->filename_suffix = $var;
-
- return $this;
- }
-
- /**
- * If set, message data will be written to Cloud Storage in text format.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4;
- * @return \Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig|null
- */
- public function getTextConfig()
- {
- return $this->readOneof(4);
- }
-
- public function hasTextConfig()
- {
- return $this->hasOneof(4);
- }
-
- /**
- * If set, message data will be written to Cloud Storage in text format.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4;
- * @param \Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig $var
- * @return $this
- */
- public function setTextConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig::class);
- $this->writeOneof(4, $var);
-
- return $this;
- }
-
- /**
- * If set, message data will be written to Cloud Storage in Avro format.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5;
- * @return \Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig|null
- */
- public function getAvroConfig()
- {
- return $this->readOneof(5);
- }
-
- public function hasAvroConfig()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * If set, message data will be written to Cloud Storage in Avro format.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5;
- * @param \Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig $var
- * @return $this
- */
- public function setAvroConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig::class);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * The maximum duration that can elapse before a new Cloud Storage file is
- * created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
- * the subscription's acknowledgement deadline.
- *
- * Generated from protobuf field .google.protobuf.Duration max_duration = 6;
- * @return \Google\Protobuf\Duration|null
- */
- public function getMaxDuration()
- {
- return $this->max_duration;
- }
-
- public function hasMaxDuration()
- {
- return isset($this->max_duration);
- }
-
- public function clearMaxDuration()
- {
- unset($this->max_duration);
- }
-
- /**
- * The maximum duration that can elapse before a new Cloud Storage file is
- * created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
- * the subscription's acknowledgement deadline.
- *
- * Generated from protobuf field .google.protobuf.Duration max_duration = 6;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMaxDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->max_duration = $var;
-
- return $this;
- }
-
- /**
- * The maximum bytes that can be written to a Cloud Storage file before a new
- * file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
- * in cases where messages are larger than the limit.
- *
- * Generated from protobuf field int64 max_bytes = 7;
- * @return int|string
- */
- public function getMaxBytes()
- {
- return $this->max_bytes;
- }
-
- /**
- * The maximum bytes that can be written to a Cloud Storage file before a new
- * file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
- * in cases where messages are larger than the limit.
- *
- * Generated from protobuf field int64 max_bytes = 7;
- * @param int|string $var
- * @return $this
- */
- public function setMaxBytes($var)
- {
- GPBUtil::checkInt64($var);
- $this->max_bytes = $var;
-
- return $this;
- }
-
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. An output-only field that indicates whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\CloudStorageConfig\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getOutputFormat()
- {
- return $this->whichOneof("output_format");
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/AvroConfig.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/AvroConfig.php
deleted file mode 100644
index 50f9de8621cb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/AvroConfig.php
+++ /dev/null
@@ -1,91 +0,0 @@
-google.pubsub.v1.CloudStorageConfig.AvroConfig
- */
-class AvroConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key as additional fields in the output. The
- * subscription name, message_id, and publish_time fields are put in their
- * own fields while all other message properties other than data (for
- * example, an ordering_key, if present) are added as entries in the
- * attributes map.
- *
- * Generated from protobuf field bool write_metadata = 1;
- */
- protected $write_metadata = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $write_metadata
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key as additional fields in the output. The
- * subscription name, message_id, and publish_time fields are put in their
- * own fields while all other message properties other than data (for
- * example, an ordering_key, if present) are added as entries in the
- * attributes map.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key as additional fields in the output. The
- * subscription name, message_id, and publish_time fields are put in their
- * own fields while all other message properties other than data (for
- * example, an ordering_key, if present) are added as entries in the
- * attributes map.
- *
- * Generated from protobuf field bool write_metadata = 1;
- * @return bool
- */
- public function getWriteMetadata()
- {
- return $this->write_metadata;
- }
-
- /**
- * When true, write the subscription name, message_id, publish_time,
- * attributes, and ordering_key as additional fields in the output. The
- * subscription name, message_id, and publish_time fields are put in their
- * own fields while all other message properties other than data (for
- * example, an ordering_key, if present) are added as entries in the
- * attributes map.
- *
- * Generated from protobuf field bool write_metadata = 1;
- * @param bool $var
- * @return $this
- */
- public function setWriteMetadata($var)
- {
- GPBUtil::checkBool($var);
- $this->write_metadata = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AvroConfig::class, \Google\Cloud\PubSub\V1\CloudStorageConfig_AvroConfig::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/State.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/State.php
deleted file mode 100644
index 94294653873a..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/State.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.pubsub.v1.CloudStorageConfig.State
- */
-class State
-{
- /**
- * Default value. This value is unused.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The subscription can actively send messages to Cloud Storage.
- *
- * Generated from protobuf enum ACTIVE = 1;
- */
- const ACTIVE = 1;
- /**
- * Cannot write to the Cloud Storage bucket because of permission denied
- * errors.
- *
- * Generated from protobuf enum PERMISSION_DENIED = 2;
- */
- const PERMISSION_DENIED = 2;
- /**
- * Cannot write to the Cloud Storage bucket because it does not exist.
- *
- * Generated from protobuf enum NOT_FOUND = 3;
- */
- const NOT_FOUND = 3;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::PERMISSION_DENIED => 'PERMISSION_DENIED',
- self::NOT_FOUND => 'NOT_FOUND',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\PubSub\V1\CloudStorageConfig_State::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/TextConfig.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/TextConfig.php
deleted file mode 100644
index b76638c31137..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CloudStorageConfig/TextConfig.php
+++ /dev/null
@@ -1,38 +0,0 @@
-google.pubsub.v1.CloudStorageConfig.TextConfig
- */
-class TextConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(TextConfig::class, \Google\Cloud\PubSub\V1\CloudStorageConfig_TextConfig::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CommitSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CommitSchemaRequest.php
deleted file mode 100644
index 29f01208b3c5..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CommitSchemaRequest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-google.pubsub.v1.CommitSchemaRequest
- */
-class CommitSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Required. The schema revision to commit.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $schema = null;
-
- /**
- * @param string $name Required. The name of the schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`. Please see
- * {@see SchemaServiceClient::schemaName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\Schema $schema Required. The schema revision to commit.
- *
- * @return \Google\Cloud\PubSub\V1\CommitSchemaRequest
- *
- * @experimental
- */
- public static function build(string $name, \Google\Cloud\PubSub\V1\Schema $schema): self
- {
- return (new self())
- ->setName($name)
- ->setSchema($schema);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`.
- * @type \Google\Cloud\PubSub\V1\Schema $schema
- * Required. The schema revision to commit.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * 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 schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * 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;
- }
-
- /**
- * Required. The schema revision to commit.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Schema|null
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- public function hasSchema()
- {
- return isset($this->schema);
- }
-
- public function clearSchema()
- {
- unset($this->schema);
- }
-
- /**
- * Required. The schema revision to commit.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Schema $var
- * @return $this
- */
- public function setSchema($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Schema::class);
- $this->schema = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSchemaRequest.php
deleted file mode 100644
index 52e1bd92f3ad..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSchemaRequest.php
+++ /dev/null
@@ -1,200 +0,0 @@
-google.pubsub.v1.CreateSchemaRequest
- */
-class CreateSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The schema object to create.
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $schema = null;
- /**
- * The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- *
- * Generated from protobuf field string schema_id = 3;
- */
- protected $schema_id = '';
-
- /**
- * @param string $parent Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`. Please see
- * {@see SchemaServiceClient::projectName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\Schema $schema Required. The schema object to create.
- *
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- * @param string $schemaId The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- *
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- *
- * @return \Google\Cloud\PubSub\V1\CreateSchemaRequest
- *
- * @experimental
- */
- public static function build(string $parent, \Google\Cloud\PubSub\V1\Schema $schema, string $schemaId): self
- {
- return (new self())
- ->setParent($parent)
- ->setSchema($schema)
- ->setSchemaId($schemaId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`.
- * @type \Google\Cloud\PubSub\V1\Schema $schema
- * Required. The schema object to create.
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- * @type string $schema_id
- * The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The schema object to create.
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Schema|null
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- public function hasSchema()
- {
- return isset($this->schema);
- }
-
- public function clearSchema()
- {
- unset($this->schema);
- }
-
- /**
- * Required. The schema object to create.
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Schema $var
- * @return $this
- */
- public function setSchema($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Schema::class);
- $this->schema = $var;
-
- return $this;
- }
-
- /**
- * The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- *
- * Generated from protobuf field string schema_id = 3;
- * @return string
- */
- public function getSchemaId()
- {
- return $this->schema_id;
- }
-
- /**
- * The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- *
- * Generated from protobuf field string schema_id = 3;
- * @param string $var
- * @return $this
- */
- public function setSchemaId($var)
- {
- GPBUtil::checkString($var, True);
- $this->schema_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSnapshotRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSnapshotRequest.php
deleted file mode 100644
index dc07cfbcbdbb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/CreateSnapshotRequest.php
+++ /dev/null
@@ -1,221 +0,0 @@
-google.pubsub.v1.CreateSnapshotRequest
- */
-class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 3;
- */
- private $labels;
-
- /**
- * @param string $name Required. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`. Please see
- * {@see SubscriberClient::snapshotName()} for help formatting this field.
- * @param string $subscription Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\CreateSnapshotRequest
- *
- * @experimental
- */
- public static function build(string $name, string $subscription): self
- {
- return (new self())
- ->setName($name)
- ->setSubscription($subscription);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`.
- * @type string $subscription
- * Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * 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. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * 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;
- }
-
- /**
- * Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 3;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 3;
- * @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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeadLetterPolicy.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeadLetterPolicy.php
deleted file mode 100644
index 1e0d77b7ab2b..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeadLetterPolicy.php
+++ /dev/null
@@ -1,164 +0,0 @@
-google.pubsub.v1.DeadLetterPolicy
- */
-class DeadLetterPolicy extends \Google\Protobuf\Internal\Message
-{
- /**
- * The name of the topic to which dead letter messages should be published.
- * Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
- * account associated with the enclosing subscription's parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Publish() to this topic.
- * The operation will fail if the topic does not exist.
- * Users should ensure that there is a subscription attached to this topic
- * since messages published to a topic with no subscriptions are lost.
- *
- * Generated from protobuf field string dead_letter_topic = 1;
- */
- protected $dead_letter_topic = '';
- /**
- * The maximum number of delivery attempts for any message. The value must be
- * between 5 and 100.
- * The number of delivery attempts is defined as 1 + (the sum of number of
- * NACKs and number of times the acknowledgement deadline has been exceeded
- * for the message).
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
- * client libraries may automatically extend ack_deadlines.
- * This field will be honored on a best effort basis.
- * If this parameter is 0, a default value of 5 is used.
- *
- * Generated from protobuf field int32 max_delivery_attempts = 2;
- */
- protected $max_delivery_attempts = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $dead_letter_topic
- * The name of the topic to which dead letter messages should be published.
- * Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
- * account associated with the enclosing subscription's parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Publish() to this topic.
- * The operation will fail if the topic does not exist.
- * Users should ensure that there is a subscription attached to this topic
- * since messages published to a topic with no subscriptions are lost.
- * @type int $max_delivery_attempts
- * The maximum number of delivery attempts for any message. The value must be
- * between 5 and 100.
- * The number of delivery attempts is defined as 1 + (the sum of number of
- * NACKs and number of times the acknowledgement deadline has been exceeded
- * for the message).
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
- * client libraries may automatically extend ack_deadlines.
- * This field will be honored on a best effort basis.
- * If this parameter is 0, a default value of 5 is used.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The name of the topic to which dead letter messages should be published.
- * Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
- * account associated with the enclosing subscription's parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Publish() to this topic.
- * The operation will fail if the topic does not exist.
- * Users should ensure that there is a subscription attached to this topic
- * since messages published to a topic with no subscriptions are lost.
- *
- * Generated from protobuf field string dead_letter_topic = 1;
- * @return string
- */
- public function getDeadLetterTopic()
- {
- return $this->dead_letter_topic;
- }
-
- /**
- * The name of the topic to which dead letter messages should be published.
- * Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
- * account associated with the enclosing subscription's parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Publish() to this topic.
- * The operation will fail if the topic does not exist.
- * Users should ensure that there is a subscription attached to this topic
- * since messages published to a topic with no subscriptions are lost.
- *
- * Generated from protobuf field string dead_letter_topic = 1;
- * @param string $var
- * @return $this
- */
- public function setDeadLetterTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->dead_letter_topic = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of delivery attempts for any message. The value must be
- * between 5 and 100.
- * The number of delivery attempts is defined as 1 + (the sum of number of
- * NACKs and number of times the acknowledgement deadline has been exceeded
- * for the message).
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
- * client libraries may automatically extend ack_deadlines.
- * This field will be honored on a best effort basis.
- * If this parameter is 0, a default value of 5 is used.
- *
- * Generated from protobuf field int32 max_delivery_attempts = 2;
- * @return int
- */
- public function getMaxDeliveryAttempts()
- {
- return $this->max_delivery_attempts;
- }
-
- /**
- * The maximum number of delivery attempts for any message. The value must be
- * between 5 and 100.
- * The number of delivery attempts is defined as 1 + (the sum of number of
- * NACKs and number of times the acknowledgement deadline has been exceeded
- * for the message).
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
- * client libraries may automatically extend ack_deadlines.
- * This field will be honored on a best effort basis.
- * If this parameter is 0, a default value of 5 is used.
- *
- * Generated from protobuf field int32 max_delivery_attempts = 2;
- * @param int $var
- * @return $this
- */
- public function setMaxDeliveryAttempts($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_delivery_attempts = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRequest.php
deleted file mode 100644
index ff8bdac822d5..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.DeleteSchemaRequest
- */
-class DeleteSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * @param string $name Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`. Please see
- * {@see SchemaServiceClient::schemaName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\DeleteSchemaRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRevisionRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRevisionRequest.php
deleted file mode 100644
index fdb3da46606f..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSchemaRevisionRequest.php
+++ /dev/null
@@ -1,143 +0,0 @@
-google.pubsub.v1.DeleteSchemaRevisionRequest
- */
-class DeleteSchemaRevisionRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the schema revision to be deleted, with a revision ID
- * explicitly included.
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- *
- * Generated from protobuf field string revision_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @deprecated
- */
- protected $revision_id = '';
-
- /**
- * @param string $name Required. The name of the schema revision to be deleted, with a revision ID
- * explicitly included.
- *
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- * Please see {@see SchemaServiceClient::schemaName()} for help formatting this field.
- * @param string $revisionId Optional. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- *
- * @return \Google\Cloud\PubSub\V1\DeleteSchemaRevisionRequest
- *
- * @experimental
- */
- public static function build(string $name, string $revisionId): self
- {
- return (new self())
- ->setName($name)
- ->setRevisionId($revisionId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the schema revision to be deleted, with a revision ID
- * explicitly included.
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- * @type string $revision_id
- * Optional. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the schema revision to be deleted, with a revision ID
- * explicitly included.
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- *
- * 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 schema revision to be deleted, with a revision ID
- * explicitly included.
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- *
- * 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. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- *
- * Generated from protobuf field string revision_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @return string
- * @deprecated
- */
- public function getRevisionId()
- {
- @trigger_error('revision_id is deprecated.', E_USER_DEPRECATED);
- return $this->revision_id;
- }
-
- /**
- * Optional. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- *
- * Generated from protobuf field string revision_id = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- * @deprecated
- */
- public function setRevisionId($var)
- {
- @trigger_error('revision_id is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkString($var, True);
- $this->revision_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSnapshotRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSnapshotRequest.php
deleted file mode 100644
index 3b766a683419..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSnapshotRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.DeleteSnapshotRequest
- */
-class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $snapshot = '';
-
- /**
- * @param string $snapshot Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`. Please see
- * {@see SubscriberClient::snapshotName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\DeleteSnapshotRequest
- *
- * @experimental
- */
- public static function build(string $snapshot): self
- {
- return (new self())
- ->setSnapshot($snapshot);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $snapshot
- * Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSnapshot()
- {
- return $this->snapshot;
- }
-
- /**
- * Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSnapshot($var)
- {
- GPBUtil::checkString($var, True);
- $this->snapshot = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSubscriptionRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSubscriptionRequest.php
deleted file mode 100644
index 9bef784bfab3..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteSubscriptionRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.DeleteSubscriptionRequest
- */
-class DeleteSubscriptionRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
-
- /**
- * @param string $subscription Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\DeleteSubscriptionRequest
- *
- * @experimental
- */
- public static function build(string $subscription): self
- {
- return (new self())
- ->setSubscription($subscription);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteTopicRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteTopicRequest.php
deleted file mode 100644
index bdd8fbafdf8f..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DeleteTopicRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.DeleteTopicRequest
- */
-class DeleteTopicRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
-
- /**
- * @param string $topic Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`. Please see
- * {@see PublisherClient::topicName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\DeleteTopicRequest
- *
- * @experimental
- */
- public static function build(string $topic): self
- {
- return (new self())
- ->setTopic($topic);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $topic
- * Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionRequest.php
deleted file mode 100644
index 4279c67be0e4..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.pubsub.v1.DetachSubscriptionRequest
- */
-class DetachSubscriptionRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription to detach.
- * Format is `projects/{project}/subscriptions/{subscription}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription to detach.
- * Format is `projects/{project}/subscriptions/{subscription}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription to detach.
- * Format is `projects/{project}/subscriptions/{subscription}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription to detach.
- * Format is `projects/{project}/subscriptions/{subscription}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionResponse.php
deleted file mode 100644
index 99d903a39c5d..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/DetachSubscriptionResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.pubsub.v1.DetachSubscriptionResponse
- */
-class DetachSubscriptionResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Encoding.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Encoding.php
deleted file mode 100644
index 44b74224b4ab..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Encoding.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.pubsub.v1.Encoding
- */
-class Encoding
-{
- /**
- * Unspecified
- *
- * Generated from protobuf enum ENCODING_UNSPECIFIED = 0;
- */
- const ENCODING_UNSPECIFIED = 0;
- /**
- * JSON encoding
- *
- * Generated from protobuf enum JSON = 1;
- */
- const JSON = 1;
- /**
- * Binary encoding, as defined by the schema type. For some schema types,
- * binary encoding may not be available.
- *
- * Generated from protobuf enum BINARY = 2;
- */
- const BINARY = 2;
-
- private static $valueToName = [
- self::ENCODING_UNSPECIFIED => 'ENCODING_UNSPECIFIED',
- self::JSON => 'JSON',
- self::BINARY => 'BINARY',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ExpirationPolicy.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ExpirationPolicy.php
deleted file mode 100644
index daf22cfd186a..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ExpirationPolicy.php
+++ /dev/null
@@ -1,98 +0,0 @@
-google.pubsub.v1.ExpirationPolicy
- */
-class ExpirationPolicy extends \Google\Protobuf\Internal\Message
-{
- /**
- * Specifies the "time-to-live" duration for an associated resource. The
- * resource expires if it is not active for a period of `ttl`. The definition
- * of "activity" depends on the type of the associated resource. The minimum
- * and maximum allowed values for `ttl` depend on the type of the associated
- * resource, as well. If `ttl` is not set, the associated resource never
- * expires.
- *
- * Generated from protobuf field .google.protobuf.Duration ttl = 1;
- */
- protected $ttl = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $ttl
- * Specifies the "time-to-live" duration for an associated resource. The
- * resource expires if it is not active for a period of `ttl`. The definition
- * of "activity" depends on the type of the associated resource. The minimum
- * and maximum allowed values for `ttl` depend on the type of the associated
- * resource, as well. If `ttl` is not set, the associated resource never
- * expires.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Specifies the "time-to-live" duration for an associated resource. The
- * resource expires if it is not active for a period of `ttl`. The definition
- * of "activity" depends on the type of the associated resource. The minimum
- * and maximum allowed values for `ttl` depend on the type of the associated
- * resource, as well. If `ttl` is not set, the associated resource never
- * expires.
- *
- * Generated from protobuf field .google.protobuf.Duration ttl = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTtl()
- {
- return $this->ttl;
- }
-
- public function hasTtl()
- {
- return isset($this->ttl);
- }
-
- public function clearTtl()
- {
- unset($this->ttl);
- }
-
- /**
- * Specifies the "time-to-live" duration for an associated resource. The
- * resource expires if it is not active for a period of `ttl`. The definition
- * of "activity" depends on the type of the associated resource. The minimum
- * and maximum allowed values for `ttl` depend on the type of the associated
- * resource, as well. If `ttl` is not set, the associated resource never
- * expires.
- *
- * Generated from protobuf field .google.protobuf.Duration ttl = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTtl($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->ttl = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSchemaRequest.php
deleted file mode 100644
index afbe7ce6056b..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSchemaRequest.php
+++ /dev/null
@@ -1,124 +0,0 @@
-google.pubsub.v1.GetSchemaRequest
- */
-class GetSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the schema to get.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * The set of fields to return in the response. If not set, returns a Schema
- * with all fields filled out. Set to `BASIC` to omit the `definition`.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- */
- protected $view = 0;
-
- /**
- * @param string $name Required. The name of the schema to get.
- * Format is `projects/{project}/schemas/{schema}`. Please see
- * {@see SchemaServiceClient::schemaName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\GetSchemaRequest
- *
- * @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 schema to get.
- * Format is `projects/{project}/schemas/{schema}`.
- * @type int $view
- * The set of fields to return in the response. If not set, returns a Schema
- * with all fields filled out. Set to `BASIC` to omit the `definition`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the schema to get.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * 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 schema to get.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * 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;
- }
-
- /**
- * The set of fields to return in the response. If not set, returns a Schema
- * with all fields filled out. Set to `BASIC` to omit the `definition`.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @return int
- */
- public function getView()
- {
- return $this->view;
- }
-
- /**
- * The set of fields to return in the response. If not set, returns a Schema
- * with all fields filled out. Set to `BASIC` to omit the `definition`.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @param int $var
- * @return $this
- */
- public function setView($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\SchemaView::class);
- $this->view = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSnapshotRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSnapshotRequest.php
deleted file mode 100644
index 55f4ab4e63aa..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSnapshotRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.GetSnapshotRequest
- */
-class GetSnapshotRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $snapshot = '';
-
- /**
- * @param string $snapshot Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`. Please see
- * {@see SubscriberClient::snapshotName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\GetSnapshotRequest
- *
- * @experimental
- */
- public static function build(string $snapshot): self
- {
- return (new self())
- ->setSnapshot($snapshot);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $snapshot
- * Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSnapshot()
- {
- return $this->snapshot;
- }
-
- /**
- * Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSnapshot($var)
- {
- GPBUtil::checkString($var, True);
- $this->snapshot = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSubscriptionRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSubscriptionRequest.php
deleted file mode 100644
index e9a42ecdf588..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetSubscriptionRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.GetSubscriptionRequest
- */
-class GetSubscriptionRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
-
- /**
- * @param string $subscription Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\GetSubscriptionRequest
- *
- * @experimental
- */
- public static function build(string $subscription): self
- {
- return (new self())
- ->setSubscription($subscription);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetTopicRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetTopicRequest.php
deleted file mode 100644
index 0686a920c4eb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/GetTopicRequest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-google.pubsub.v1.GetTopicRequest
- */
-class GetTopicRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
-
- /**
- * @param string $topic Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`. Please see
- * {@see PublisherClient::topicName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\GetTopicRequest
- *
- * @experimental
- */
- public static function build(string $topic): self
- {
- return (new self())
- ->setTopic($topic);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $topic
- * Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsRequest.php
deleted file mode 100644
index b9f24a77534d..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsRequest.php
+++ /dev/null
@@ -1,195 +0,0 @@
-google.pubsub.v1.ListSchemaRevisionsRequest
- */
-class ListSchemaRevisionsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the schema to list revisions for.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- */
- protected $view = 0;
- /**
- * The maximum number of revisions to return per page.
- *
- * Generated from protobuf field int32 page_size = 3;
- */
- protected $page_size = 0;
- /**
- * The page token, received from a previous ListSchemaRevisions call.
- * Provide this to retrieve the subsequent page.
- *
- * Generated from protobuf field string page_token = 4;
- */
- protected $page_token = '';
-
- /**
- * @param string $name Required. The name of the schema to list revisions for. Please see
- * {@see SchemaServiceClient::schemaName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListSchemaRevisionsRequest
- *
- * @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 schema to list revisions for.
- * @type int $view
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- * @type int $page_size
- * The maximum number of revisions to return per page.
- * @type string $page_token
- * The page token, received from a previous ListSchemaRevisions call.
- * Provide this to retrieve the subsequent page.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the schema to list revisions for.
- *
- * 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 schema to list revisions for.
- *
- * 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;
- }
-
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @return int
- */
- public function getView()
- {
- return $this->view;
- }
-
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @param int $var
- * @return $this
- */
- public function setView($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\SchemaView::class);
- $this->view = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of revisions to return per page.
- *
- * Generated from protobuf field int32 page_size = 3;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of revisions to return per page.
- *
- * Generated from protobuf field int32 page_size = 3;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The page token, received from a previous ListSchemaRevisions call.
- * Provide this to retrieve the subsequent page.
- *
- * Generated from protobuf field string page_token = 4;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The page token, received from a previous ListSchemaRevisions call.
- * Provide this to retrieve the subsequent page.
- *
- * Generated from protobuf field string page_token = 4;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsResponse.php
deleted file mode 100644
index 634dc721e15d..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemaRevisionsResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.pubsub.v1.ListSchemaRevisionsResponse
- */
-class ListSchemaRevisionsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The revisions of the schema.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- */
- private $schemas;
- /**
- * A token that can be sent as `page_token` to retrieve the next page.
- * If this field is empty, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas
- * The revisions of the schema.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page.
- * If this field is empty, there are no subsequent pages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The revisions of the schema.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSchemas()
- {
- return $this->schemas;
- }
-
- /**
- * The revisions of the schema.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- * @param array<\Google\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSchemas($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Schema::class);
- $this->schemas = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page.
- * If this field is empty, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page.
- * If this field is empty, there are no subsequent 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasRequest.php
deleted file mode 100644
index 32b97def03fc..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasRequest.php
+++ /dev/null
@@ -1,204 +0,0 @@
-google.pubsub.v1.ListSchemasRequest
- */
-class ListSchemasRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to list schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- */
- protected $view = 0;
- /**
- * Maximum number of schemas to return.
- *
- * Generated from protobuf field int32 page_size = 3;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListSchemasResponse`; indicates that
- * this is a continuation of a prior `ListSchemas` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 4;
- */
- protected $page_token = '';
-
- /**
- * @param string $parent Required. The name of the project in which to list schemas.
- * Format is `projects/{project-id}`. Please see
- * {@see SchemaServiceClient::projectName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListSchemasRequest
- *
- * @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 name of the project in which to list schemas.
- * Format is `projects/{project-id}`.
- * @type int $view
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- * @type int $page_size
- * Maximum number of schemas to return.
- * @type string $page_token
- * The value returned by the last `ListSchemasResponse`; indicates that
- * this is a continuation of a prior `ListSchemas` call, and that the
- * system should return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to list schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The name of the project in which to list schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @return int
- */
- public function getView()
- {
- return $this->view;
- }
-
- /**
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaView view = 2;
- * @param int $var
- * @return $this
- */
- public function setView($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\SchemaView::class);
- $this->view = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of schemas to return.
- *
- * Generated from protobuf field int32 page_size = 3;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of schemas to return.
- *
- * Generated from protobuf field int32 page_size = 3;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListSchemasResponse`; indicates that
- * this is a continuation of a prior `ListSchemas` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 4;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListSchemasResponse`; indicates that
- * this is a continuation of a prior `ListSchemas` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 4;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasResponse.php
deleted file mode 100644
index c61109d326dc..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSchemasResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.pubsub.v1.ListSchemasResponse
- */
-class ListSchemasResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resulting schemas.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- */
- private $schemas;
- /**
- * If not empty, indicates that there may be more schemas that match the
- * request; this value should be passed in a new `ListSchemasRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $schemas
- * The resulting schemas.
- * @type string $next_page_token
- * If not empty, indicates that there may be more schemas that match the
- * request; this value should be passed in a new `ListSchemasRequest`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resulting schemas.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSchemas()
- {
- return $this->schemas;
- }
-
- /**
- * The resulting schemas.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Schema schemas = 1;
- * @param array<\Google\Cloud\PubSub\V1\Schema>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSchemas($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Schema::class);
- $this->schemas = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more schemas that match the
- * request; this value should be passed in a new `ListSchemasRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more schemas that match the
- * request; this value should be passed in a new `ListSchemasRequest`.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsRequest.php
deleted file mode 100644
index 3b8be2c169e8..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsRequest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-google.pubsub.v1.ListSnapshotsRequest
- */
-class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $project = '';
- /**
- * Maximum number of snapshots to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListSnapshotsResponse`; indicates that this
- * is a continuation of a prior `ListSnapshots` call, and that the system
- * should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * @param string $project Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`. Please see
- * {@see SubscriberClient::projectName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListSnapshotsRequest
- *
- * @experimental
- */
- public static function build(string $project): self
- {
- return (new self())
- ->setProject($project);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $project
- * Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`.
- * @type int $page_size
- * Maximum number of snapshots to return.
- * @type string $page_token
- * The value returned by the last `ListSnapshotsResponse`; indicates that this
- * is a continuation of a prior `ListSnapshots` call, and that the system
- * should return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getProject()
- {
- return $this->project;
- }
-
- /**
- * Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setProject($var)
- {
- GPBUtil::checkString($var, True);
- $this->project = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of snapshots to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of snapshots to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListSnapshotsResponse`; indicates that this
- * is a continuation of a prior `ListSnapshots` call, and that the system
- * should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListSnapshotsResponse`; indicates that this
- * is a continuation of a prior `ListSnapshots` call, and that the system
- * should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsResponse.php
deleted file mode 100644
index af71fc22d7ae..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSnapshotsResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.pubsub.v1.ListSnapshotsResponse
- */
-class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resulting snapshots.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Snapshot snapshots = 1;
- */
- private $snapshots;
- /**
- * If not empty, indicates that there may be more snapshot that match the
- * request; this value should be passed in a new `ListSnapshotsRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots
- * The resulting snapshots.
- * @type string $next_page_token
- * If not empty, indicates that there may be more snapshot that match the
- * request; this value should be passed in a new `ListSnapshotsRequest`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resulting snapshots.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Snapshot snapshots = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSnapshots()
- {
- return $this->snapshots;
- }
-
- /**
- * The resulting snapshots.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Snapshot snapshots = 1;
- * @param array<\Google\Cloud\PubSub\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSnapshots($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Snapshot::class);
- $this->snapshots = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more snapshot that match the
- * request; this value should be passed in a new `ListSnapshotsRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more snapshot that match the
- * request; this value should be passed in a new `ListSnapshotsRequest`.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsRequest.php
deleted file mode 100644
index ccabc58e3fff..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsRequest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-google.pubsub.v1.ListSubscriptionsRequest
- */
-class ListSubscriptionsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $project = '';
- /**
- * Maximum number of subscriptions to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListSubscriptionsResponse`; indicates that
- * this is a continuation of a prior `ListSubscriptions` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * @param string $project Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`. Please see
- * {@see SubscriberClient::projectName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListSubscriptionsRequest
- *
- * @experimental
- */
- public static function build(string $project): self
- {
- return (new self())
- ->setProject($project);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $project
- * Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`.
- * @type int $page_size
- * Maximum number of subscriptions to return.
- * @type string $page_token
- * The value returned by the last `ListSubscriptionsResponse`; indicates that
- * this is a continuation of a prior `ListSubscriptions` call, and that the
- * system should return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getProject()
- {
- return $this->project;
- }
-
- /**
- * Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setProject($var)
- {
- GPBUtil::checkString($var, True);
- $this->project = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of subscriptions to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of subscriptions to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListSubscriptionsResponse`; indicates that
- * this is a continuation of a prior `ListSubscriptions` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListSubscriptionsResponse`; indicates that
- * this is a continuation of a prior `ListSubscriptions` call, and that the
- * system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsResponse.php
deleted file mode 100644
index 6ef2cb2e8a5a..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListSubscriptionsResponse.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.pubsub.v1.ListSubscriptionsResponse
- */
-class ListSubscriptionsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The subscriptions that match the request.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Subscription subscriptions = 1;
- */
- private $subscriptions;
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListSubscriptionsRequest` to get more subscriptions.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $subscriptions
- * The subscriptions that match the request.
- * @type string $next_page_token
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListSubscriptionsRequest` to get more subscriptions.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The subscriptions that match the request.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Subscription subscriptions = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSubscriptions()
- {
- return $this->subscriptions;
- }
-
- /**
- * The subscriptions that match the request.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Subscription subscriptions = 1;
- * @param array<\Google\Cloud\PubSub\V1\Subscription>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSubscriptions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Subscription::class);
- $this->subscriptions = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListSubscriptionsRequest` to get more subscriptions.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListSubscriptionsRequest` to get more subscriptions.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsRequest.php
deleted file mode 100644
index b03bca6e3d3a..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsRequest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-google.pubsub.v1.ListTopicSnapshotsRequest
- */
-class ListTopicSnapshotsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
- /**
- * Maximum number of snapshot names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListTopicSnapshotsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSnapshots` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * @param string $topic Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`. Please see
- * {@see PublisherClient::topicName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListTopicSnapshotsRequest
- *
- * @experimental
- */
- public static function build(string $topic): self
- {
- return (new self())
- ->setTopic($topic);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $topic
- * Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- * @type int $page_size
- * Maximum number of snapshot names to return.
- * @type string $page_token
- * The value returned by the last `ListTopicSnapshotsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSnapshots` call, and
- * that the system should return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of snapshot names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of snapshot names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListTopicSnapshotsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSnapshots` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListTopicSnapshotsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSnapshots` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsResponse.php
deleted file mode 100644
index 21821bbbd514..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSnapshotsResponse.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.pubsub.v1.ListTopicSnapshotsResponse
- */
-class ListTopicSnapshotsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The names of the snapshots that match the request.
- *
- * Generated from protobuf field repeated string snapshots = 1;
- */
- private $snapshots;
- /**
- * If not empty, indicates that there may be more snapshots that match
- * the request; this value should be passed in a new
- * `ListTopicSnapshotsRequest` to get more snapshots.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $snapshots
- * The names of the snapshots that match the request.
- * @type string $next_page_token
- * If not empty, indicates that there may be more snapshots that match
- * the request; this value should be passed in a new
- * `ListTopicSnapshotsRequest` to get more snapshots.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The names of the snapshots that match the request.
- *
- * Generated from protobuf field repeated string snapshots = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSnapshots()
- {
- return $this->snapshots;
- }
-
- /**
- * The names of the snapshots that match the request.
- *
- * Generated from protobuf field repeated string snapshots = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSnapshots($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->snapshots = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more snapshots that match
- * the request; this value should be passed in a new
- * `ListTopicSnapshotsRequest` to get more snapshots.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more snapshots that match
- * the request; this value should be passed in a new
- * `ListTopicSnapshotsRequest` to get more snapshots.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsRequest.php
deleted file mode 100644
index cb5aa6970fdb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsRequest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-google.pubsub.v1.ListTopicSubscriptionsRequest
- */
-class ListTopicSubscriptionsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
- /**
- * Maximum number of subscription names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListTopicSubscriptionsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSubscriptions` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * @param string $topic Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`. Please see
- * {@see PublisherClient::topicName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListTopicSubscriptionsRequest
- *
- * @experimental
- */
- public static function build(string $topic): self
- {
- return (new self())
- ->setTopic($topic);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $topic
- * Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- * @type int $page_size
- * Maximum number of subscription names to return.
- * @type string $page_token
- * The value returned by the last `ListTopicSubscriptionsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSubscriptions` call, and
- * that the system should return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of subscription names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of subscription names to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListTopicSubscriptionsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSubscriptions` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListTopicSubscriptionsResponse`; indicates
- * that this is a continuation of a prior `ListTopicSubscriptions` call, and
- * that the system should return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsResponse.php
deleted file mode 100644
index 47aa72345d21..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicSubscriptionsResponse.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.pubsub.v1.ListTopicSubscriptionsResponse
- */
-class ListTopicSubscriptionsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The names of subscriptions attached to the topic specified in the request.
- *
- * Generated from protobuf field repeated string subscriptions = 1 [(.google.api.resource_reference) = {
- */
- private $subscriptions;
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListTopicSubscriptionsRequest` to get more subscriptions.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $subscriptions
- * The names of subscriptions attached to the topic specified in the request.
- * @type string $next_page_token
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListTopicSubscriptionsRequest` to get more subscriptions.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The names of subscriptions attached to the topic specified in the request.
- *
- * Generated from protobuf field repeated string subscriptions = 1 [(.google.api.resource_reference) = {
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSubscriptions()
- {
- return $this->subscriptions;
- }
-
- /**
- * The names of subscriptions attached to the topic specified in the request.
- *
- * Generated from protobuf field repeated string subscriptions = 1 [(.google.api.resource_reference) = {
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSubscriptions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->subscriptions = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListTopicSubscriptionsRequest` to get more subscriptions.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more subscriptions that match
- * the request; this value should be passed in a new
- * `ListTopicSubscriptionsRequest` to get more subscriptions.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsRequest.php
deleted file mode 100644
index 5c2dc76af029..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsRequest.php
+++ /dev/null
@@ -1,162 +0,0 @@
-google.pubsub.v1.ListTopicsRequest
- */
-class ListTopicsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $project = '';
- /**
- * Maximum number of topics to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * The value returned by the last `ListTopicsResponse`; indicates that this is
- * a continuation of a prior `ListTopics` call, and that the system should
- * return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * @param string $project Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`. Please see
- * {@see PublisherClient::projectName()} for help formatting this field.
- *
- * @return \Google\Cloud\PubSub\V1\ListTopicsRequest
- *
- * @experimental
- */
- public static function build(string $project): self
- {
- return (new self())
- ->setProject($project);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $project
- * Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`.
- * @type int $page_size
- * Maximum number of topics to return.
- * @type string $page_token
- * The value returned by the last `ListTopicsResponse`; indicates that this is
- * a continuation of a prior `ListTopics` call, and that the system should
- * return the next page of data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getProject()
- {
- return $this->project;
- }
-
- /**
- * Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setProject($var)
- {
- GPBUtil::checkString($var, True);
- $this->project = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of topics to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Maximum number of topics to return.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * The value returned by the last `ListTopicsResponse`; indicates that this is
- * a continuation of a prior `ListTopics` call, and that the system should
- * return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * The value returned by the last `ListTopicsResponse`; indicates that this is
- * a continuation of a prior `ListTopics` call, and that the system should
- * return the next page of data.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsResponse.php
deleted file mode 100644
index 48b9fcf37c2c..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ListTopicsResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.pubsub.v1.ListTopicsResponse
- */
-class ListTopicsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resulting topics.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Topic topics = 1;
- */
- private $topics;
- /**
- * If not empty, indicates that there may be more topics that match the
- * request; this value should be passed in a new `ListTopicsRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $topics
- * The resulting topics.
- * @type string $next_page_token
- * If not empty, indicates that there may be more topics that match the
- * request; this value should be passed in a new `ListTopicsRequest`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resulting topics.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Topic topics = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTopics()
- {
- return $this->topics;
- }
-
- /**
- * The resulting topics.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.Topic topics = 1;
- * @param array<\Google\Cloud\PubSub\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setTopics($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\Topic::class);
- $this->topics = $arr;
-
- return $this;
- }
-
- /**
- * If not empty, indicates that there may be more topics that match the
- * request; this value should be passed in a new `ListTopicsRequest`.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * If not empty, indicates that there may be more topics that match the
- * request; this value should be passed in a new `ListTopicsRequest`.
- *
- * 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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/MessageStoragePolicy.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/MessageStoragePolicy.php
deleted file mode 100644
index 46d734edd1b4..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/MessageStoragePolicy.php
+++ /dev/null
@@ -1,87 +0,0 @@
-google.pubsub.v1.MessageStoragePolicy
- */
-class MessageStoragePolicy extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of IDs of Google Cloud regions where messages that are published
- * to the topic may be persisted in storage. Messages published by publishers
- * running in non-allowed Google Cloud regions (or running outside of Google
- * Cloud altogether) are routed for storage in one of the allowed regions.
- * An empty list means that no regions are allowed, and is not a valid
- * configuration.
- *
- * Generated from protobuf field repeated string allowed_persistence_regions = 1;
- */
- private $allowed_persistence_regions;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_persistence_regions
- * A list of IDs of Google Cloud regions where messages that are published
- * to the topic may be persisted in storage. Messages published by publishers
- * running in non-allowed Google Cloud regions (or running outside of Google
- * Cloud altogether) are routed for storage in one of the allowed regions.
- * An empty list means that no regions are allowed, and is not a valid
- * configuration.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of IDs of Google Cloud regions where messages that are published
- * to the topic may be persisted in storage. Messages published by publishers
- * running in non-allowed Google Cloud regions (or running outside of Google
- * Cloud altogether) are routed for storage in one of the allowed regions.
- * An empty list means that no regions are allowed, and is not a valid
- * configuration.
- *
- * Generated from protobuf field repeated string allowed_persistence_regions = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAllowedPersistenceRegions()
- {
- return $this->allowed_persistence_regions;
- }
-
- /**
- * A list of IDs of Google Cloud regions where messages that are published
- * to the topic may be persisted in storage. Messages published by publishers
- * running in non-allowed Google Cloud regions (or running outside of Google
- * Cloud altogether) are routed for storage in one of the allowed regions.
- * An empty list means that no regions are allowed, and is not a valid
- * configuration.
- *
- * Generated from protobuf field repeated string allowed_persistence_regions = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAllowedPersistenceRegions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->allowed_persistence_regions = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyAckDeadlineRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyAckDeadlineRequest.php
deleted file mode 100644
index 61ebd653619e..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyAckDeadlineRequest.php
+++ /dev/null
@@ -1,193 +0,0 @@
-google.pubsub.v1.ModifyAckDeadlineRequest
- */
-class ModifyAckDeadlineRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * Required. List of acknowledgment IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];
- */
- private $ack_ids;
- /**
- * Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $ack_deadline_seconds = 0;
-
- /**
- * @param string $subscription Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- * @param string[] $ackIds Required. List of acknowledgment IDs.
- * @param int $ackDeadlineSeconds Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * @return \Google\Cloud\PubSub\V1\ModifyAckDeadlineRequest
- *
- * @experimental
- */
- public static function build(string $subscription, array $ackIds, int $ackDeadlineSeconds): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setAckIds($ackIds)
- ->setAckDeadlineSeconds($ackDeadlineSeconds);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type array|\Google\Protobuf\Internal\RepeatedField $ack_ids
- * Required. List of acknowledgment IDs.
- * @type int $ack_deadline_seconds
- * Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * Required. List of acknowledgment IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAckIds()
- {
- return $this->ack_ids;
- }
-
- /**
- * Required. List of acknowledgment IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getAckDeadlineSeconds()
- {
- return $this->ack_deadline_seconds;
- }
-
- /**
- * Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setAckDeadlineSeconds($var)
- {
- GPBUtil::checkInt32($var);
- $this->ack_deadline_seconds = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyPushConfigRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyPushConfigRequest.php
deleted file mode 100644
index 7a2f636dcaf1..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ModifyPushConfigRequest.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.pubsub.v1.ModifyPushConfigRequest
- */
-class ModifyPushConfigRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * Required. The push configuration for future deliveries.
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $push_config = null;
-
- /**
- * @param string $subscription Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\PushConfig $pushConfig Required. The push configuration for future deliveries.
- *
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- *
- * @return \Google\Cloud\PubSub\V1\ModifyPushConfigRequest
- *
- * @experimental
- */
- public static function build(string $subscription, \Google\Cloud\PubSub\V1\PushConfig $pushConfig): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setPushConfig($pushConfig);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type \Google\Cloud\PubSub\V1\PushConfig $push_config
- * Required. The push configuration for future deliveries.
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * Required. The push configuration for future deliveries.
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\PushConfig|null
- */
- public function getPushConfig()
- {
- return $this->push_config;
- }
-
- public function hasPushConfig()
- {
- return isset($this->push_config);
- }
-
- public function clearPushConfig()
- {
- unset($this->push_config);
- }
-
- /**
- * Required. The push configuration for future deliveries.
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\PushConfig $var
- * @return $this
- */
- public function setPushConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig::class);
- $this->push_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishRequest.php
deleted file mode 100644
index c548ceb7fcb5..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishRequest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-google.pubsub.v1.PublishRequest
- */
-class PublishRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
- /**
- * Required. The messages to publish.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- private $messages;
-
- /**
- * @param string $topic Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`. Please see
- * {@see PublisherClient::topicName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\PubsubMessage[] $messages Required. The messages to publish.
- *
- * @return \Google\Cloud\PubSub\V1\PublishRequest
- *
- * @experimental
- */
- public static function build(string $topic, array $messages): self
- {
- return (new self())
- ->setTopic($topic)
- ->setMessages($messages);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $topic
- * Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`.
- * @type array<\Google\Cloud\PubSub\V1\PubsubMessage>|\Google\Protobuf\Internal\RepeatedField $messages
- * Required. The messages to publish.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`.
- *
- * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * Required. The messages to publish.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMessages()
- {
- return $this->messages;
- }
-
- /**
- * Required. The messages to publish.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param array<\Google\Cloud\PubSub\V1\PubsubMessage>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMessages($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\PubsubMessage::class);
- $this->messages = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishResponse.php
deleted file mode 100644
index cf4a4d2f8cf4..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PublishResponse.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.pubsub.v1.PublishResponse
- */
-class PublishResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The server-assigned ID of each published message, in the same order as
- * the messages in the request. IDs are guaranteed to be unique within
- * the topic.
- *
- * Generated from protobuf field repeated string message_ids = 1;
- */
- private $message_ids;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $message_ids
- * The server-assigned ID of each published message, in the same order as
- * the messages in the request. IDs are guaranteed to be unique within
- * the topic.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The server-assigned ID of each published message, in the same order as
- * the messages in the request. IDs are guaranteed to be unique within
- * the topic.
- *
- * Generated from protobuf field repeated string message_ids = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMessageIds()
- {
- return $this->message_ids;
- }
-
- /**
- * The server-assigned ID of each published message, in the same order as
- * the messages in the request. IDs are guaranteed to be unique within
- * the topic.
- *
- * Generated from protobuf field repeated string message_ids = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMessageIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->message_ids = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PubsubMessage.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PubsubMessage.php
deleted file mode 100644
index b5580021a0ce..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PubsubMessage.php
+++ /dev/null
@@ -1,280 +0,0 @@
-google.pubsub.v1.PubsubMessage
- */
-class PubsubMessage extends \Google\Protobuf\Internal\Message
-{
- /**
- * The message data field. If this field is empty, the message must contain
- * at least one attribute.
- *
- * Generated from protobuf field bytes data = 1;
- */
- protected $data = '';
- /**
- * Attributes for this message. If this field is empty, the message must
- * contain non-empty data. This can be used to filter messages on the
- * subscription.
- *
- * Generated from protobuf field map attributes = 2;
- */
- private $attributes;
- /**
- * ID of this message, assigned by the server when the message is published.
- * Guaranteed to be unique within the topic. This value may be read by a
- * subscriber that receives a `PubsubMessage` via a `Pull` call or a push
- * delivery. It must not be populated by the publisher in a `Publish` call.
- *
- * Generated from protobuf field string message_id = 3;
- */
- protected $message_id = '';
- /**
- * The time at which the message was published, populated by the server when
- * it receives the `Publish` call. It must not be populated by the
- * publisher in a `Publish` call.
- *
- * Generated from protobuf field .google.protobuf.Timestamp publish_time = 4;
- */
- protected $publish_time = null;
- /**
- * If non-empty, identifies related messages for which publish order should be
- * respected. If a `Subscription` has `enable_message_ordering` set to `true`,
- * messages published with the same non-empty `ordering_key` value will be
- * delivered to subscribers in the order in which they are received by the
- * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
- * must specify the same `ordering_key` value.
- * For more information, see [ordering
- * messages](https://cloud.google.com/pubsub/docs/ordering).
- *
- * Generated from protobuf field string ordering_key = 5;
- */
- protected $ordering_key = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $data
- * The message data field. If this field is empty, the message must contain
- * at least one attribute.
- * @type array|\Google\Protobuf\Internal\MapField $attributes
- * Attributes for this message. If this field is empty, the message must
- * contain non-empty data. This can be used to filter messages on the
- * subscription.
- * @type string $message_id
- * ID of this message, assigned by the server when the message is published.
- * Guaranteed to be unique within the topic. This value may be read by a
- * subscriber that receives a `PubsubMessage` via a `Pull` call or a push
- * delivery. It must not be populated by the publisher in a `Publish` call.
- * @type \Google\Protobuf\Timestamp $publish_time
- * The time at which the message was published, populated by the server when
- * it receives the `Publish` call. It must not be populated by the
- * publisher in a `Publish` call.
- * @type string $ordering_key
- * If non-empty, identifies related messages for which publish order should be
- * respected. If a `Subscription` has `enable_message_ordering` set to `true`,
- * messages published with the same non-empty `ordering_key` value will be
- * delivered to subscribers in the order in which they are received by the
- * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
- * must specify the same `ordering_key` value.
- * For more information, see [ordering
- * messages](https://cloud.google.com/pubsub/docs/ordering).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The message data field. If this field is empty, the message must contain
- * at least one attribute.
- *
- * Generated from protobuf field bytes data = 1;
- * @return string
- */
- public function getData()
- {
- return $this->data;
- }
-
- /**
- * The message data field. If this field is empty, the message must contain
- * at least one attribute.
- *
- * Generated from protobuf field bytes data = 1;
- * @param string $var
- * @return $this
- */
- public function setData($var)
- {
- GPBUtil::checkString($var, False);
- $this->data = $var;
-
- return $this;
- }
-
- /**
- * Attributes for this message. If this field is empty, the message must
- * contain non-empty data. This can be used to filter messages on the
- * subscription.
- *
- * Generated from protobuf field map attributes = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
-
- /**
- * Attributes for this message. If this field is empty, the message must
- * contain non-empty data. This can be used to filter messages on the
- * subscription.
- *
- * Generated from protobuf field map attributes = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAttributes($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->attributes = $arr;
-
- return $this;
- }
-
- /**
- * ID of this message, assigned by the server when the message is published.
- * Guaranteed to be unique within the topic. This value may be read by a
- * subscriber that receives a `PubsubMessage` via a `Pull` call or a push
- * delivery. It must not be populated by the publisher in a `Publish` call.
- *
- * Generated from protobuf field string message_id = 3;
- * @return string
- */
- public function getMessageId()
- {
- return $this->message_id;
- }
-
- /**
- * ID of this message, assigned by the server when the message is published.
- * Guaranteed to be unique within the topic. This value may be read by a
- * subscriber that receives a `PubsubMessage` via a `Pull` call or a push
- * delivery. It must not be populated by the publisher in a `Publish` call.
- *
- * Generated from protobuf field string message_id = 3;
- * @param string $var
- * @return $this
- */
- public function setMessageId($var)
- {
- GPBUtil::checkString($var, True);
- $this->message_id = $var;
-
- return $this;
- }
-
- /**
- * The time at which the message was published, populated by the server when
- * it receives the `Publish` call. It must not be populated by the
- * publisher in a `Publish` call.
- *
- * Generated from protobuf field .google.protobuf.Timestamp publish_time = 4;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getPublishTime()
- {
- return $this->publish_time;
- }
-
- public function hasPublishTime()
- {
- return isset($this->publish_time);
- }
-
- public function clearPublishTime()
- {
- unset($this->publish_time);
- }
-
- /**
- * The time at which the message was published, populated by the server when
- * it receives the `Publish` call. It must not be populated by the
- * publisher in a `Publish` call.
- *
- * Generated from protobuf field .google.protobuf.Timestamp publish_time = 4;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setPublishTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->publish_time = $var;
-
- return $this;
- }
-
- /**
- * If non-empty, identifies related messages for which publish order should be
- * respected. If a `Subscription` has `enable_message_ordering` set to `true`,
- * messages published with the same non-empty `ordering_key` value will be
- * delivered to subscribers in the order in which they are received by the
- * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
- * must specify the same `ordering_key` value.
- * For more information, see [ordering
- * messages](https://cloud.google.com/pubsub/docs/ordering).
- *
- * Generated from protobuf field string ordering_key = 5;
- * @return string
- */
- public function getOrderingKey()
- {
- return $this->ordering_key;
- }
-
- /**
- * If non-empty, identifies related messages for which publish order should be
- * respected. If a `Subscription` has `enable_message_ordering` set to `true`,
- * messages published with the same non-empty `ordering_key` value will be
- * delivered to subscribers in the order in which they are received by the
- * Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
- * must specify the same `ordering_key` value.
- * For more information, see [ordering
- * messages](https://cloud.google.com/pubsub/docs/ordering).
- *
- * Generated from protobuf field string ordering_key = 5;
- * @param string $var
- * @return $this
- */
- public function setOrderingKey($var)
- {
- GPBUtil::checkString($var, True);
- $this->ordering_key = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullRequest.php
deleted file mode 100644
index 5d0f8c33aebb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullRequest.php
+++ /dev/null
@@ -1,222 +0,0 @@
-google.pubsub.v1.PullRequest
- */
-class PullRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- *
- * Generated from protobuf field bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @deprecated
- */
- protected $return_immediately = false;
- /**
- * Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- *
- * Generated from protobuf field int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $max_messages = 0;
-
- /**
- * @param string $subscription Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- * @param bool $returnImmediately Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- * @param int $maxMessages Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- *
- * @return \Google\Cloud\PubSub\V1\PullRequest
- *
- * @experimental
- */
- public static function build(string $subscription, bool $returnImmediately, int $maxMessages): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setReturnImmediately($returnImmediately)
- ->setMaxMessages($maxMessages);
- }
-
- /**
- * @param string $subscription Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`. Please see
- * {@see SubscriberClient::subscriptionName()} for help formatting this field.
- * @param int $maxMessages Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- *
- * @return \Google\Cloud\PubSub\V1\PullRequest
- *
- * @experimental
- */
- public static function buildFromSubscriptionMaxMessages(string $subscription, int $maxMessages): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setMaxMessages($maxMessages);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type bool $return_immediately
- * Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- * @type int $max_messages
- * Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- *
- * Generated from protobuf field bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @return bool
- * @deprecated
- */
- public function getReturnImmediately()
- {
- @trigger_error('return_immediately is deprecated.', E_USER_DEPRECATED);
- return $this->return_immediately;
- }
-
- /**
- * Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- *
- * Generated from protobuf field bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @param bool $var
- * @return $this
- * @deprecated
- */
- public function setReturnImmediately($var)
- {
- @trigger_error('return_immediately is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkBool($var);
- $this->return_immediately = $var;
-
- return $this;
- }
-
- /**
- * Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- *
- * Generated from protobuf field int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getMaxMessages()
- {
- return $this->max_messages;
- }
-
- /**
- * Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- *
- * Generated from protobuf field int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setMaxMessages($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_messages = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullResponse.php
deleted file mode 100644
index 46a47253dbb4..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PullResponse.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.pubsub.v1.PullResponse
- */
-class PullResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Received Pub/Sub messages. The list will be empty if there are no more
- * messages available in the backlog, or if no messages could be returned
- * before the request timeout. For JSON, the response can be entirely
- * empty. The Pub/Sub system may return fewer than the `maxMessages` requested
- * even if there are more messages available in the backlog.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- */
- private $received_messages;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\ReceivedMessage>|\Google\Protobuf\Internal\RepeatedField $received_messages
- * Received Pub/Sub messages. The list will be empty if there are no more
- * messages available in the backlog, or if no messages could be returned
- * before the request timeout. For JSON, the response can be entirely
- * empty. The Pub/Sub system may return fewer than the `maxMessages` requested
- * even if there are more messages available in the backlog.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Received Pub/Sub messages. The list will be empty if there are no more
- * messages available in the backlog, or if no messages could be returned
- * before the request timeout. For JSON, the response can be entirely
- * empty. The Pub/Sub system may return fewer than the `maxMessages` requested
- * even if there are more messages available in the backlog.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getReceivedMessages()
- {
- return $this->received_messages;
- }
-
- /**
- * Received Pub/Sub messages. The list will be empty if there are no more
- * messages available in the backlog, or if no messages could be returned
- * before the request timeout. For JSON, the response can be entirely
- * empty. The Pub/Sub system may return fewer than the `maxMessages` requested
- * even if there are more messages available in the backlog.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- * @param array<\Google\Cloud\PubSub\V1\ReceivedMessage>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setReceivedMessages($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\ReceivedMessage::class);
- $this->received_messages = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig.php
deleted file mode 100644
index 503120aa6b7a..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig.php
+++ /dev/null
@@ -1,291 +0,0 @@
-google.pubsub.v1.PushConfig
- */
-class PushConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * A URL locating the endpoint to which messages should be pushed.
- * For example, a Webhook endpoint might use `https://example.com/push`.
- *
- * Generated from protobuf field string push_endpoint = 1;
- */
- protected $push_endpoint = '';
- /**
- * Endpoint configuration attributes that can be used to control different
- * aspects of the message delivery.
- * The only currently supported attribute is `x-goog-version`, which you can
- * use to change the format of the pushed message. This attribute
- * indicates the version of the data expected by the endpoint. This
- * controls the shape of the pushed message (i.e., its fields and metadata).
- * If not present during the `CreateSubscription` call, it will default to
- * the version of the Pub/Sub API used to make such call. If not present in a
- * `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
- * calls will always return a valid version, even if the subscription was
- * created without this attribute.
- * The only supported values for the `x-goog-version` attribute are:
- * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
- * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
- * For example:
- * `attributes { "x-goog-version": "v1" }`
- *
- * Generated from protobuf field map attributes = 2;
- */
- private $attributes;
- protected $authentication_method;
- protected $wrapper;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $push_endpoint
- * A URL locating the endpoint to which messages should be pushed.
- * For example, a Webhook endpoint might use `https://example.com/push`.
- * @type array|\Google\Protobuf\Internal\MapField $attributes
- * Endpoint configuration attributes that can be used to control different
- * aspects of the message delivery.
- * The only currently supported attribute is `x-goog-version`, which you can
- * use to change the format of the pushed message. This attribute
- * indicates the version of the data expected by the endpoint. This
- * controls the shape of the pushed message (i.e., its fields and metadata).
- * If not present during the `CreateSubscription` call, it will default to
- * the version of the Pub/Sub API used to make such call. If not present in a
- * `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
- * calls will always return a valid version, even if the subscription was
- * created without this attribute.
- * The only supported values for the `x-goog-version` attribute are:
- * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
- * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
- * For example:
- * `attributes { "x-goog-version": "v1" }`
- * @type \Google\Cloud\PubSub\V1\PushConfig\OidcToken $oidc_token
- * If specified, Pub/Sub will generate and attach an OIDC JWT token as an
- * `Authorization` header in the HTTP request for every pushed message.
- * @type \Google\Cloud\PubSub\V1\PushConfig\PubsubWrapper $pubsub_wrapper
- * When set, the payload to the push endpoint is in the form of the JSON
- * representation of a PubsubMessage
- * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
- * @type \Google\Cloud\PubSub\V1\PushConfig\NoWrapper $no_wrapper
- * When set, the payload to the push endpoint is not wrapped.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A URL locating the endpoint to which messages should be pushed.
- * For example, a Webhook endpoint might use `https://example.com/push`.
- *
- * Generated from protobuf field string push_endpoint = 1;
- * @return string
- */
- public function getPushEndpoint()
- {
- return $this->push_endpoint;
- }
-
- /**
- * A URL locating the endpoint to which messages should be pushed.
- * For example, a Webhook endpoint might use `https://example.com/push`.
- *
- * Generated from protobuf field string push_endpoint = 1;
- * @param string $var
- * @return $this
- */
- public function setPushEndpoint($var)
- {
- GPBUtil::checkString($var, True);
- $this->push_endpoint = $var;
-
- return $this;
- }
-
- /**
- * Endpoint configuration attributes that can be used to control different
- * aspects of the message delivery.
- * The only currently supported attribute is `x-goog-version`, which you can
- * use to change the format of the pushed message. This attribute
- * indicates the version of the data expected by the endpoint. This
- * controls the shape of the pushed message (i.e., its fields and metadata).
- * If not present during the `CreateSubscription` call, it will default to
- * the version of the Pub/Sub API used to make such call. If not present in a
- * `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
- * calls will always return a valid version, even if the subscription was
- * created without this attribute.
- * The only supported values for the `x-goog-version` attribute are:
- * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
- * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
- * For example:
- * `attributes { "x-goog-version": "v1" }`
- *
- * Generated from protobuf field map attributes = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
-
- /**
- * Endpoint configuration attributes that can be used to control different
- * aspects of the message delivery.
- * The only currently supported attribute is `x-goog-version`, which you can
- * use to change the format of the pushed message. This attribute
- * indicates the version of the data expected by the endpoint. This
- * controls the shape of the pushed message (i.e., its fields and metadata).
- * If not present during the `CreateSubscription` call, it will default to
- * the version of the Pub/Sub API used to make such call. If not present in a
- * `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
- * calls will always return a valid version, even if the subscription was
- * created without this attribute.
- * The only supported values for the `x-goog-version` attribute are:
- * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
- * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
- * For example:
- * `attributes { "x-goog-version": "v1" }`
- *
- * Generated from protobuf field map attributes = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAttributes($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->attributes = $arr;
-
- return $this;
- }
-
- /**
- * If specified, Pub/Sub will generate and attach an OIDC JWT token as an
- * `Authorization` header in the HTTP request for every pushed message.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3;
- * @return \Google\Cloud\PubSub\V1\PushConfig\OidcToken|null
- */
- public function getOidcToken()
- {
- return $this->readOneof(3);
- }
-
- public function hasOidcToken()
- {
- return $this->hasOneof(3);
- }
-
- /**
- * If specified, Pub/Sub will generate and attach an OIDC JWT token as an
- * `Authorization` header in the HTTP request for every pushed message.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.OidcToken oidc_token = 3;
- * @param \Google\Cloud\PubSub\V1\PushConfig\OidcToken $var
- * @return $this
- */
- public function setOidcToken($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig\OidcToken::class);
- $this->writeOneof(3, $var);
-
- return $this;
- }
-
- /**
- * When set, the payload to the push endpoint is in the form of the JSON
- * representation of a PubsubMessage
- * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4;
- * @return \Google\Cloud\PubSub\V1\PushConfig\PubsubWrapper|null
- */
- public function getPubsubWrapper()
- {
- return $this->readOneof(4);
- }
-
- public function hasPubsubWrapper()
- {
- return $this->hasOneof(4);
- }
-
- /**
- * When set, the payload to the push endpoint is in the form of the JSON
- * representation of a PubsubMessage
- * (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.PubsubWrapper pubsub_wrapper = 4;
- * @param \Google\Cloud\PubSub\V1\PushConfig\PubsubWrapper $var
- * @return $this
- */
- public function setPubsubWrapper($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig\PubsubWrapper::class);
- $this->writeOneof(4, $var);
-
- return $this;
- }
-
- /**
- * When set, the payload to the push endpoint is not wrapped.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.NoWrapper no_wrapper = 5;
- * @return \Google\Cloud\PubSub\V1\PushConfig\NoWrapper|null
- */
- public function getNoWrapper()
- {
- return $this->readOneof(5);
- }
-
- public function hasNoWrapper()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * When set, the payload to the push endpoint is not wrapped.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig.NoWrapper no_wrapper = 5;
- * @param \Google\Cloud\PubSub\V1\PushConfig\NoWrapper $var
- * @return $this
- */
- public function setNoWrapper($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig\NoWrapper::class);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getAuthenticationMethod()
- {
- return $this->whichOneof("authentication_method");
- }
-
- /**
- * @return string
- */
- public function getWrapper()
- {
- return $this->whichOneof("wrapper");
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/NoWrapper.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/NoWrapper.php
deleted file mode 100644
index 7bac36ac28cc..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/NoWrapper.php
+++ /dev/null
@@ -1,78 +0,0 @@
-google.pubsub.v1.PushConfig.NoWrapper
- */
-class NoWrapper extends \Google\Protobuf\Internal\Message
-{
- /**
- * When true, writes the Pub/Sub message metadata to
- * `x-goog-pubsub-:` headers of the HTTP request. Writes the
- * Pub/Sub message attributes to `:` headers of the HTTP request.
- *
- * Generated from protobuf field bool write_metadata = 1;
- */
- protected $write_metadata = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $write_metadata
- * When true, writes the Pub/Sub message metadata to
- * `x-goog-pubsub-:` headers of the HTTP request. Writes the
- * Pub/Sub message attributes to `:` headers of the HTTP request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * When true, writes the Pub/Sub message metadata to
- * `x-goog-pubsub-:` headers of the HTTP request. Writes the
- * Pub/Sub message attributes to `:` headers of the HTTP request.
- *
- * Generated from protobuf field bool write_metadata = 1;
- * @return bool
- */
- public function getWriteMetadata()
- {
- return $this->write_metadata;
- }
-
- /**
- * When true, writes the Pub/Sub message metadata to
- * `x-goog-pubsub-:` headers of the HTTP request. Writes the
- * Pub/Sub message attributes to `:` headers of the HTTP request.
- *
- * Generated from protobuf field bool write_metadata = 1;
- * @param bool $var
- * @return $this
- */
- public function setWriteMetadata($var)
- {
- GPBUtil::checkBool($var);
- $this->write_metadata = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(NoWrapper::class, \Google\Cloud\PubSub\V1\PushConfig_NoWrapper::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/OidcToken.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/OidcToken.php
deleted file mode 100644
index 9025928e0f65..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/OidcToken.php
+++ /dev/null
@@ -1,142 +0,0 @@
-google.pubsub.v1.PushConfig.OidcToken
- */
-class OidcToken extends \Google\Protobuf\Internal\Message
-{
- /**
- * [Service account
- * email](https://cloud.google.com/iam/docs/service-accounts)
- * used for generating the OIDC token. For more information
- * on setting up authentication, see
- * [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
- *
- * Generated from protobuf field string service_account_email = 1;
- */
- protected $service_account_email = '';
- /**
- * Audience to be used when generating OIDC token. The audience claim
- * identifies the recipients that the JWT is intended for. The audience
- * value is a single case-sensitive string. Having multiple values (array)
- * for the audience field is not supported. More info about the OIDC JWT
- * token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
- * Note: if not specified, the Push endpoint URL will be used.
- *
- * Generated from protobuf field string audience = 2;
- */
- protected $audience = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service_account_email
- * [Service account
- * email](https://cloud.google.com/iam/docs/service-accounts)
- * used for generating the OIDC token. For more information
- * on setting up authentication, see
- * [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
- * @type string $audience
- * Audience to be used when generating OIDC token. The audience claim
- * identifies the recipients that the JWT is intended for. The audience
- * value is a single case-sensitive string. Having multiple values (array)
- * for the audience field is not supported. More info about the OIDC JWT
- * token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
- * Note: if not specified, the Push endpoint URL will be used.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * [Service account
- * email](https://cloud.google.com/iam/docs/service-accounts)
- * used for generating the OIDC token. For more information
- * on setting up authentication, see
- * [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
- *
- * Generated from protobuf field string service_account_email = 1;
- * @return string
- */
- public function getServiceAccountEmail()
- {
- return $this->service_account_email;
- }
-
- /**
- * [Service account
- * email](https://cloud.google.com/iam/docs/service-accounts)
- * used for generating the OIDC token. For more information
- * on setting up authentication, see
- * [Push subscriptions](https://cloud.google.com/pubsub/docs/push).
- *
- * Generated from protobuf field string service_account_email = 1;
- * @param string $var
- * @return $this
- */
- public function setServiceAccountEmail($var)
- {
- GPBUtil::checkString($var, True);
- $this->service_account_email = $var;
-
- return $this;
- }
-
- /**
- * Audience to be used when generating OIDC token. The audience claim
- * identifies the recipients that the JWT is intended for. The audience
- * value is a single case-sensitive string. Having multiple values (array)
- * for the audience field is not supported. More info about the OIDC JWT
- * token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
- * Note: if not specified, the Push endpoint URL will be used.
- *
- * Generated from protobuf field string audience = 2;
- * @return string
- */
- public function getAudience()
- {
- return $this->audience;
- }
-
- /**
- * Audience to be used when generating OIDC token. The audience claim
- * identifies the recipients that the JWT is intended for. The audience
- * value is a single case-sensitive string. Having multiple values (array)
- * for the audience field is not supported. More info about the OIDC JWT
- * token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
- * Note: if not specified, the Push endpoint URL will be used.
- *
- * Generated from protobuf field string audience = 2;
- * @param string $var
- * @return $this
- */
- public function setAudience($var)
- {
- GPBUtil::checkString($var, True);
- $this->audience = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(OidcToken::class, \Google\Cloud\PubSub\V1\PushConfig_OidcToken::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/PubsubWrapper.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/PubsubWrapper.php
deleted file mode 100644
index 5053bfb85784..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/PushConfig/PubsubWrapper.php
+++ /dev/null
@@ -1,38 +0,0 @@
-google.pubsub.v1.PushConfig.PubsubWrapper
- */
-class PubsubWrapper extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(PubsubWrapper::class, \Google\Cloud\PubSub\V1\PushConfig_PubsubWrapper::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ReceivedMessage.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ReceivedMessage.php
deleted file mode 100644
index 540c79dc7377..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ReceivedMessage.php
+++ /dev/null
@@ -1,189 +0,0 @@
-google.pubsub.v1.ReceivedMessage
- */
-class ReceivedMessage extends \Google\Protobuf\Internal\Message
-{
- /**
- * This ID can be used to acknowledge the received message.
- *
- * Generated from protobuf field string ack_id = 1;
- */
- protected $ack_id = '';
- /**
- * The message.
- *
- * Generated from protobuf field .google.pubsub.v1.PubsubMessage message = 2;
- */
- protected $message = null;
- /**
- * The approximate number of times that Cloud Pub/Sub has attempted to deliver
- * the associated message to a subscriber.
- * More precisely, this is 1 + (number of NACKs) +
- * (number of ack_deadline exceeds) for this message.
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
- * exceeds event is whenever a message is not acknowledged within
- * ack_deadline. Note that ack_deadline is initially
- * Subscription.ackDeadlineSeconds, but may get extended automatically by
- * the client library.
- * Upon the first delivery of a given message, `delivery_attempt` will have a
- * value of 1. The value is calculated at best effort and is approximate.
- * If a DeadLetterPolicy is not set on the subscription, this will be 0.
- *
- * Generated from protobuf field int32 delivery_attempt = 3;
- */
- protected $delivery_attempt = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $ack_id
- * This ID can be used to acknowledge the received message.
- * @type \Google\Cloud\PubSub\V1\PubsubMessage $message
- * The message.
- * @type int $delivery_attempt
- * The approximate number of times that Cloud Pub/Sub has attempted to deliver
- * the associated message to a subscriber.
- * More precisely, this is 1 + (number of NACKs) +
- * (number of ack_deadline exceeds) for this message.
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
- * exceeds event is whenever a message is not acknowledged within
- * ack_deadline. Note that ack_deadline is initially
- * Subscription.ackDeadlineSeconds, but may get extended automatically by
- * the client library.
- * Upon the first delivery of a given message, `delivery_attempt` will have a
- * value of 1. The value is calculated at best effort and is approximate.
- * If a DeadLetterPolicy is not set on the subscription, this will be 0.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * This ID can be used to acknowledge the received message.
- *
- * Generated from protobuf field string ack_id = 1;
- * @return string
- */
- public function getAckId()
- {
- return $this->ack_id;
- }
-
- /**
- * This ID can be used to acknowledge the received message.
- *
- * Generated from protobuf field string ack_id = 1;
- * @param string $var
- * @return $this
- */
- public function setAckId($var)
- {
- GPBUtil::checkString($var, True);
- $this->ack_id = $var;
-
- return $this;
- }
-
- /**
- * The message.
- *
- * Generated from protobuf field .google.pubsub.v1.PubsubMessage message = 2;
- * @return \Google\Cloud\PubSub\V1\PubsubMessage|null
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- public function hasMessage()
- {
- return isset($this->message);
- }
-
- public function clearMessage()
- {
- unset($this->message);
- }
-
- /**
- * The message.
- *
- * Generated from protobuf field .google.pubsub.v1.PubsubMessage message = 2;
- * @param \Google\Cloud\PubSub\V1\PubsubMessage $var
- * @return $this
- */
- public function setMessage($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PubsubMessage::class);
- $this->message = $var;
-
- return $this;
- }
-
- /**
- * The approximate number of times that Cloud Pub/Sub has attempted to deliver
- * the associated message to a subscriber.
- * More precisely, this is 1 + (number of NACKs) +
- * (number of ack_deadline exceeds) for this message.
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
- * exceeds event is whenever a message is not acknowledged within
- * ack_deadline. Note that ack_deadline is initially
- * Subscription.ackDeadlineSeconds, but may get extended automatically by
- * the client library.
- * Upon the first delivery of a given message, `delivery_attempt` will have a
- * value of 1. The value is calculated at best effort and is approximate.
- * If a DeadLetterPolicy is not set on the subscription, this will be 0.
- *
- * Generated from protobuf field int32 delivery_attempt = 3;
- * @return int
- */
- public function getDeliveryAttempt()
- {
- return $this->delivery_attempt;
- }
-
- /**
- * The approximate number of times that Cloud Pub/Sub has attempted to deliver
- * the associated message to a subscriber.
- * More precisely, this is 1 + (number of NACKs) +
- * (number of ack_deadline exceeds) for this message.
- * A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
- * exceeds event is whenever a message is not acknowledged within
- * ack_deadline. Note that ack_deadline is initially
- * Subscription.ackDeadlineSeconds, but may get extended automatically by
- * the client library.
- * Upon the first delivery of a given message, `delivery_attempt` will have a
- * value of 1. The value is calculated at best effort and is approximate.
- * If a DeadLetterPolicy is not set on the subscription, this will be 0.
- *
- * Generated from protobuf field int32 delivery_attempt = 3;
- * @param int $var
- * @return $this
- */
- public function setDeliveryAttempt($var)
- {
- GPBUtil::checkInt32($var);
- $this->delivery_attempt = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RetryPolicy.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RetryPolicy.php
deleted file mode 100644
index 051e84548397..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RetryPolicy.php
+++ /dev/null
@@ -1,136 +0,0 @@
-google.pubsub.v1.RetryPolicy
- */
-class RetryPolicy extends \Google\Protobuf\Internal\Message
-{
- /**
- * The minimum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration minimum_backoff = 1;
- */
- protected $minimum_backoff = null;
- /**
- * The maximum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration maximum_backoff = 2;
- */
- protected $maximum_backoff = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $minimum_backoff
- * The minimum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
- * @type \Google\Protobuf\Duration $maximum_backoff
- * The maximum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The minimum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration minimum_backoff = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getMinimumBackoff()
- {
- return $this->minimum_backoff;
- }
-
- public function hasMinimumBackoff()
- {
- return isset($this->minimum_backoff);
- }
-
- public function clearMinimumBackoff()
- {
- unset($this->minimum_backoff);
- }
-
- /**
- * The minimum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 10 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration minimum_backoff = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMinimumBackoff($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->minimum_backoff = $var;
-
- return $this;
- }
-
- /**
- * The maximum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration maximum_backoff = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getMaximumBackoff()
- {
- return $this->maximum_backoff;
- }
-
- public function hasMaximumBackoff()
- {
- return isset($this->maximum_backoff);
- }
-
- public function clearMaximumBackoff()
- {
- unset($this->maximum_backoff);
- }
-
- /**
- * The maximum delay between consecutive deliveries of a given message.
- * Value should be between 0 and 600 seconds. Defaults to 600 seconds.
- *
- * Generated from protobuf field .google.protobuf.Duration maximum_backoff = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMaximumBackoff($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->maximum_backoff = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RollbackSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RollbackSchemaRequest.php
deleted file mode 100644
index 2bf316de83de..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/RollbackSchemaRequest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-google.pubsub.v1.RollbackSchemaRequest
- */
-class RollbackSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The schema being rolled back with revision id.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- * Example: c7cfa2a8
- *
- * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $revision_id = '';
-
- /**
- * @param string $name Required. The schema being rolled back with revision id. Please see
- * {@see SchemaServiceClient::schemaName()} for help formatting this field.
- * @param string $revisionId Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- *
- * Example: c7cfa2a8
- *
- * @return \Google\Cloud\PubSub\V1\RollbackSchemaRequest
- *
- * @experimental
- */
- public static function build(string $name, string $revisionId): self
- {
- return (new self())
- ->setName($name)
- ->setRevisionId($revisionId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The schema being rolled back with revision id.
- * @type string $revision_id
- * Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- * Example: c7cfa2a8
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The schema being rolled back with revision id.
- *
- * 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 schema being rolled back with revision id.
- *
- * 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;
- }
-
- /**
- * Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- * Example: c7cfa2a8
- *
- * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getRevisionId()
- {
- return $this->revision_id;
- }
-
- /**
- * Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- * Example: c7cfa2a8
- *
- * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setRevisionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->revision_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema.php
deleted file mode 100644
index 9521db88c5ad..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema.php
+++ /dev/null
@@ -1,225 +0,0 @@
-google.pubsub.v1.Schema
- */
-class Schema extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Name of the schema.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $name = '';
- /**
- * The type of the schema definition.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema.Type type = 2;
- */
- protected $type = 0;
- /**
- * The definition of the schema. This should contain a string representing
- * the full definition of the schema that is a valid schema definition of
- * the type specified in `type`.
- *
- * Generated from protobuf field string definition = 3;
- */
- protected $definition = '';
- /**
- * Output only. Immutable. The revision ID of the schema.
- *
- * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $revision_id = '';
- /**
- * Output only. The timestamp that the revision was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $revision_create_time = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. Name of the schema.
- * Format is `projects/{project}/schemas/{schema}`.
- * @type int $type
- * The type of the schema definition.
- * @type string $definition
- * The definition of the schema. This should contain a string representing
- * the full definition of the schema that is a valid schema definition of
- * the type specified in `type`.
- * @type string $revision_id
- * Output only. Immutable. The revision ID of the schema.
- * @type \Google\Protobuf\Timestamp $revision_create_time
- * Output only. The timestamp that the revision was created.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Name of the schema.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. Name of the schema.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The type of the schema definition.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema.Type type = 2;
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * The type of the schema definition.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema.Type type = 2;
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\Schema\Type::class);
- $this->type = $var;
-
- return $this;
- }
-
- /**
- * The definition of the schema. This should contain a string representing
- * the full definition of the schema that is a valid schema definition of
- * the type specified in `type`.
- *
- * Generated from protobuf field string definition = 3;
- * @return string
- */
- public function getDefinition()
- {
- return $this->definition;
- }
-
- /**
- * The definition of the schema. This should contain a string representing
- * the full definition of the schema that is a valid schema definition of
- * the type specified in `type`.
- *
- * Generated from protobuf field string definition = 3;
- * @param string $var
- * @return $this
- */
- public function setDefinition($var)
- {
- GPBUtil::checkString($var, True);
- $this->definition = $var;
-
- return $this;
- }
-
- /**
- * Output only. Immutable. The revision ID of the schema.
- *
- * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getRevisionId()
- {
- return $this->revision_id;
- }
-
- /**
- * Output only. Immutable. The revision ID of the schema.
- *
- * Generated from protobuf field string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setRevisionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->revision_id = $var;
-
- return $this;
- }
-
- /**
- * Output only. The timestamp that the revision was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getRevisionCreateTime()
- {
- return $this->revision_create_time;
- }
-
- public function hasRevisionCreateTime()
- {
- return isset($this->revision_create_time);
- }
-
- public function clearRevisionCreateTime()
- {
- unset($this->revision_create_time);
- }
-
- /**
- * Output only. The timestamp that the revision was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setRevisionCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->revision_create_time = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema/Type.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema/Type.php
deleted file mode 100644
index 31945e1e640b..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Schema/Type.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.pubsub.v1.Schema.Type
- */
-class Type
-{
- /**
- * Default value. This value is unused.
- *
- * Generated from protobuf enum TYPE_UNSPECIFIED = 0;
- */
- const TYPE_UNSPECIFIED = 0;
- /**
- * A Protocol Buffer schema definition.
- *
- * Generated from protobuf enum PROTOCOL_BUFFER = 1;
- */
- const PROTOCOL_BUFFER = 1;
- /**
- * An Avro schema definition.
- *
- * Generated from protobuf enum AVRO = 2;
- */
- const AVRO = 2;
-
- private static $valueToName = [
- self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
- self::PROTOCOL_BUFFER => 'PROTOCOL_BUFFER',
- self::AVRO => 'AVRO',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Type::class, \Google\Cloud\PubSub\V1\Schema_Type::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaSettings.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaSettings.php
deleted file mode 100644
index a0813c8dde51..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaSettings.php
+++ /dev/null
@@ -1,197 +0,0 @@
-google.pubsub.v1.SchemaSettings
- */
-class SchemaSettings extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the schema that messages published should be
- * validated against. Format is `projects/{project}/schemas/{schema}`. The
- * value of this field will be `_deleted-schema_` if the schema has been
- * deleted.
- *
- * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $schema = '';
- /**
- * The encoding of messages validated against `schema`.
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 2;
- */
- protected $encoding = 0;
- /**
- * The minimum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against last_revision or
- * any revision created before.
- *
- * Generated from protobuf field string first_revision_id = 3;
- */
- protected $first_revision_id = '';
- /**
- * The maximum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against first_revision
- * or any revision created after.
- *
- * Generated from protobuf field string last_revision_id = 4;
- */
- protected $last_revision_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $schema
- * Required. The name of the schema that messages published should be
- * validated against. Format is `projects/{project}/schemas/{schema}`. The
- * value of this field will be `_deleted-schema_` if the schema has been
- * deleted.
- * @type int $encoding
- * The encoding of messages validated against `schema`.
- * @type string $first_revision_id
- * The minimum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against last_revision or
- * any revision created before.
- * @type string $last_revision_id
- * The maximum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against first_revision
- * or any revision created after.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the schema that messages published should be
- * validated against. Format is `projects/{project}/schemas/{schema}`. The
- * value of this field will be `_deleted-schema_` if the schema has been
- * deleted.
- *
- * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- /**
- * Required. The name of the schema that messages published should be
- * validated against. Format is `projects/{project}/schemas/{schema}`. The
- * value of this field will be `_deleted-schema_` if the schema has been
- * deleted.
- *
- * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSchema($var)
- {
- GPBUtil::checkString($var, True);
- $this->schema = $var;
-
- return $this;
- }
-
- /**
- * The encoding of messages validated against `schema`.
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 2;
- * @return int
- */
- public function getEncoding()
- {
- return $this->encoding;
- }
-
- /**
- * The encoding of messages validated against `schema`.
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 2;
- * @param int $var
- * @return $this
- */
- public function setEncoding($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\Encoding::class);
- $this->encoding = $var;
-
- return $this;
- }
-
- /**
- * The minimum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against last_revision or
- * any revision created before.
- *
- * Generated from protobuf field string first_revision_id = 3;
- * @return string
- */
- public function getFirstRevisionId()
- {
- return $this->first_revision_id;
- }
-
- /**
- * The minimum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against last_revision or
- * any revision created before.
- *
- * Generated from protobuf field string first_revision_id = 3;
- * @param string $var
- * @return $this
- */
- public function setFirstRevisionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->first_revision_id = $var;
-
- return $this;
- }
-
- /**
- * The maximum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against first_revision
- * or any revision created after.
- *
- * Generated from protobuf field string last_revision_id = 4;
- * @return string
- */
- public function getLastRevisionId()
- {
- return $this->last_revision_id;
- }
-
- /**
- * The maximum (inclusive) revision allowed for validating messages. If empty
- * or not present, allow any revision to be validated against first_revision
- * or any revision created after.
- *
- * Generated from protobuf field string last_revision_id = 4;
- * @param string $var
- * @return $this
- */
- public function setLastRevisionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->last_revision_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaView.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaView.php
deleted file mode 100644
index 5434e27c62b5..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SchemaView.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.pubsub.v1.SchemaView
- */
-class SchemaView
-{
- /**
- * The default / unset value.
- * The API will default to the BASIC view.
- *
- * Generated from protobuf enum SCHEMA_VIEW_UNSPECIFIED = 0;
- */
- const SCHEMA_VIEW_UNSPECIFIED = 0;
- /**
- * Include the name and type of the schema, but not the definition.
- *
- * Generated from protobuf enum BASIC = 1;
- */
- const BASIC = 1;
- /**
- * Include all Schema object fields.
- *
- * Generated from protobuf enum FULL = 2;
- */
- const FULL = 2;
-
- private static $valueToName = [
- self::SCHEMA_VIEW_UNSPECIFIED => 'SCHEMA_VIEW_UNSPECIFIED',
- self::BASIC => 'BASIC',
- self::FULL => 'FULL',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekRequest.php
deleted file mode 100644
index 74c368e7a3f7..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekRequest.php
+++ /dev/null
@@ -1,178 +0,0 @@
-google.pubsub.v1.SeekRequest
- */
-class SeekRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription to affect.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- protected $target;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription to affect.
- * @type \Google\Protobuf\Timestamp $time
- * The time to seek to.
- * Messages retained in the subscription that were published before this
- * time are marked as acknowledged, and messages retained in the
- * subscription that were published after this time are marked as
- * unacknowledged. Note that this operation affects only those messages
- * retained in the subscription (configured by the combination of
- * `message_retention_duration` and `retain_acked_messages`). For example,
- * if `time` corresponds to a point before the message retention
- * window (or to a point before the system's notion of the subscription
- * creation time), only retained messages will be marked as unacknowledged,
- * and already-expunged messages will not be restored.
- * @type string $snapshot
- * The snapshot to seek to. The snapshot's topic must be the same as that of
- * the provided subscription.
- * Format is `projects/{project}/snapshots/{snap}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription to affect.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription to affect.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * The time to seek to.
- * Messages retained in the subscription that were published before this
- * time are marked as acknowledged, and messages retained in the
- * subscription that were published after this time are marked as
- * unacknowledged. Note that this operation affects only those messages
- * retained in the subscription (configured by the combination of
- * `message_retention_duration` and `retain_acked_messages`). For example,
- * if `time` corresponds to a point before the message retention
- * window (or to a point before the system's notion of the subscription
- * creation time), only retained messages will be marked as unacknowledged,
- * and already-expunged messages will not be restored.
- *
- * Generated from protobuf field .google.protobuf.Timestamp time = 2;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getTime()
- {
- return $this->readOneof(2);
- }
-
- public function hasTime()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * The time to seek to.
- * Messages retained in the subscription that were published before this
- * time are marked as acknowledged, and messages retained in the
- * subscription that were published after this time are marked as
- * unacknowledged. Note that this operation affects only those messages
- * retained in the subscription (configured by the combination of
- * `message_retention_duration` and `retain_acked_messages`). For example,
- * if `time` corresponds to a point before the message retention
- * window (or to a point before the system's notion of the subscription
- * creation time), only retained messages will be marked as unacknowledged,
- * and already-expunged messages will not be restored.
- *
- * Generated from protobuf field .google.protobuf.Timestamp time = 2;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * The snapshot to seek to. The snapshot's topic must be the same as that of
- * the provided subscription.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 3 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getSnapshot()
- {
- return $this->readOneof(3);
- }
-
- public function hasSnapshot()
- {
- return $this->hasOneof(3);
- }
-
- /**
- * The snapshot to seek to. The snapshot's topic must be the same as that of
- * the provided subscription.
- * Format is `projects/{project}/snapshots/{snap}`.
- *
- * Generated from protobuf field string snapshot = 3 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSnapshot($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(3, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getTarget()
- {
- return $this->whichOneof("target");
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekResponse.php
deleted file mode 100644
index cf1f98bba3c0..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/SeekResponse.php
+++ /dev/null
@@ -1,33 +0,0 @@
-google.pubsub.v1.SeekResponse
- */
-class SeekResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Snapshot.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Snapshot.php
deleted file mode 100644
index 7fdcd6688fc6..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Snapshot.php
+++ /dev/null
@@ -1,223 +0,0 @@
-google.pubsub.v1.Snapshot
- */
-class Snapshot extends \Google\Protobuf\Internal\Message
-{
- /**
- * The name of the snapshot.
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * The name of the topic from which this snapshot is retaining messages.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.resource_reference) = {
- */
- protected $topic = '';
- /**
- * The snapshot is guaranteed to exist up until this time.
- * A newly-created snapshot expires no later than 7 days from the time of its
- * creation. Its exact lifetime is determined at creation by the existing
- * backlog in the source subscription. Specifically, the lifetime of the
- * snapshot is `7 days - (age of oldest unacked message in the subscription)`.
- * For example, consider a subscription whose oldest unacked message is 3 days
- * old. If a snapshot is created from this subscription, the snapshot -- which
- * will always capture this 3-day-old backlog as long as the snapshot
- * exists -- will expire in 4 days. The service will refuse to create a
- * snapshot that would expire in less than 1 hour after creation.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3;
- */
- protected $expire_time = null;
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 4;
- */
- private $labels;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The name of the snapshot.
- * @type string $topic
- * The name of the topic from which this snapshot is retaining messages.
- * @type \Google\Protobuf\Timestamp $expire_time
- * The snapshot is guaranteed to exist up until this time.
- * A newly-created snapshot expires no later than 7 days from the time of its
- * creation. Its exact lifetime is determined at creation by the existing
- * backlog in the source subscription. Specifically, the lifetime of the
- * snapshot is `7 days - (age of oldest unacked message in the subscription)`.
- * For example, consider a subscription whose oldest unacked message is 3 days
- * old. If a snapshot is created from this subscription, the snapshot -- which
- * will always capture this 3-day-old backlog as long as the snapshot
- * exists -- will expire in 4 days. The service will refuse to create a
- * snapshot that would expire in less than 1 hour after creation.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The name of the snapshot.
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The name of the snapshot.
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The name of the topic from which this snapshot is retaining messages.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * The name of the topic from which this snapshot is retaining messages.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * The snapshot is guaranteed to exist up until this time.
- * A newly-created snapshot expires no later than 7 days from the time of its
- * creation. Its exact lifetime is determined at creation by the existing
- * backlog in the source subscription. Specifically, the lifetime of the
- * snapshot is `7 days - (age of oldest unacked message in the subscription)`.
- * For example, consider a subscription whose oldest unacked message is 3 days
- * old. If a snapshot is created from this subscription, the snapshot -- which
- * will always capture this 3-day-old backlog as long as the snapshot
- * exists -- will expire in 4 days. The service will refuse to create a
- * snapshot that would expire in less than 1 hour after creation.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getExpireTime()
- {
- return $this->expire_time;
- }
-
- public function hasExpireTime()
- {
- return isset($this->expire_time);
- }
-
- public function clearExpireTime()
- {
- unset($this->expire_time);
- }
-
- /**
- * The snapshot is guaranteed to exist up until this time.
- * A newly-created snapshot expires no later than 7 days from the time of its
- * creation. Its exact lifetime is determined at creation by the existing
- * backlog in the source subscription. Specifically, the lifetime of the
- * snapshot is `7 days - (age of oldest unacked message in the subscription)`.
- * For example, consider a subscription whose oldest unacked message is 3 days
- * old. If a snapshot is created from this subscription, the snapshot -- which
- * will always capture this 3-day-old backlog as long as the snapshot
- * exists -- will expire in 4 days. The service will refuse to create a
- * snapshot that would expire in less than 1 hour after creation.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setExpireTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->expire_time = $var;
-
- return $this;
- }
-
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 4;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 4;
- * @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;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullRequest.php
deleted file mode 100644
index c4a8e7d158cb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullRequest.php
+++ /dev/null
@@ -1,487 +0,0 @@
-google.pubsub.v1.StreamingPullRequest
- */
-class StreamingPullRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The subscription for which to initialize the new stream. This
- * must be provided in the first request on the stream, and must not be set in
- * subsequent requests from client to server.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $subscription = '';
- /**
- * List of acknowledgement IDs for acknowledging previously received messages
- * (received on this stream or a different stream). If an ack ID has expired,
- * the corresponding message may be redelivered later. Acknowledging a message
- * more than once will not result in an error. If the acknowledgement ID is
- * malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated string ack_ids = 2;
- */
- private $ack_ids;
- /**
- * The list of new ack deadlines for the IDs listed in
- * `modify_deadline_ack_ids`. The size of this list must be the same as the
- * size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
- * with `INVALID_ARGUMENT`. Each element in this list is applied to the
- * element in the same position in `modify_deadline_ack_ids`. The new ack
- * deadline is with respect to the time this request was sent to the Pub/Sub
- * system. Must be >= 0. For example, if the value is 10, the new ack deadline
- * will expire 10 seconds after this request is received. If the value is 0,
- * the message is immediately made available for another streaming or
- * non-streaming pull request. If the value is < 0 (an error), the stream will
- * be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated int32 modify_deadline_seconds = 3;
- */
- private $modify_deadline_seconds;
- /**
- * List of acknowledgement IDs whose deadline will be modified based on the
- * corresponding element in `modify_deadline_seconds`. This field can be used
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted.
- *
- * Generated from protobuf field repeated string modify_deadline_ack_ids = 4;
- */
- private $modify_deadline_ack_ids;
- /**
- * Required. The ack deadline to use for the stream. This must be provided in
- * the first request on the stream, but it can also be updated on subsequent
- * requests from client to server. The minimum deadline you can specify is 10
- * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $stream_ack_deadline_seconds = 0;
- /**
- * A unique identifier that is used to distinguish client instances from each
- * other. Only needs to be provided on the initial request. When a stream
- * disconnects and reconnects for the same stream, the client_id should be set
- * to the same value so that state associated with the old stream can be
- * transferred to the new stream. The same client_id should not be used for
- * different client instances.
- *
- * Generated from protobuf field string client_id = 6;
- */
- protected $client_id = '';
- /**
- * Flow control settings for the maximum number of outstanding messages. When
- * there are `max_outstanding_messages` or more currently sent to the
- * streaming pull client that have not yet been acked or nacked, the server
- * stops sending more messages. The sending of messages resumes once the
- * number of outstanding messages is less than this value. If the value is
- * <= 0, there is no limit to the number of outstanding messages. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_messages = 7;
- */
- protected $max_outstanding_messages = 0;
- /**
- * Flow control settings for the maximum number of outstanding bytes. When
- * there are `max_outstanding_bytes` or more worth of messages currently sent
- * to the streaming pull client that have not yet been acked or nacked, the
- * server will stop sending more messages. The sending of messages resumes
- * once the number of outstanding bytes is less than this value. If the value
- * is <= 0, there is no limit to the number of outstanding bytes. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_bytes = 8;
- */
- protected $max_outstanding_bytes = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subscription
- * Required. The subscription for which to initialize the new stream. This
- * must be provided in the first request on the stream, and must not be set in
- * subsequent requests from client to server.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @type array|\Google\Protobuf\Internal\RepeatedField $ack_ids
- * List of acknowledgement IDs for acknowledging previously received messages
- * (received on this stream or a different stream). If an ack ID has expired,
- * the corresponding message may be redelivered later. Acknowledging a message
- * more than once will not result in an error. If the acknowledgement ID is
- * malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
- * @type array|\Google\Protobuf\Internal\RepeatedField $modify_deadline_seconds
- * The list of new ack deadlines for the IDs listed in
- * `modify_deadline_ack_ids`. The size of this list must be the same as the
- * size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
- * with `INVALID_ARGUMENT`. Each element in this list is applied to the
- * element in the same position in `modify_deadline_ack_ids`. The new ack
- * deadline is with respect to the time this request was sent to the Pub/Sub
- * system. Must be >= 0. For example, if the value is 10, the new ack deadline
- * will expire 10 seconds after this request is received. If the value is 0,
- * the message is immediately made available for another streaming or
- * non-streaming pull request. If the value is < 0 (an error), the stream will
- * be aborted with status `INVALID_ARGUMENT`.
- * @type array|\Google\Protobuf\Internal\RepeatedField $modify_deadline_ack_ids
- * List of acknowledgement IDs whose deadline will be modified based on the
- * corresponding element in `modify_deadline_seconds`. This field can be used
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted.
- * @type int $stream_ack_deadline_seconds
- * Required. The ack deadline to use for the stream. This must be provided in
- * the first request on the stream, but it can also be updated on subsequent
- * requests from client to server. The minimum deadline you can specify is 10
- * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
- * @type string $client_id
- * A unique identifier that is used to distinguish client instances from each
- * other. Only needs to be provided on the initial request. When a stream
- * disconnects and reconnects for the same stream, the client_id should be set
- * to the same value so that state associated with the old stream can be
- * transferred to the new stream. The same client_id should not be used for
- * different client instances.
- * @type int|string $max_outstanding_messages
- * Flow control settings for the maximum number of outstanding messages. When
- * there are `max_outstanding_messages` or more currently sent to the
- * streaming pull client that have not yet been acked or nacked, the server
- * stops sending more messages. The sending of messages resumes once the
- * number of outstanding messages is less than this value. If the value is
- * <= 0, there is no limit to the number of outstanding messages. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- * @type int|string $max_outstanding_bytes
- * Flow control settings for the maximum number of outstanding bytes. When
- * there are `max_outstanding_bytes` or more worth of messages currently sent
- * to the streaming pull client that have not yet been acked or nacked, the
- * server will stop sending more messages. The sending of messages resumes
- * once the number of outstanding bytes is less than this value. If the value
- * is <= 0, there is no limit to the number of outstanding bytes. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The subscription for which to initialize the new stream. This
- * must be provided in the first request on the stream, and must not be set in
- * subsequent requests from client to server.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- /**
- * Required. The subscription for which to initialize the new stream. This
- * must be provided in the first request on the stream, and must not be set in
- * subsequent requests from client to server.
- * Format is `projects/{project}/subscriptions/{sub}`.
- *
- * Generated from protobuf field string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkString($var, True);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs for acknowledging previously received messages
- * (received on this stream or a different stream). If an ack ID has expired,
- * the corresponding message may be redelivered later. Acknowledging a message
- * more than once will not result in an error. If the acknowledgement ID is
- * malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated string ack_ids = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAckIds()
- {
- return $this->ack_ids;
- }
-
- /**
- * List of acknowledgement IDs for acknowledging previously received messages
- * (received on this stream or a different stream). If an ack ID has expired,
- * the corresponding message may be redelivered later. Acknowledging a message
- * more than once will not result in an error. If the acknowledgement ID is
- * malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated string ack_ids = 2;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * The list of new ack deadlines for the IDs listed in
- * `modify_deadline_ack_ids`. The size of this list must be the same as the
- * size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
- * with `INVALID_ARGUMENT`. Each element in this list is applied to the
- * element in the same position in `modify_deadline_ack_ids`. The new ack
- * deadline is with respect to the time this request was sent to the Pub/Sub
- * system. Must be >= 0. For example, if the value is 10, the new ack deadline
- * will expire 10 seconds after this request is received. If the value is 0,
- * the message is immediately made available for another streaming or
- * non-streaming pull request. If the value is < 0 (an error), the stream will
- * be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated int32 modify_deadline_seconds = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getModifyDeadlineSeconds()
- {
- return $this->modify_deadline_seconds;
- }
-
- /**
- * The list of new ack deadlines for the IDs listed in
- * `modify_deadline_ack_ids`. The size of this list must be the same as the
- * size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
- * with `INVALID_ARGUMENT`. Each element in this list is applied to the
- * element in the same position in `modify_deadline_ack_ids`. The new ack
- * deadline is with respect to the time this request was sent to the Pub/Sub
- * system. Must be >= 0. For example, if the value is 10, the new ack deadline
- * will expire 10 seconds after this request is received. If the value is 0,
- * the message is immediately made available for another streaming or
- * non-streaming pull request. If the value is < 0 (an error), the stream will
- * be aborted with status `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field repeated int32 modify_deadline_seconds = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setModifyDeadlineSeconds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
- $this->modify_deadline_seconds = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs whose deadline will be modified based on the
- * corresponding element in `modify_deadline_seconds`. This field can be used
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted.
- *
- * Generated from protobuf field repeated string modify_deadline_ack_ids = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getModifyDeadlineAckIds()
- {
- return $this->modify_deadline_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs whose deadline will be modified based on the
- * corresponding element in `modify_deadline_seconds`. This field can be used
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted.
- *
- * Generated from protobuf field repeated string modify_deadline_ack_ids = 4;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setModifyDeadlineAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->modify_deadline_ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * Required. The ack deadline to use for the stream. This must be provided in
- * the first request on the stream, but it can also be updated on subsequent
- * requests from client to server. The minimum deadline you can specify is 10
- * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getStreamAckDeadlineSeconds()
- {
- return $this->stream_ack_deadline_seconds;
- }
-
- /**
- * Required. The ack deadline to use for the stream. This must be provided in
- * the first request on the stream, but it can also be updated on subsequent
- * requests from client to server. The minimum deadline you can specify is 10
- * seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
- *
- * Generated from protobuf field int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setStreamAckDeadlineSeconds($var)
- {
- GPBUtil::checkInt32($var);
- $this->stream_ack_deadline_seconds = $var;
-
- return $this;
- }
-
- /**
- * A unique identifier that is used to distinguish client instances from each
- * other. Only needs to be provided on the initial request. When a stream
- * disconnects and reconnects for the same stream, the client_id should be set
- * to the same value so that state associated with the old stream can be
- * transferred to the new stream. The same client_id should not be used for
- * different client instances.
- *
- * Generated from protobuf field string client_id = 6;
- * @return string
- */
- public function getClientId()
- {
- return $this->client_id;
- }
-
- /**
- * A unique identifier that is used to distinguish client instances from each
- * other. Only needs to be provided on the initial request. When a stream
- * disconnects and reconnects for the same stream, the client_id should be set
- * to the same value so that state associated with the old stream can be
- * transferred to the new stream. The same client_id should not be used for
- * different client instances.
- *
- * Generated from protobuf field string client_id = 6;
- * @param string $var
- * @return $this
- */
- public function setClientId($var)
- {
- GPBUtil::checkString($var, True);
- $this->client_id = $var;
-
- return $this;
- }
-
- /**
- * Flow control settings for the maximum number of outstanding messages. When
- * there are `max_outstanding_messages` or more currently sent to the
- * streaming pull client that have not yet been acked or nacked, the server
- * stops sending more messages. The sending of messages resumes once the
- * number of outstanding messages is less than this value. If the value is
- * <= 0, there is no limit to the number of outstanding messages. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_messages = 7;
- * @return int|string
- */
- public function getMaxOutstandingMessages()
- {
- return $this->max_outstanding_messages;
- }
-
- /**
- * Flow control settings for the maximum number of outstanding messages. When
- * there are `max_outstanding_messages` or more currently sent to the
- * streaming pull client that have not yet been acked or nacked, the server
- * stops sending more messages. The sending of messages resumes once the
- * number of outstanding messages is less than this value. If the value is
- * <= 0, there is no limit to the number of outstanding messages. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_messages = 7;
- * @param int|string $var
- * @return $this
- */
- public function setMaxOutstandingMessages($var)
- {
- GPBUtil::checkInt64($var);
- $this->max_outstanding_messages = $var;
-
- return $this;
- }
-
- /**
- * Flow control settings for the maximum number of outstanding bytes. When
- * there are `max_outstanding_bytes` or more worth of messages currently sent
- * to the streaming pull client that have not yet been acked or nacked, the
- * server will stop sending more messages. The sending of messages resumes
- * once the number of outstanding bytes is less than this value. If the value
- * is <= 0, there is no limit to the number of outstanding bytes. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_bytes = 8;
- * @return int|string
- */
- public function getMaxOutstandingBytes()
- {
- return $this->max_outstanding_bytes;
- }
-
- /**
- * Flow control settings for the maximum number of outstanding bytes. When
- * there are `max_outstanding_bytes` or more worth of messages currently sent
- * to the streaming pull client that have not yet been acked or nacked, the
- * server will stop sending more messages. The sending of messages resumes
- * once the number of outstanding bytes is less than this value. If the value
- * is <= 0, there is no limit to the number of outstanding bytes. This
- * property can only be set on the initial StreamingPullRequest. If it is set
- * on a subsequent request, the stream will be aborted with status
- * `INVALID_ARGUMENT`.
- *
- * Generated from protobuf field int64 max_outstanding_bytes = 8;
- * @param int|string $var
- * @return $this
- */
- public function setMaxOutstandingBytes($var)
- {
- GPBUtil::checkInt64($var);
- $this->max_outstanding_bytes = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse.php
deleted file mode 100644
index 43debd8ef90b..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse.php
+++ /dev/null
@@ -1,208 +0,0 @@
-google.pubsub.v1.StreamingPullResponse
- */
-class StreamingPullResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Received Pub/Sub messages. This will not be empty.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- */
- private $received_messages;
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5;
- */
- protected $acknowledge_confirmation = null;
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3;
- */
- protected $modify_ack_deadline_confirmation = null;
- /**
- * Properties associated with this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscription_properties = 4;
- */
- protected $subscription_properties = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\PubSub\V1\ReceivedMessage>|\Google\Protobuf\Internal\RepeatedField $received_messages
- * Received Pub/Sub messages. This will not be empty.
- * @type \Google\Cloud\PubSub\V1\StreamingPullResponse\AcknowledgeConfirmation $acknowledge_confirmation
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- * @type \Google\Cloud\PubSub\V1\StreamingPullResponse\ModifyAckDeadlineConfirmation $modify_ack_deadline_confirmation
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- * @type \Google\Cloud\PubSub\V1\StreamingPullResponse\SubscriptionProperties $subscription_properties
- * Properties associated with this subscription.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Received Pub/Sub messages. This will not be empty.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getReceivedMessages()
- {
- return $this->received_messages;
- }
-
- /**
- * Received Pub/Sub messages. This will not be empty.
- *
- * Generated from protobuf field repeated .google.pubsub.v1.ReceivedMessage received_messages = 1;
- * @param array<\Google\Cloud\PubSub\V1\ReceivedMessage>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setReceivedMessages($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\ReceivedMessage::class);
- $this->received_messages = $arr;
-
- return $this;
- }
-
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5;
- * @return \Google\Cloud\PubSub\V1\StreamingPullResponse\AcknowledgeConfirmation|null
- */
- public function getAcknowledgeConfirmation()
- {
- return $this->acknowledge_confirmation;
- }
-
- public function hasAcknowledgeConfirmation()
- {
- return isset($this->acknowledge_confirmation);
- }
-
- public function clearAcknowledgeConfirmation()
- {
- unset($this->acknowledge_confirmation);
- }
-
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5;
- * @param \Google\Cloud\PubSub\V1\StreamingPullResponse\AcknowledgeConfirmation $var
- * @return $this
- */
- public function setAcknowledgeConfirmation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\StreamingPullResponse\AcknowledgeConfirmation::class);
- $this->acknowledge_confirmation = $var;
-
- return $this;
- }
-
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3;
- * @return \Google\Cloud\PubSub\V1\StreamingPullResponse\ModifyAckDeadlineConfirmation|null
- */
- public function getModifyAckDeadlineConfirmation()
- {
- return $this->modify_ack_deadline_confirmation;
- }
-
- public function hasModifyAckDeadlineConfirmation()
- {
- return isset($this->modify_ack_deadline_confirmation);
- }
-
- public function clearModifyAckDeadlineConfirmation()
- {
- unset($this->modify_ack_deadline_confirmation);
- }
-
- /**
- * This field will only be set if `enable_exactly_once_delivery` is set to
- * `true`.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3;
- * @param \Google\Cloud\PubSub\V1\StreamingPullResponse\ModifyAckDeadlineConfirmation $var
- * @return $this
- */
- public function setModifyAckDeadlineConfirmation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\StreamingPullResponse\ModifyAckDeadlineConfirmation::class);
- $this->modify_ack_deadline_confirmation = $var;
-
- return $this;
- }
-
- /**
- * Properties associated with this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscription_properties = 4;
- * @return \Google\Cloud\PubSub\V1\StreamingPullResponse\SubscriptionProperties|null
- */
- public function getSubscriptionProperties()
- {
- return $this->subscription_properties;
- }
-
- public function hasSubscriptionProperties()
- {
- return isset($this->subscription_properties);
- }
-
- public function clearSubscriptionProperties()
- {
- unset($this->subscription_properties);
- }
-
- /**
- * Properties associated with this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.StreamingPullResponse.SubscriptionProperties subscription_properties = 4;
- * @param \Google\Cloud\PubSub\V1\StreamingPullResponse\SubscriptionProperties $var
- * @return $this
- */
- public function setSubscriptionProperties($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\StreamingPullResponse\SubscriptionProperties::class);
- $this->subscription_properties = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/AcknowledgeConfirmation.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/AcknowledgeConfirmation.php
deleted file mode 100644
index ec8093310006..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/AcknowledgeConfirmation.php
+++ /dev/null
@@ -1,177 +0,0 @@
-google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation
- */
-class AcknowledgeConfirmation extends \Google\Protobuf\Internal\Message
-{
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- */
- private $ack_ids;
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- */
- private $invalid_ack_ids;
- /**
- * List of acknowledgement IDs that were out of order.
- *
- * Generated from protobuf field repeated string unordered_ack_ids = 3;
- */
- private $unordered_ack_ids;
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 4;
- */
- private $temporary_failed_ack_ids;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $ack_ids
- * Successfully processed acknowledgement IDs.
- * @type array|\Google\Protobuf\Internal\RepeatedField $invalid_ack_ids
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unordered_ack_ids
- * List of acknowledgement IDs that were out of order.
- * @type array|\Google\Protobuf\Internal\RepeatedField $temporary_failed_ack_ids
- * List of acknowledgement IDs that failed processing with temporary issues.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAckIds()
- {
- return $this->ack_ids;
- }
-
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getInvalidAckIds()
- {
- return $this->invalid_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setInvalidAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->invalid_ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs that were out of order.
- *
- * Generated from protobuf field repeated string unordered_ack_ids = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnorderedAckIds()
- {
- return $this->unordered_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs that were out of order.
- *
- * Generated from protobuf field repeated string unordered_ack_ids = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnorderedAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unordered_ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 4;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTemporaryFailedAckIds()
- {
- return $this->temporary_failed_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 4;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setTemporaryFailedAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->temporary_failed_ack_ids = $arr;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AcknowledgeConfirmation::class, \Google\Cloud\PubSub\V1\StreamingPullResponse_AcknowledgeConfirmation::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/ModifyAckDeadlineConfirmation.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/ModifyAckDeadlineConfirmation.php
deleted file mode 100644
index c9b64bfca59c..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/ModifyAckDeadlineConfirmation.php
+++ /dev/null
@@ -1,143 +0,0 @@
-google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation
- */
-class ModifyAckDeadlineConfirmation extends \Google\Protobuf\Internal\Message
-{
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- */
- private $ack_ids;
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- */
- private $invalid_ack_ids;
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 3;
- */
- private $temporary_failed_ack_ids;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $ack_ids
- * Successfully processed acknowledgement IDs.
- * @type array|\Google\Protobuf\Internal\RepeatedField $invalid_ack_ids
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- * @type array|\Google\Protobuf\Internal\RepeatedField $temporary_failed_ack_ids
- * List of acknowledgement IDs that failed processing with temporary issues.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAckIds()
- {
- return $this->ack_ids;
- }
-
- /**
- * Successfully processed acknowledgement IDs.
- *
- * Generated from protobuf field repeated string ack_ids = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getInvalidAckIds()
- {
- return $this->invalid_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs that were malformed or whose acknowledgement
- * deadline has expired.
- *
- * Generated from protobuf field repeated string invalid_ack_ids = 2;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setInvalidAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->invalid_ack_ids = $arr;
-
- return $this;
- }
-
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTemporaryFailedAckIds()
- {
- return $this->temporary_failed_ack_ids;
- }
-
- /**
- * List of acknowledgement IDs that failed processing with temporary issues.
- *
- * Generated from protobuf field repeated string temporary_failed_ack_ids = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setTemporaryFailedAckIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->temporary_failed_ack_ids = $arr;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ModifyAckDeadlineConfirmation::class, \Google\Cloud\PubSub\V1\StreamingPullResponse_ModifyAckDeadlineConfirmation::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/SubscriptionProperties.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/SubscriptionProperties.php
deleted file mode 100644
index 23bd4fce0214..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/StreamingPullResponse/SubscriptionProperties.php
+++ /dev/null
@@ -1,104 +0,0 @@
-google.pubsub.v1.StreamingPullResponse.SubscriptionProperties
- */
-class SubscriptionProperties extends \Google\Protobuf\Internal\Message
-{
- /**
- * True iff exactly once delivery is enabled for this subscription.
- *
- * Generated from protobuf field bool exactly_once_delivery_enabled = 1;
- */
- protected $exactly_once_delivery_enabled = false;
- /**
- * True iff message ordering is enabled for this subscription.
- *
- * Generated from protobuf field bool message_ordering_enabled = 2;
- */
- protected $message_ordering_enabled = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $exactly_once_delivery_enabled
- * True iff exactly once delivery is enabled for this subscription.
- * @type bool $message_ordering_enabled
- * True iff message ordering is enabled for this subscription.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * True iff exactly once delivery is enabled for this subscription.
- *
- * Generated from protobuf field bool exactly_once_delivery_enabled = 1;
- * @return bool
- */
- public function getExactlyOnceDeliveryEnabled()
- {
- return $this->exactly_once_delivery_enabled;
- }
-
- /**
- * True iff exactly once delivery is enabled for this subscription.
- *
- * Generated from protobuf field bool exactly_once_delivery_enabled = 1;
- * @param bool $var
- * @return $this
- */
- public function setExactlyOnceDeliveryEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->exactly_once_delivery_enabled = $var;
-
- return $this;
- }
-
- /**
- * True iff message ordering is enabled for this subscription.
- *
- * Generated from protobuf field bool message_ordering_enabled = 2;
- * @return bool
- */
- public function getMessageOrderingEnabled()
- {
- return $this->message_ordering_enabled;
- }
-
- /**
- * True iff message ordering is enabled for this subscription.
- *
- * Generated from protobuf field bool message_ordering_enabled = 2;
- * @param bool $var
- * @return $this
- */
- public function setMessageOrderingEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->message_ordering_enabled = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SubscriptionProperties::class, \Google\Cloud\PubSub\V1\StreamingPullResponse_SubscriptionProperties::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription.php
deleted file mode 100644
index 5a523d0102ad..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription.php
+++ /dev/null
@@ -1,1090 +0,0 @@
-google.pubsub.v1.Subscription
- */
-class Subscription extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $name = '';
- /**
- * Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $topic = '';
- /**
- * If push delivery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 4;
- */
- protected $push_config = null;
- /**
- * If delivery to BigQuery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig bigquery_config = 18;
- */
- protected $bigquery_config = null;
- /**
- * If delivery to Google Cloud Storage is used with this subscription, this
- * field is used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig cloud_storage_config = 22;
- */
- protected $cloud_storage_config = null;
- /**
- * The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 5;
- */
- protected $ack_deadline_seconds = 0;
- /**
- * Indicates whether to retain acknowledged messages. If true, then
- * messages are not expunged from the subscription's backlog, even if they are
- * acknowledged, until they fall out of the `message_retention_duration`
- * window. This must be true if you would like to [`Seek` to a timestamp]
- * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
- * the past to replay previously-acknowledged messages.
- *
- * Generated from protobuf field bool retain_acked_messages = 7;
- */
- protected $retain_acked_messages = false;
- /**
- * How long to retain unacknowledged messages in the subscription's backlog,
- * from the moment a message is published.
- * If `retain_acked_messages` is true, then this also configures the retention
- * of acknowledged messages, and thus configures how far back in time a `Seek`
- * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
- * minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- */
- protected $message_retention_duration = null;
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 9;
- */
- private $labels;
- /**
- * If true, messages published with the same `ordering_key` in `PubsubMessage`
- * will be delivered to the subscribers in the order in which they
- * are received by the Pub/Sub system. Otherwise, they may be delivered in
- * any order.
- *
- * Generated from protobuf field bool enable_message_ordering = 10;
- */
- protected $enable_message_ordering = false;
- /**
- * A policy that specifies the conditions for this subscription's expiration.
- * A subscription is considered active as long as any connected subscriber is
- * successfully consuming messages from the subscription or is issuing
- * operations on the subscription. If `expiration_policy` is not set, a
- * *default policy* with `ttl` of 31 days will be used. The minimum allowed
- * value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
- * but `expiration_policy.ttl` is not set, the subscription never expires.
- *
- * Generated from protobuf field .google.pubsub.v1.ExpirationPolicy expiration_policy = 11;
- */
- protected $expiration_policy = null;
- /**
- * An expression written in the Pub/Sub [filter
- * language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
- * then only `PubsubMessage`s whose `attributes` field matches the filter are
- * delivered on this subscription. If empty, then no messages are filtered
- * out.
- *
- * Generated from protobuf field string filter = 12;
- */
- protected $filter = '';
- /**
- * A policy that specifies the conditions for dead lettering messages in
- * this subscription. If dead_letter_policy is not set, dead lettering
- * is disabled.
- * The Cloud Pub/Sub service account associated with this subscriptions's
- * parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Acknowledge() messages on this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13;
- */
- protected $dead_letter_policy = null;
- /**
- * A policy that specifies how Pub/Sub retries message delivery for this
- * subscription.
- * If not set, the default retry policy is applied. This generally implies
- * that messages will be retried as soon as possible for healthy subscribers.
- * RetryPolicy will be triggered on NACKs or acknowledgement deadline
- * exceeded events for a given message.
- *
- * Generated from protobuf field .google.pubsub.v1.RetryPolicy retry_policy = 14;
- */
- protected $retry_policy = null;
- /**
- * Indicates whether the subscription is detached from its topic. Detached
- * subscriptions don't receive messages from their topic and don't retain any
- * backlog. `Pull` and `StreamingPull` requests will return
- * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
- * the endpoint will not be made.
- *
- * Generated from protobuf field bool detached = 15;
- */
- protected $detached = false;
- /**
- * If true, Pub/Sub provides the following guarantees for the delivery of
- * a message with a given value of `message_id` on this subscription:
- * * The message sent to a subscriber is guaranteed not to be resent
- * before the message's acknowledgement deadline expires.
- * * An acknowledged message will not be resent to a subscriber.
- * Note that subscribers may still receive multiple copies of a message
- * when `enable_exactly_once_delivery` is true if the message was published
- * multiple times by a publisher client. These copies are considered distinct
- * by Pub/Sub and have distinct `message_id` values.
- *
- * Generated from protobuf field bool enable_exactly_once_delivery = 16;
- */
- protected $enable_exactly_once_delivery = false;
- /**
- * Output only. Indicates the minimum duration for which a message is retained
- * after it is published to the subscription's topic. If this field is set,
- * messages published to the subscription's topic in the last
- * `topic_message_retention_duration` are always available to subscribers. See
- * the `message_retention_duration` field in `Topic`. This field is set only
- * in responses from the server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field .google.protobuf.Duration topic_message_retention_duration = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $topic_message_retention_duration = null;
- /**
- * Output only. An output-only field indicating whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
-
- /**
- * @param string $name Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- * @param string $topic Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted. Please see
- * {@see SubscriberClient::topicName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\PushConfig $pushConfig If push delivery is used with this subscription, this field is
- * used to configure it.
- * @param int $ackDeadlineSeconds The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- *
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- *
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- *
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- *
- * @return \Google\Cloud\PubSub\V1\Subscription
- *
- * @experimental
- */
- public static function build(string $name, string $topic, \Google\Cloud\PubSub\V1\PushConfig $pushConfig, int $ackDeadlineSeconds): self
- {
- return (new self())
- ->setName($name)
- ->setTopic($topic)
- ->setPushConfig($pushConfig)
- ->setAckDeadlineSeconds($ackDeadlineSeconds);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- * @type string $topic
- * Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted.
- * @type \Google\Cloud\PubSub\V1\PushConfig $push_config
- * If push delivery is used with this subscription, this field is
- * used to configure it.
- * @type \Google\Cloud\PubSub\V1\BigQueryConfig $bigquery_config
- * If delivery to BigQuery is used with this subscription, this field is
- * used to configure it.
- * @type \Google\Cloud\PubSub\V1\CloudStorageConfig $cloud_storage_config
- * If delivery to Google Cloud Storage is used with this subscription, this
- * field is used to configure it.
- * @type int $ack_deadline_seconds
- * The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- * @type bool $retain_acked_messages
- * Indicates whether to retain acknowledged messages. If true, then
- * messages are not expunged from the subscription's backlog, even if they are
- * acknowledged, until they fall out of the `message_retention_duration`
- * window. This must be true if you would like to [`Seek` to a timestamp]
- * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
- * the past to replay previously-acknowledged messages.
- * @type \Google\Protobuf\Duration $message_retention_duration
- * How long to retain unacknowledged messages in the subscription's backlog,
- * from the moment a message is published.
- * If `retain_acked_messages` is true, then this also configures the retention
- * of acknowledged messages, and thus configures how far back in time a `Seek`
- * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
- * minutes.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- * @type bool $enable_message_ordering
- * If true, messages published with the same `ordering_key` in `PubsubMessage`
- * will be delivered to the subscribers in the order in which they
- * are received by the Pub/Sub system. Otherwise, they may be delivered in
- * any order.
- * @type \Google\Cloud\PubSub\V1\ExpirationPolicy $expiration_policy
- * A policy that specifies the conditions for this subscription's expiration.
- * A subscription is considered active as long as any connected subscriber is
- * successfully consuming messages from the subscription or is issuing
- * operations on the subscription. If `expiration_policy` is not set, a
- * *default policy* with `ttl` of 31 days will be used. The minimum allowed
- * value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
- * but `expiration_policy.ttl` is not set, the subscription never expires.
- * @type string $filter
- * An expression written in the Pub/Sub [filter
- * language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
- * then only `PubsubMessage`s whose `attributes` field matches the filter are
- * delivered on this subscription. If empty, then no messages are filtered
- * out.
- * @type \Google\Cloud\PubSub\V1\DeadLetterPolicy $dead_letter_policy
- * A policy that specifies the conditions for dead lettering messages in
- * this subscription. If dead_letter_policy is not set, dead lettering
- * is disabled.
- * The Cloud Pub/Sub service account associated with this subscriptions's
- * parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Acknowledge() messages on this subscription.
- * @type \Google\Cloud\PubSub\V1\RetryPolicy $retry_policy
- * A policy that specifies how Pub/Sub retries message delivery for this
- * subscription.
- * If not set, the default retry policy is applied. This generally implies
- * that messages will be retried as soon as possible for healthy subscribers.
- * RetryPolicy will be triggered on NACKs or acknowledgement deadline
- * exceeded events for a given message.
- * @type bool $detached
- * Indicates whether the subscription is detached from its topic. Detached
- * subscriptions don't receive messages from their topic and don't retain any
- * backlog. `Pull` and `StreamingPull` requests will return
- * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
- * the endpoint will not be made.
- * @type bool $enable_exactly_once_delivery
- * If true, Pub/Sub provides the following guarantees for the delivery of
- * a message with a given value of `message_id` on this subscription:
- * * The message sent to a subscriber is guaranteed not to be resent
- * before the message's acknowledgement deadline expires.
- * * An acknowledged message will not be resent to a subscriber.
- * Note that subscribers may still receive multiple copies of a message
- * when `enable_exactly_once_delivery` is true if the message was published
- * multiple times by a publisher client. These copies are considered distinct
- * by Pub/Sub and have distinct `message_id` values.
- * @type \Google\Protobuf\Duration $topic_message_retention_duration
- * Output only. Indicates the minimum duration for which a message is retained
- * after it is published to the subscription's topic. If this field is set,
- * messages published to the subscription's topic in the last
- * `topic_message_retention_duration` are always available to subscribers. See
- * the `message_retention_duration` field in `Topic`. This field is set only
- * in responses from the server; it is ignored if it is set in any requests.
- * @type int $state
- * Output only. An output-only field indicating whether or not the
- * subscription can receive messages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- /**
- * Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted.
- *
- * Generated from protobuf field string topic = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * If push delivery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 4;
- * @return \Google\Cloud\PubSub\V1\PushConfig|null
- */
- public function getPushConfig()
- {
- return $this->push_config;
- }
-
- public function hasPushConfig()
- {
- return isset($this->push_config);
- }
-
- public function clearPushConfig()
- {
- unset($this->push_config);
- }
-
- /**
- * If push delivery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.PushConfig push_config = 4;
- * @param \Google\Cloud\PubSub\V1\PushConfig $var
- * @return $this
- */
- public function setPushConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PushConfig::class);
- $this->push_config = $var;
-
- return $this;
- }
-
- /**
- * If delivery to BigQuery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig bigquery_config = 18;
- * @return \Google\Cloud\PubSub\V1\BigQueryConfig|null
- */
- public function getBigqueryConfig()
- {
- return $this->bigquery_config;
- }
-
- public function hasBigqueryConfig()
- {
- return isset($this->bigquery_config);
- }
-
- public function clearBigqueryConfig()
- {
- unset($this->bigquery_config);
- }
-
- /**
- * If delivery to BigQuery is used with this subscription, this field is
- * used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.BigQueryConfig bigquery_config = 18;
- * @param \Google\Cloud\PubSub\V1\BigQueryConfig $var
- * @return $this
- */
- public function setBigqueryConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\BigQueryConfig::class);
- $this->bigquery_config = $var;
-
- return $this;
- }
-
- /**
- * If delivery to Google Cloud Storage is used with this subscription, this
- * field is used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig cloud_storage_config = 22;
- * @return \Google\Cloud\PubSub\V1\CloudStorageConfig|null
- */
- public function getCloudStorageConfig()
- {
- return $this->cloud_storage_config;
- }
-
- public function hasCloudStorageConfig()
- {
- return isset($this->cloud_storage_config);
- }
-
- public function clearCloudStorageConfig()
- {
- unset($this->cloud_storage_config);
- }
-
- /**
- * If delivery to Google Cloud Storage is used with this subscription, this
- * field is used to configure it.
- *
- * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig cloud_storage_config = 22;
- * @param \Google\Cloud\PubSub\V1\CloudStorageConfig $var
- * @return $this
- */
- public function setCloudStorageConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\CloudStorageConfig::class);
- $this->cloud_storage_config = $var;
-
- return $this;
- }
-
- /**
- * The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 5;
- * @return int
- */
- public function getAckDeadlineSeconds()
- {
- return $this->ack_deadline_seconds;
- }
-
- /**
- * The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- *
- * Generated from protobuf field int32 ack_deadline_seconds = 5;
- * @param int $var
- * @return $this
- */
- public function setAckDeadlineSeconds($var)
- {
- GPBUtil::checkInt32($var);
- $this->ack_deadline_seconds = $var;
-
- return $this;
- }
-
- /**
- * Indicates whether to retain acknowledged messages. If true, then
- * messages are not expunged from the subscription's backlog, even if they are
- * acknowledged, until they fall out of the `message_retention_duration`
- * window. This must be true if you would like to [`Seek` to a timestamp]
- * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
- * the past to replay previously-acknowledged messages.
- *
- * Generated from protobuf field bool retain_acked_messages = 7;
- * @return bool
- */
- public function getRetainAckedMessages()
- {
- return $this->retain_acked_messages;
- }
-
- /**
- * Indicates whether to retain acknowledged messages. If true, then
- * messages are not expunged from the subscription's backlog, even if they are
- * acknowledged, until they fall out of the `message_retention_duration`
- * window. This must be true if you would like to [`Seek` to a timestamp]
- * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
- * the past to replay previously-acknowledged messages.
- *
- * Generated from protobuf field bool retain_acked_messages = 7;
- * @param bool $var
- * @return $this
- */
- public function setRetainAckedMessages($var)
- {
- GPBUtil::checkBool($var);
- $this->retain_acked_messages = $var;
-
- return $this;
- }
-
- /**
- * How long to retain unacknowledged messages in the subscription's backlog,
- * from the moment a message is published.
- * If `retain_acked_messages` is true, then this also configures the retention
- * of acknowledged messages, and thus configures how far back in time a `Seek`
- * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
- * minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- * @return \Google\Protobuf\Duration|null
- */
- public function getMessageRetentionDuration()
- {
- return $this->message_retention_duration;
- }
-
- public function hasMessageRetentionDuration()
- {
- return isset($this->message_retention_duration);
- }
-
- public function clearMessageRetentionDuration()
- {
- unset($this->message_retention_duration);
- }
-
- /**
- * How long to retain unacknowledged messages in the subscription's backlog,
- * from the moment a message is published.
- * If `retain_acked_messages` is true, then this also configures the retention
- * of acknowledged messages, and thus configures how far back in time a `Seek`
- * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
- * minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMessageRetentionDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->message_retention_duration = $var;
-
- return $this;
- }
-
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 9;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 9;
- * @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;
- }
-
- /**
- * If true, messages published with the same `ordering_key` in `PubsubMessage`
- * will be delivered to the subscribers in the order in which they
- * are received by the Pub/Sub system. Otherwise, they may be delivered in
- * any order.
- *
- * Generated from protobuf field bool enable_message_ordering = 10;
- * @return bool
- */
- public function getEnableMessageOrdering()
- {
- return $this->enable_message_ordering;
- }
-
- /**
- * If true, messages published with the same `ordering_key` in `PubsubMessage`
- * will be delivered to the subscribers in the order in which they
- * are received by the Pub/Sub system. Otherwise, they may be delivered in
- * any order.
- *
- * Generated from protobuf field bool enable_message_ordering = 10;
- * @param bool $var
- * @return $this
- */
- public function setEnableMessageOrdering($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_message_ordering = $var;
-
- return $this;
- }
-
- /**
- * A policy that specifies the conditions for this subscription's expiration.
- * A subscription is considered active as long as any connected subscriber is
- * successfully consuming messages from the subscription or is issuing
- * operations on the subscription. If `expiration_policy` is not set, a
- * *default policy* with `ttl` of 31 days will be used. The minimum allowed
- * value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
- * but `expiration_policy.ttl` is not set, the subscription never expires.
- *
- * Generated from protobuf field .google.pubsub.v1.ExpirationPolicy expiration_policy = 11;
- * @return \Google\Cloud\PubSub\V1\ExpirationPolicy|null
- */
- public function getExpirationPolicy()
- {
- return $this->expiration_policy;
- }
-
- public function hasExpirationPolicy()
- {
- return isset($this->expiration_policy);
- }
-
- public function clearExpirationPolicy()
- {
- unset($this->expiration_policy);
- }
-
- /**
- * A policy that specifies the conditions for this subscription's expiration.
- * A subscription is considered active as long as any connected subscriber is
- * successfully consuming messages from the subscription or is issuing
- * operations on the subscription. If `expiration_policy` is not set, a
- * *default policy* with `ttl` of 31 days will be used. The minimum allowed
- * value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
- * but `expiration_policy.ttl` is not set, the subscription never expires.
- *
- * Generated from protobuf field .google.pubsub.v1.ExpirationPolicy expiration_policy = 11;
- * @param \Google\Cloud\PubSub\V1\ExpirationPolicy $var
- * @return $this
- */
- public function setExpirationPolicy($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\ExpirationPolicy::class);
- $this->expiration_policy = $var;
-
- return $this;
- }
-
- /**
- * An expression written in the Pub/Sub [filter
- * language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
- * then only `PubsubMessage`s whose `attributes` field matches the filter are
- * delivered on this subscription. If empty, then no messages are filtered
- * out.
- *
- * Generated from protobuf field string filter = 12;
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * An expression written in the Pub/Sub [filter
- * language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
- * then only `PubsubMessage`s whose `attributes` field matches the filter are
- * delivered on this subscription. If empty, then no messages are filtered
- * out.
- *
- * Generated from protobuf field string filter = 12;
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * A policy that specifies the conditions for dead lettering messages in
- * this subscription. If dead_letter_policy is not set, dead lettering
- * is disabled.
- * The Cloud Pub/Sub service account associated with this subscriptions's
- * parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Acknowledge() messages on this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13;
- * @return \Google\Cloud\PubSub\V1\DeadLetterPolicy|null
- */
- public function getDeadLetterPolicy()
- {
- return $this->dead_letter_policy;
- }
-
- public function hasDeadLetterPolicy()
- {
- return isset($this->dead_letter_policy);
- }
-
- public function clearDeadLetterPolicy()
- {
- unset($this->dead_letter_policy);
- }
-
- /**
- * A policy that specifies the conditions for dead lettering messages in
- * this subscription. If dead_letter_policy is not set, dead lettering
- * is disabled.
- * The Cloud Pub/Sub service account associated with this subscriptions's
- * parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Acknowledge() messages on this subscription.
- *
- * Generated from protobuf field .google.pubsub.v1.DeadLetterPolicy dead_letter_policy = 13;
- * @param \Google\Cloud\PubSub\V1\DeadLetterPolicy $var
- * @return $this
- */
- public function setDeadLetterPolicy($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\DeadLetterPolicy::class);
- $this->dead_letter_policy = $var;
-
- return $this;
- }
-
- /**
- * A policy that specifies how Pub/Sub retries message delivery for this
- * subscription.
- * If not set, the default retry policy is applied. This generally implies
- * that messages will be retried as soon as possible for healthy subscribers.
- * RetryPolicy will be triggered on NACKs or acknowledgement deadline
- * exceeded events for a given message.
- *
- * Generated from protobuf field .google.pubsub.v1.RetryPolicy retry_policy = 14;
- * @return \Google\Cloud\PubSub\V1\RetryPolicy|null
- */
- public function getRetryPolicy()
- {
- return $this->retry_policy;
- }
-
- public function hasRetryPolicy()
- {
- return isset($this->retry_policy);
- }
-
- public function clearRetryPolicy()
- {
- unset($this->retry_policy);
- }
-
- /**
- * A policy that specifies how Pub/Sub retries message delivery for this
- * subscription.
- * If not set, the default retry policy is applied. This generally implies
- * that messages will be retried as soon as possible for healthy subscribers.
- * RetryPolicy will be triggered on NACKs or acknowledgement deadline
- * exceeded events for a given message.
- *
- * Generated from protobuf field .google.pubsub.v1.RetryPolicy retry_policy = 14;
- * @param \Google\Cloud\PubSub\V1\RetryPolicy $var
- * @return $this
- */
- public function setRetryPolicy($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\RetryPolicy::class);
- $this->retry_policy = $var;
-
- return $this;
- }
-
- /**
- * Indicates whether the subscription is detached from its topic. Detached
- * subscriptions don't receive messages from their topic and don't retain any
- * backlog. `Pull` and `StreamingPull` requests will return
- * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
- * the endpoint will not be made.
- *
- * Generated from protobuf field bool detached = 15;
- * @return bool
- */
- public function getDetached()
- {
- return $this->detached;
- }
-
- /**
- * Indicates whether the subscription is detached from its topic. Detached
- * subscriptions don't receive messages from their topic and don't retain any
- * backlog. `Pull` and `StreamingPull` requests will return
- * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
- * the endpoint will not be made.
- *
- * Generated from protobuf field bool detached = 15;
- * @param bool $var
- * @return $this
- */
- public function setDetached($var)
- {
- GPBUtil::checkBool($var);
- $this->detached = $var;
-
- return $this;
- }
-
- /**
- * If true, Pub/Sub provides the following guarantees for the delivery of
- * a message with a given value of `message_id` on this subscription:
- * * The message sent to a subscriber is guaranteed not to be resent
- * before the message's acknowledgement deadline expires.
- * * An acknowledged message will not be resent to a subscriber.
- * Note that subscribers may still receive multiple copies of a message
- * when `enable_exactly_once_delivery` is true if the message was published
- * multiple times by a publisher client. These copies are considered distinct
- * by Pub/Sub and have distinct `message_id` values.
- *
- * Generated from protobuf field bool enable_exactly_once_delivery = 16;
- * @return bool
- */
- public function getEnableExactlyOnceDelivery()
- {
- return $this->enable_exactly_once_delivery;
- }
-
- /**
- * If true, Pub/Sub provides the following guarantees for the delivery of
- * a message with a given value of `message_id` on this subscription:
- * * The message sent to a subscriber is guaranteed not to be resent
- * before the message's acknowledgement deadline expires.
- * * An acknowledged message will not be resent to a subscriber.
- * Note that subscribers may still receive multiple copies of a message
- * when `enable_exactly_once_delivery` is true if the message was published
- * multiple times by a publisher client. These copies are considered distinct
- * by Pub/Sub and have distinct `message_id` values.
- *
- * Generated from protobuf field bool enable_exactly_once_delivery = 16;
- * @param bool $var
- * @return $this
- */
- public function setEnableExactlyOnceDelivery($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_exactly_once_delivery = $var;
-
- return $this;
- }
-
- /**
- * Output only. Indicates the minimum duration for which a message is retained
- * after it is published to the subscription's topic. If this field is set,
- * messages published to the subscription's topic in the last
- * `topic_message_retention_duration` are always available to subscribers. See
- * the `message_retention_duration` field in `Topic`. This field is set only
- * in responses from the server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field .google.protobuf.Duration topic_message_retention_duration = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Duration|null
- */
- public function getTopicMessageRetentionDuration()
- {
- return $this->topic_message_retention_duration;
- }
-
- public function hasTopicMessageRetentionDuration()
- {
- return isset($this->topic_message_retention_duration);
- }
-
- public function clearTopicMessageRetentionDuration()
- {
- unset($this->topic_message_retention_duration);
- }
-
- /**
- * Output only. Indicates the minimum duration for which a message is retained
- * after it is published to the subscription's topic. If this field is set,
- * messages published to the subscription's topic in the last
- * `topic_message_retention_duration` are always available to subscribers. See
- * the `message_retention_duration` field in `Topic`. This field is set only
- * in responses from the server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field .google.protobuf.Duration topic_message_retention_duration = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTopicMessageRetentionDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->topic_message_retention_duration = $var;
-
- return $this;
- }
-
- /**
- * Output only. An output-only field indicating whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. An output-only field indicating whether or not the
- * subscription can receive messages.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription.State state = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\Subscription\State::class);
- $this->state = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription/State.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription/State.php
deleted file mode 100644
index 9dd0c05877eb..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Subscription/State.php
+++ /dev/null
@@ -1,66 +0,0 @@
-google.pubsub.v1.Subscription.State
- */
-class State
-{
- /**
- * Default value. This value is unused.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The subscription can actively receive messages
- *
- * Generated from protobuf enum ACTIVE = 1;
- */
- const ACTIVE = 1;
- /**
- * The subscription cannot receive messages because of an error with the
- * resource to which it pushes messages. See the more detailed error state
- * in the corresponding configuration.
- *
- * Generated from protobuf enum RESOURCE_ERROR = 2;
- */
- const RESOURCE_ERROR = 2;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::RESOURCE_ERROR => 'RESOURCE_ERROR',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\PubSub\V1\Subscription_State::class);
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Topic.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Topic.php
deleted file mode 100644
index 9b0556ab8164..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/Topic.php
+++ /dev/null
@@ -1,391 +0,0 @@
-google.pubsub.v1.Topic
- */
-class Topic extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $name = '';
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 2;
- */
- private $labels;
- /**
- * Policy constraining the set of Google Cloud Platform regions where messages
- * published to the topic may be stored. If not present, then no constraints
- * are in effect.
- *
- * Generated from protobuf field .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;
- */
- protected $message_storage_policy = null;
- /**
- * The resource name of the Cloud KMS CryptoKey to be used to protect access
- * to messages published on this topic.
- * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
- *
- * Generated from protobuf field string kms_key_name = 5;
- */
- protected $kms_key_name = '';
- /**
- * Settings for validating messages published against a schema.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaSettings schema_settings = 6;
- */
- protected $schema_settings = null;
- /**
- * Reserved for future use. This field is set only in responses from the
- * server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field bool satisfies_pzs = 7;
- */
- protected $satisfies_pzs = false;
- /**
- * Indicates the minimum duration to retain a message after it is published to
- * the topic. If this field is set, messages published to the topic in the
- * last `message_retention_duration` are always available to subscribers. For
- * instance, it allows any attached subscription to [seek to a
- * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
- * that is up to `message_retention_duration` in the past. If this field is
- * not set, message retention is controlled by settings on individual
- * subscriptions. Cannot be more than 31 days or less than 10 minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- */
- protected $message_retention_duration = null;
-
- /**
- * @param string $name Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- *
- * @return \Google\Cloud\PubSub\V1\Topic
- *
- * @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 topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- * @type \Google\Cloud\PubSub\V1\MessageStoragePolicy $message_storage_policy
- * Policy constraining the set of Google Cloud Platform regions where messages
- * published to the topic may be stored. If not present, then no constraints
- * are in effect.
- * @type string $kms_key_name
- * The resource name of the Cloud KMS CryptoKey to be used to protect access
- * to messages published on this topic.
- * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
- * @type \Google\Cloud\PubSub\V1\SchemaSettings $schema_settings
- * Settings for validating messages published against a schema.
- * @type bool $satisfies_pzs
- * Reserved for future use. This field is set only in responses from the
- * server; it is ignored if it is set in any requests.
- * @type \Google\Protobuf\Duration $message_retention_duration
- * Indicates the minimum duration to retain a message after it is published to
- * the topic. If this field is set, messages published to the topic in the
- * last `message_retention_duration` are always available to subscribers. For
- * instance, it allows any attached subscription to [seek to a
- * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
- * that is up to `message_retention_duration` in the past. If this field is
- * not set, message retention is controlled by settings on individual
- * subscriptions. Cannot be more than 31 days or less than 10 minutes.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- *
- * Generated from protobuf field map labels = 2;
- * @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;
- }
-
- /**
- * Policy constraining the set of Google Cloud Platform regions where messages
- * published to the topic may be stored. If not present, then no constraints
- * are in effect.
- *
- * Generated from protobuf field .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;
- * @return \Google\Cloud\PubSub\V1\MessageStoragePolicy|null
- */
- public function getMessageStoragePolicy()
- {
- return $this->message_storage_policy;
- }
-
- public function hasMessageStoragePolicy()
- {
- return isset($this->message_storage_policy);
- }
-
- public function clearMessageStoragePolicy()
- {
- unset($this->message_storage_policy);
- }
-
- /**
- * Policy constraining the set of Google Cloud Platform regions where messages
- * published to the topic may be stored. If not present, then no constraints
- * are in effect.
- *
- * Generated from protobuf field .google.pubsub.v1.MessageStoragePolicy message_storage_policy = 3;
- * @param \Google\Cloud\PubSub\V1\MessageStoragePolicy $var
- * @return $this
- */
- public function setMessageStoragePolicy($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\MessageStoragePolicy::class);
- $this->message_storage_policy = $var;
-
- return $this;
- }
-
- /**
- * The resource name of the Cloud KMS CryptoKey to be used to protect access
- * to messages published on this topic.
- * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
- *
- * Generated from protobuf field string kms_key_name = 5;
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * The resource name of the Cloud KMS CryptoKey to be used to protect access
- * to messages published on this topic.
- * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
- *
- * Generated from protobuf field string kms_key_name = 5;
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * Settings for validating messages published against a schema.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaSettings schema_settings = 6;
- * @return \Google\Cloud\PubSub\V1\SchemaSettings|null
- */
- public function getSchemaSettings()
- {
- return $this->schema_settings;
- }
-
- public function hasSchemaSettings()
- {
- return isset($this->schema_settings);
- }
-
- public function clearSchemaSettings()
- {
- unset($this->schema_settings);
- }
-
- /**
- * Settings for validating messages published against a schema.
- *
- * Generated from protobuf field .google.pubsub.v1.SchemaSettings schema_settings = 6;
- * @param \Google\Cloud\PubSub\V1\SchemaSettings $var
- * @return $this
- */
- public function setSchemaSettings($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\SchemaSettings::class);
- $this->schema_settings = $var;
-
- return $this;
- }
-
- /**
- * Reserved for future use. This field is set only in responses from the
- * server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field bool satisfies_pzs = 7;
- * @return bool
- */
- public function getSatisfiesPzs()
- {
- return $this->satisfies_pzs;
- }
-
- /**
- * Reserved for future use. This field is set only in responses from the
- * server; it is ignored if it is set in any requests.
- *
- * Generated from protobuf field bool satisfies_pzs = 7;
- * @param bool $var
- * @return $this
- */
- public function setSatisfiesPzs($var)
- {
- GPBUtil::checkBool($var);
- $this->satisfies_pzs = $var;
-
- return $this;
- }
-
- /**
- * Indicates the minimum duration to retain a message after it is published to
- * the topic. If this field is set, messages published to the topic in the
- * last `message_retention_duration` are always available to subscribers. For
- * instance, it allows any attached subscription to [seek to a
- * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
- * that is up to `message_retention_duration` in the past. If this field is
- * not set, message retention is controlled by settings on individual
- * subscriptions. Cannot be more than 31 days or less than 10 minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- * @return \Google\Protobuf\Duration|null
- */
- public function getMessageRetentionDuration()
- {
- return $this->message_retention_duration;
- }
-
- public function hasMessageRetentionDuration()
- {
- return isset($this->message_retention_duration);
- }
-
- public function clearMessageRetentionDuration()
- {
- unset($this->message_retention_duration);
- }
-
- /**
- * Indicates the minimum duration to retain a message after it is published to
- * the topic. If this field is set, messages published to the topic in the
- * last `message_retention_duration` are always available to subscribers. For
- * instance, it allows any attached subscription to [seek to a
- * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
- * that is up to `message_retention_duration` in the past. If this field is
- * not set, message retention is controlled by settings on individual
- * subscriptions. Cannot be more than 31 days or less than 10 minutes.
- *
- * Generated from protobuf field .google.protobuf.Duration message_retention_duration = 8;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMessageRetentionDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->message_retention_duration = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSnapshotRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSnapshotRequest.php
deleted file mode 100644
index aa2378043b3f..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSnapshotRequest.php
+++ /dev/null
@@ -1,141 +0,0 @@
-google.pubsub.v1.UpdateSnapshotRequest
- */
-class UpdateSnapshotRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The updated snapshot object.
- *
- * Generated from protobuf field .google.pubsub.v1.Snapshot snapshot = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $snapshot = null;
- /**
- * Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
-
- /**
- * @param \Google\Cloud\PubSub\V1\Snapshot $snapshot Required. The updated snapshot object.
- * @param \Google\Protobuf\FieldMask $updateMask Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- *
- * @return \Google\Cloud\PubSub\V1\UpdateSnapshotRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\PubSub\V1\Snapshot $snapshot, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setSnapshot($snapshot)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\PubSub\V1\Snapshot $snapshot
- * Required. The updated snapshot object.
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The updated snapshot object.
- *
- * Generated from protobuf field .google.pubsub.v1.Snapshot snapshot = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Snapshot|null
- */
- public function getSnapshot()
- {
- return $this->snapshot;
- }
-
- public function hasSnapshot()
- {
- return isset($this->snapshot);
- }
-
- public function clearSnapshot()
- {
- unset($this->snapshot);
- }
-
- /**
- * Required. The updated snapshot object.
- *
- * Generated from protobuf field .google.pubsub.v1.Snapshot snapshot = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Snapshot $var
- * @return $this
- */
- public function setSnapshot($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Snapshot::class);
- $this->snapshot = $var;
-
- return $this;
- }
-
- /**
- * Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @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);
- }
-
- /**
- * Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSubscriptionRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSubscriptionRequest.php
deleted file mode 100644
index d64008746353..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateSubscriptionRequest.php
+++ /dev/null
@@ -1,141 +0,0 @@
-google.pubsub.v1.UpdateSubscriptionRequest
- */
-class UpdateSubscriptionRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The updated subscription object.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription subscription = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $subscription = null;
- /**
- * Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
-
- /**
- * @param \Google\Cloud\PubSub\V1\Subscription $subscription Required. The updated subscription object.
- * @param \Google\Protobuf\FieldMask $updateMask Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- *
- * @return \Google\Cloud\PubSub\V1\UpdateSubscriptionRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\PubSub\V1\Subscription $subscription, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setSubscription($subscription)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\PubSub\V1\Subscription $subscription
- * Required. The updated subscription object.
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The updated subscription object.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription subscription = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Subscription|null
- */
- public function getSubscription()
- {
- return $this->subscription;
- }
-
- public function hasSubscription()
- {
- return isset($this->subscription);
- }
-
- public function clearSubscription()
- {
- unset($this->subscription);
- }
-
- /**
- * Required. The updated subscription object.
- *
- * Generated from protobuf field .google.pubsub.v1.Subscription subscription = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Subscription $var
- * @return $this
- */
- public function setSubscription($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Subscription::class);
- $this->subscription = $var;
-
- return $this;
- }
-
- /**
- * Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @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);
- }
-
- /**
- * Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateTopicRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateTopicRequest.php
deleted file mode 100644
index 1a09ea4292aa..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/UpdateTopicRequest.php
+++ /dev/null
@@ -1,156 +0,0 @@
-google.pubsub.v1.UpdateTopicRequest
- */
-class UpdateTopicRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The updated topic object.
- *
- * Generated from protobuf field .google.pubsub.v1.Topic topic = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $topic = null;
- /**
- * Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
-
- /**
- * @param \Google\Cloud\PubSub\V1\Topic $topic Required. The updated topic object.
- * @param \Google\Protobuf\FieldMask $updateMask Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- *
- * @return \Google\Cloud\PubSub\V1\UpdateTopicRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\PubSub\V1\Topic $topic, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setTopic($topic)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\PubSub\V1\Topic $topic
- * Required. The updated topic object.
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The updated topic object.
- *
- * Generated from protobuf field .google.pubsub.v1.Topic topic = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Topic|null
- */
- public function getTopic()
- {
- return $this->topic;
- }
-
- public function hasTopic()
- {
- return isset($this->topic);
- }
-
- public function clearTopic()
- {
- unset($this->topic);
- }
-
- /**
- * Required. The updated topic object.
- *
- * Generated from protobuf field .google.pubsub.v1.Topic topic = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Topic $var
- * @return $this
- */
- public function setTopic($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Topic::class);
- $this->topic = $var;
-
- return $this;
- }
-
- /**
- * Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @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);
- }
-
- /**
- * Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageRequest.php
deleted file mode 100644
index cc85b3a7abd4..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageRequest.php
+++ /dev/null
@@ -1,217 +0,0 @@
-google.pubsub.v1.ValidateMessageRequest
- */
-class ValidateMessageRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Message to validate against the provided `schema_spec`.
- *
- * Generated from protobuf field bytes message = 4;
- */
- protected $message = '';
- /**
- * The encoding expected for messages
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 5;
- */
- protected $encoding = 0;
- protected $schema_spec;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- * @type string $name
- * Name of the schema against which to validate.
- * Format is `projects/{project}/schemas/{schema}`.
- * @type \Google\Cloud\PubSub\V1\Schema $schema
- * Ad-hoc schema against which to validate
- * @type string $message
- * Message to validate against the provided `schema_spec`.
- * @type int $encoding
- * The encoding expected for messages
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Name of the schema against which to validate.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->readOneof(2);
- }
-
- public function hasName()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * Name of the schema against which to validate.
- * Format is `projects/{project}/schemas/{schema}`.
- *
- * Generated from protobuf field string name = 2 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Ad-hoc schema against which to validate
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 3;
- * @return \Google\Cloud\PubSub\V1\Schema|null
- */
- public function getSchema()
- {
- return $this->readOneof(3);
- }
-
- public function hasSchema()
- {
- return $this->hasOneof(3);
- }
-
- /**
- * Ad-hoc schema against which to validate
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 3;
- * @param \Google\Cloud\PubSub\V1\Schema $var
- * @return $this
- */
- public function setSchema($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Schema::class);
- $this->writeOneof(3, $var);
-
- return $this;
- }
-
- /**
- * Message to validate against the provided `schema_spec`.
- *
- * Generated from protobuf field bytes message = 4;
- * @return string
- */
- public function getMessage()
- {
- return $this->message;
- }
-
- /**
- * Message to validate against the provided `schema_spec`.
- *
- * Generated from protobuf field bytes message = 4;
- * @param string $var
- * @return $this
- */
- public function setMessage($var)
- {
- GPBUtil::checkString($var, False);
- $this->message = $var;
-
- return $this;
- }
-
- /**
- * The encoding expected for messages
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 5;
- * @return int
- */
- public function getEncoding()
- {
- return $this->encoding;
- }
-
- /**
- * The encoding expected for messages
- *
- * Generated from protobuf field .google.pubsub.v1.Encoding encoding = 5;
- * @param int $var
- * @return $this
- */
- public function setEncoding($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\PubSub\V1\Encoding::class);
- $this->encoding = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getSchemaSpec()
- {
- return $this->whichOneof("schema_spec");
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageResponse.php
deleted file mode 100644
index 3447bdcc8e1d..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateMessageResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.pubsub.v1.ValidateMessageResponse
- */
-class ValidateMessageResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaRequest.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaRequest.php
deleted file mode 100644
index 25fd4f172a70..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaRequest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-google.pubsub.v1.ValidateSchemaRequest
- */
-class ValidateSchemaRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The schema object to validate.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $schema = null;
-
- /**
- * @param string $parent Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`. Please see
- * {@see SchemaServiceClient::projectName()} for help formatting this field.
- * @param \Google\Cloud\PubSub\V1\Schema $schema Required. The schema object to validate.
- *
- * @return \Google\Cloud\PubSub\V1\ValidateSchemaRequest
- *
- * @experimental
- */
- public static function build(string $parent, \Google\Cloud\PubSub\V1\Schema $schema): self
- {
- return (new self())
- ->setParent($parent)
- ->setSchema($schema);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- * @type \Google\Cloud\PubSub\V1\Schema $schema
- * Required. The schema object to validate.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The schema object to validate.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\PubSub\V1\Schema|null
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- public function hasSchema()
- {
- return isset($this->schema);
- }
-
- public function clearSchema()
- {
- unset($this->schema);
- }
-
- /**
- * Required. The schema object to validate.
- *
- * Generated from protobuf field .google.pubsub.v1.Schema schema = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\PubSub\V1\Schema $var
- * @return $this
- */
- public function setSchema($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\Schema::class);
- $this->schema = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaResponse.php b/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaResponse.php
deleted file mode 100644
index 777511b5f987..000000000000
--- a/owl-bot-staging/PubSub/v1/proto/src/Google/Cloud/PubSub/V1/ValidateSchemaResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.pubsub.v1.ValidateSchemaResponse
- */
-class ValidateSchemaResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Pubsub\V1\Schema::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/create_topic.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/create_topic.php
deleted file mode 100644
index 6847c3e13f05..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/create_topic.php
+++ /dev/null
@@ -1,71 +0,0 @@
-createTopic($name);
- 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
-{
- $name = '[NAME]';
-
- create_topic_sample($name);
-}
-// [END pubsub_v1_generated_Publisher_CreateTopic_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/delete_topic.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/delete_topic.php
deleted file mode 100644
index 8f9410374f78..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/delete_topic.php
+++ /dev/null
@@ -1,69 +0,0 @@
-deleteTopic($formattedTopic);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedTopic = PublisherClient::topicName('[PROJECT]', '[TOPIC]');
-
- delete_topic_sample($formattedTopic);
-}
-// [END pubsub_v1_generated_Publisher_DeleteTopic_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/detach_subscription.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/detach_subscription.php
deleted file mode 100644
index 59ccbc05e06d..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/detach_subscription.php
+++ /dev/null
@@ -1,70 +0,0 @@
-detachSubscription($formattedSubscription);
- 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
-{
- $formattedSubscription = PublisherClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- detach_subscription_sample($formattedSubscription);
-}
-// [END pubsub_v1_generated_Publisher_DetachSubscription_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_iam_policy.php
deleted file mode 100644
index ffab29580e25..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_iam_policy.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getIamPolicy($resource);
- 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
-{
- $resource = '[RESOURCE]';
-
- get_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_Publisher_GetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_topic.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_topic.php
deleted file mode 100644
index 6ed747b80ab9..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/get_topic.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getTopic($formattedTopic);
- 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
-{
- $formattedTopic = PublisherClient::topicName('[PROJECT]', '[TOPIC]');
-
- get_topic_sample($formattedTopic);
-}
-// [END pubsub_v1_generated_Publisher_GetTopic_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_snapshots.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_snapshots.php
deleted file mode 100644
index 49422b92a803..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_snapshots.php
+++ /dev/null
@@ -1,75 +0,0 @@
-listTopicSnapshots($formattedTopic);
-
- /** @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
-{
- $formattedTopic = PublisherClient::topicName('[PROJECT]', '[TOPIC]');
-
- list_topic_snapshots_sample($formattedTopic);
-}
-// [END pubsub_v1_generated_Publisher_ListTopicSnapshots_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_subscriptions.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_subscriptions.php
deleted file mode 100644
index 038ba270910a..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topic_subscriptions.php
+++ /dev/null
@@ -1,71 +0,0 @@
-listTopicSubscriptions($formattedTopic);
-
- /** @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
-{
- $formattedTopic = PublisherClient::topicName('[PROJECT]', '[TOPIC]');
-
- list_topic_subscriptions_sample($formattedTopic);
-}
-// [END pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topics.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topics.php
deleted file mode 100644
index f38721cedf8a..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/list_topics.php
+++ /dev/null
@@ -1,72 +0,0 @@
-listTopics($formattedProject);
-
- /** @var Topic $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
-{
- $formattedProject = PublisherClient::projectName('[PROJECT]');
-
- list_topics_sample($formattedProject);
-}
-// [END pubsub_v1_generated_Publisher_ListTopics_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/publish.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/publish.php
deleted file mode 100644
index 46ae992a6591..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/publish.php
+++ /dev/null
@@ -1,72 +0,0 @@
-publish($formattedTopic, $messages);
- 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
-{
- $formattedTopic = PublisherClient::topicName('[PROJECT]', '[TOPIC]');
-
- publish_sample($formattedTopic);
-}
-// [END pubsub_v1_generated_Publisher_Publish_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/set_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/set_iam_policy.php
deleted file mode 100644
index dd0ec1e104a7..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/set_iam_policy.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setIamPolicy($resource, $policy);
- 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
-{
- $resource = '[RESOURCE]';
-
- set_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_Publisher_SetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/test_iam_permissions.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/test_iam_permissions.php
deleted file mode 100644
index 19e0d9626fd9..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/test_iam_permissions.php
+++ /dev/null
@@ -1,80 +0,0 @@
-testIamPermissions($resource, $permissions);
- 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
-{
- $resource = '[RESOURCE]';
- $permissionsElement = '[PERMISSIONS]';
-
- test_iam_permissions_sample($resource, $permissionsElement);
-}
-// [END pubsub_v1_generated_Publisher_TestIamPermissions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/update_topic.php b/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/update_topic.php
deleted file mode 100644
index b006b91f0aff..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/PublisherClient/update_topic.php
+++ /dev/null
@@ -1,77 +0,0 @@
-setName($topicName);
- $updateMask = new FieldMask();
-
- // Call the API and handle any network failures.
- try {
- /** @var Topic $response */
- $response = $publisherClient->updateTopic($topic, $updateMask);
- 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
-{
- $topicName = '[NAME]';
-
- update_topic_sample($topicName);
-}
-// [END pubsub_v1_generated_Publisher_UpdateTopic_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/commit_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/commit_schema.php
deleted file mode 100644
index e9f7e256a52d..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/commit_schema.php
+++ /dev/null
@@ -1,74 +0,0 @@
-setName($schemaName);
-
- // Call the API and handle any network failures.
- try {
- /** @var Schema $response */
- $response = $schemaServiceClient->commitSchema($formattedName, $schema);
- 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 = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
- $schemaName = '[NAME]';
-
- commit_schema_sample($formattedName, $schemaName);
-}
-// [END pubsub_v1_generated_SchemaService_CommitSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/create_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/create_schema.php
deleted file mode 100644
index 87663b7ad643..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/create_schema.php
+++ /dev/null
@@ -1,74 +0,0 @@
-setName($schemaName);
-
- // Call the API and handle any network failures.
- try {
- /** @var Schema $response */
- $response = $schemaServiceClient->createSchema($formattedParent, $schema);
- 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
-{
- $formattedParent = SchemaServiceClient::projectName('[PROJECT]');
- $schemaName = '[NAME]';
-
- create_schema_sample($formattedParent, $schemaName);
-}
-// [END pubsub_v1_generated_SchemaService_CreateSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema.php
deleted file mode 100644
index 9fd51fb1c508..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema.php
+++ /dev/null
@@ -1,65 +0,0 @@
-deleteSchema($formattedName);
- printf('Call completed successfully.' . PHP_EOL);
- } 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 = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
-
- delete_schema_sample($formattedName);
-}
-// [END pubsub_v1_generated_SchemaService_DeleteSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema_revision.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema_revision.php
deleted file mode 100644
index b02c9a8afc6d..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/delete_schema_revision.php
+++ /dev/null
@@ -1,73 +0,0 @@
-deleteSchemaRevision($formattedName, $revisionId);
- 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 = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = '[REVISION_ID]';
-
- delete_schema_revision_sample($formattedName, $revisionId);
-}
-// [END pubsub_v1_generated_SchemaService_DeleteSchemaRevision_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_iam_policy.php
deleted file mode 100644
index a74c24c48a5b..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_iam_policy.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getIamPolicy($resource);
- 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
-{
- $resource = '[RESOURCE]';
-
- get_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_SchemaService_GetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_schema.php
deleted file mode 100644
index 9910af606635..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/get_schema.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getSchema($formattedName);
- 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 = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
-
- get_schema_sample($formattedName);
-}
-// [END pubsub_v1_generated_SchemaService_GetSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schema_revisions.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schema_revisions.php
deleted file mode 100644
index 910003c66ecc..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schema_revisions.php
+++ /dev/null
@@ -1,71 +0,0 @@
-listSchemaRevisions($formattedName);
-
- /** @var Schema $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
-{
- $formattedName = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
-
- list_schema_revisions_sample($formattedName);
-}
-// [END pubsub_v1_generated_SchemaService_ListSchemaRevisions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schemas.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schemas.php
deleted file mode 100644
index 55eca86e4dee..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/list_schemas.php
+++ /dev/null
@@ -1,72 +0,0 @@
-listSchemas($formattedParent);
-
- /** @var Schema $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 = SchemaServiceClient::projectName('[PROJECT]');
-
- list_schemas_sample($formattedParent);
-}
-// [END pubsub_v1_generated_SchemaService_ListSchemas_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/rollback_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/rollback_schema.php
deleted file mode 100644
index 412f943708ba..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/rollback_schema.php
+++ /dev/null
@@ -1,71 +0,0 @@
-rollbackSchema($formattedName, $revisionId);
- 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 = SchemaServiceClient::schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = '[REVISION_ID]';
-
- rollback_schema_sample($formattedName, $revisionId);
-}
-// [END pubsub_v1_generated_SchemaService_RollbackSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/set_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/set_iam_policy.php
deleted file mode 100644
index 28ae9d014d9a..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/set_iam_policy.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setIamPolicy($resource, $policy);
- 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
-{
- $resource = '[RESOURCE]';
-
- set_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_SchemaService_SetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/test_iam_permissions.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/test_iam_permissions.php
deleted file mode 100644
index 80ba8ab18c6a..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/test_iam_permissions.php
+++ /dev/null
@@ -1,80 +0,0 @@
-testIamPermissions($resource, $permissions);
- 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
-{
- $resource = '[RESOURCE]';
- $permissionsElement = '[PERMISSIONS]';
-
- test_iam_permissions_sample($resource, $permissionsElement);
-}
-// [END pubsub_v1_generated_SchemaService_TestIamPermissions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_message.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_message.php
deleted file mode 100644
index 04d37f5d57ea..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_message.php
+++ /dev/null
@@ -1,67 +0,0 @@
-validateMessage($formattedParent);
- 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
-{
- $formattedParent = SchemaServiceClient::projectName('[PROJECT]');
-
- validate_message_sample($formattedParent);
-}
-// [END pubsub_v1_generated_SchemaService_ValidateMessage_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_schema.php b/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_schema.php
deleted file mode 100644
index 0409a64f2295..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SchemaServiceClient/validate_schema.php
+++ /dev/null
@@ -1,75 +0,0 @@
-setName($schemaName);
-
- // Call the API and handle any network failures.
- try {
- /** @var ValidateSchemaResponse $response */
- $response = $schemaServiceClient->validateSchema($formattedParent, $schema);
- 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
-{
- $formattedParent = SchemaServiceClient::projectName('[PROJECT]');
- $schemaName = '[NAME]';
-
- validate_schema_sample($formattedParent, $schemaName);
-}
-// [END pubsub_v1_generated_SchemaService_ValidateSchema_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/acknowledge.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/acknowledge.php
deleted file mode 100644
index 63e33c0444be..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/acknowledge.php
+++ /dev/null
@@ -1,78 +0,0 @@
-acknowledge($formattedSubscription, $ackIds);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIdsElement = '[ACK_IDS]';
-
- acknowledge_sample($formattedSubscription, $ackIdsElement);
-}
-// [END pubsub_v1_generated_Subscriber_Acknowledge_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_snapshot.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_snapshot.php
deleted file mode 100644
index 6536aa637e1e..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_snapshot.php
+++ /dev/null
@@ -1,97 +0,0 @@
-createSnapshot($formattedName, $formattedSubscription);
- 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 = SubscriberClient::snapshotName('[PROJECT]', '[SNAPSHOT]');
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- create_snapshot_sample($formattedName, $formattedSubscription);
-}
-// [END pubsub_v1_generated_Subscriber_CreateSnapshot_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_subscription.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_subscription.php
deleted file mode 100644
index a7ebdd3d718d..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/create_subscription.php
+++ /dev/null
@@ -1,85 +0,0 @@
-createSubscription($name, $formattedTopic);
- 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
-{
- $name = '[NAME]';
- $formattedTopic = SubscriberClient::topicName('[PROJECT]', '[TOPIC]');
-
- create_subscription_sample($name, $formattedTopic);
-}
-// [END pubsub_v1_generated_Subscriber_CreateSubscription_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_snapshot.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_snapshot.php
deleted file mode 100644
index e69f5a805967..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_snapshot.php
+++ /dev/null
@@ -1,73 +0,0 @@
-deleteSnapshot($formattedSnapshot);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedSnapshot = SubscriberClient::snapshotName('[PROJECT]', '[SNAPSHOT]');
-
- delete_snapshot_sample($formattedSnapshot);
-}
-// [END pubsub_v1_generated_Subscriber_DeleteSnapshot_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_subscription.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_subscription.php
deleted file mode 100644
index b0bd1cd39113..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/delete_subscription.php
+++ /dev/null
@@ -1,69 +0,0 @@
-deleteSubscription($formattedSubscription);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- delete_subscription_sample($formattedSubscription);
-}
-// [END pubsub_v1_generated_Subscriber_DeleteSubscription_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_iam_policy.php
deleted file mode 100644
index a4e4de40580b..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_iam_policy.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getIamPolicy($resource);
- 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
-{
- $resource = '[RESOURCE]';
-
- get_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_Subscriber_GetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_snapshot.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_snapshot.php
deleted file mode 100644
index 49779fc2eabb..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_snapshot.php
+++ /dev/null
@@ -1,71 +0,0 @@
-getSnapshot($formattedSnapshot);
- 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
-{
- $formattedSnapshot = SubscriberClient::snapshotName('[PROJECT]', '[SNAPSHOT]');
-
- get_snapshot_sample($formattedSnapshot);
-}
-// [END pubsub_v1_generated_Subscriber_GetSnapshot_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_subscription.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_subscription.php
deleted file mode 100644
index a995cdcd2988..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/get_subscription.php
+++ /dev/null
@@ -1,67 +0,0 @@
-getSubscription($formattedSubscription);
- 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- get_subscription_sample($formattedSubscription);
-}
-// [END pubsub_v1_generated_Subscriber_GetSubscription_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_snapshots.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_snapshots.php
deleted file mode 100644
index fb3e3fcde84f..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_snapshots.php
+++ /dev/null
@@ -1,76 +0,0 @@
-listSnapshots($formattedProject);
-
- /** @var Snapshot $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
-{
- $formattedProject = SubscriberClient::projectName('[PROJECT]');
-
- list_snapshots_sample($formattedProject);
-}
-// [END pubsub_v1_generated_Subscriber_ListSnapshots_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_subscriptions.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_subscriptions.php
deleted file mode 100644
index 5b297cb3f98b..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/list_subscriptions.php
+++ /dev/null
@@ -1,72 +0,0 @@
-listSubscriptions($formattedProject);
-
- /** @var Subscription $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
-{
- $formattedProject = SubscriberClient::projectName('[PROJECT]');
-
- list_subscriptions_sample($formattedProject);
-}
-// [END pubsub_v1_generated_Subscriber_ListSubscriptions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_ack_deadline.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_ack_deadline.php
deleted file mode 100644
index f75da83f883c..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_ack_deadline.php
+++ /dev/null
@@ -1,86 +0,0 @@
-modifyAckDeadline($formattedSubscription, $ackIds, $ackDeadlineSeconds);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIdsElement = '[ACK_IDS]';
- $ackDeadlineSeconds = 0;
-
- modify_ack_deadline_sample($formattedSubscription, $ackIdsElement, $ackDeadlineSeconds);
-}
-// [END pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_push_config.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_push_config.php
deleted file mode 100644
index 53fe65ee5c28..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/modify_push_config.php
+++ /dev/null
@@ -1,74 +0,0 @@
-modifyPushConfig($formattedSubscription, $pushConfig);
- printf('Call completed successfully.' . PHP_EOL);
- } 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- modify_push_config_sample($formattedSubscription);
-}
-// [END pubsub_v1_generated_Subscriber_ModifyPushConfig_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/pull.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/pull.php
deleted file mode 100644
index a0d40747989d..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/pull.php
+++ /dev/null
@@ -1,71 +0,0 @@
-pull($formattedSubscription, $maxMessages);
- 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $maxMessages = 0;
-
- pull_sample($formattedSubscription, $maxMessages);
-}
-// [END pubsub_v1_generated_Subscriber_Pull_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/seek.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/seek.php
deleted file mode 100644
index 88cba3607723..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/seek.php
+++ /dev/null
@@ -1,72 +0,0 @@
-seek($formattedSubscription);
- 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
-
- seek_sample($formattedSubscription);
-}
-// [END pubsub_v1_generated_Subscriber_Seek_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/set_iam_policy.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/set_iam_policy.php
deleted file mode 100644
index b64f3fb0b535..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/set_iam_policy.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setIamPolicy($resource, $policy);
- 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
-{
- $resource = '[RESOURCE]';
-
- set_iam_policy_sample($resource);
-}
-// [END pubsub_v1_generated_Subscriber_SetIamPolicy_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/streaming_pull.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/streaming_pull.php
deleted file mode 100644
index dbb35b9c000f..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/streaming_pull.php
+++ /dev/null
@@ -1,92 +0,0 @@
-setSubscription($formattedSubscription)
- ->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds);
-
- // Call the API and handle any network failures.
- try {
- /** @var BidiStream $stream */
- $stream = $subscriberClient->streamingPull();
- $stream->writeAll([$request,]);
-
- /** @var StreamingPullResponse $element */
- foreach ($stream->closeWriteAndReadAll() 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
-{
- $formattedSubscription = SubscriberClient::subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds = 0;
-
- streaming_pull_sample($formattedSubscription, $streamAckDeadlineSeconds);
-}
-// [END pubsub_v1_generated_Subscriber_StreamingPull_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/test_iam_permissions.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/test_iam_permissions.php
deleted file mode 100644
index 5668256cb4ee..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/test_iam_permissions.php
+++ /dev/null
@@ -1,80 +0,0 @@
-testIamPermissions($resource, $permissions);
- 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
-{
- $resource = '[RESOURCE]';
- $permissionsElement = '[PERMISSIONS]';
-
- test_iam_permissions_sample($resource, $permissionsElement);
-}
-// [END pubsub_v1_generated_Subscriber_TestIamPermissions_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_snapshot.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_snapshot.php
deleted file mode 100644
index 3a3dad5d0105..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_snapshot.php
+++ /dev/null
@@ -1,62 +0,0 @@
-updateSnapshot($snapshot, $updateMask);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END pubsub_v1_generated_Subscriber_UpdateSnapshot_sync]
diff --git a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_subscription.php b/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_subscription.php
deleted file mode 100644
index 2711bbd4c433..000000000000
--- a/owl-bot-staging/PubSub/v1/samples/V1/SubscriberClient/update_subscription.php
+++ /dev/null
@@ -1,85 +0,0 @@
-setName($subscriptionName)
- ->setTopic($formattedSubscriptionTopic);
- $updateMask = new FieldMask();
-
- // Call the API and handle any network failures.
- try {
- /** @var Subscription $response */
- $response = $subscriberClient->updateSubscription($subscription, $updateMask);
- 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
-{
- $subscriptionName = '[NAME]';
- $formattedSubscriptionTopic = SubscriberClient::topicName('[PROJECT]', '[TOPIC]');
-
- update_subscription_sample($subscriptionName, $formattedSubscriptionTopic);
-}
-// [END pubsub_v1_generated_Subscriber_UpdateSubscription_sync]
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Client/PublisherClient.php b/owl-bot-staging/PubSub/v1/src/V1/Client/PublisherClient.php
deleted file mode 100644
index 0e87283a1b16..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Client/PublisherClient.php
+++ /dev/null
@@ -1,630 +0,0 @@
- self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/publisher_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/publisher_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/publisher_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/publisher_rest_client_config.php',
- ],
- ],
- ];
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * _deleted-topic_ resource.
- *
- * @return string The formatted _deleted-topic_ resource.
- */
- public static function deletedTopicName(): string
- {
- return self::getPathTemplate('deletedTopic')->render([]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName(string $project): string
- {
- return self::getPathTemplate('project')->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * project_topic resource.
- *
- * @param string $project
- * @param string $topic
- *
- * @return string The formatted project_topic resource.
- */
- public static function projectTopicName(string $project, string $topic): string
- {
- return self::getPathTemplate('projectTopic')->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a schema
- * resource.
- *
- * @param string $project
- * @param string $schema
- *
- * @return string The formatted schema resource.
- */
- public static function schemaName(string $project, string $schema): string
- {
- return self::getPathTemplate('schema')->render([
- 'project' => $project,
- 'schema' => $schema,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subscription
- * resource.
- *
- * @param string $project
- * @param string $subscription
- *
- * @return string The formatted subscription resource.
- */
- public static function subscriptionName(string $project, string $subscription): string
- {
- return self::getPathTemplate('subscription')->render([
- 'project' => $project,
- 'subscription' => $subscription,
- ]);
- }
-
- /**
- * 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,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - deletedTopic: _deleted-topic_
- * - project: projects/{project}
- * - projectTopic: projects/{project}/topics/{topic}
- * - schema: projects/{project}/schemas/{schema}
- * - subscription: projects/{project}/subscriptions/{subscription}
- * - topic: projects/{project}/topics/{topic}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName(string $formattedName, string $template = null): array
- {
- return self::parseFormattedName($formattedName, $template);
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /** Handles execution of the async variants for each documented method. */
- public function __call($method, $args)
- {
- if (substr($method, -5) !== 'Async') {
- trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR);
- }
-
- array_unshift($args, substr($method, 0, -5));
- return call_user_func_array([$this, 'startAsyncCall'], $args);
- }
-
- /**
- * Creates the given topic with the given name. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- *
- * The async variant is {@see PublisherClient::createTopicAsync()} .
- *
- * @param Topic $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 Topic
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createTopic(Topic $request, array $callOptions = []): Topic
- {
- return $this->startApiCall('CreateTopic', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
- * does not exist. After a topic is deleted, a new topic may be created with
- * the same name; this is an entirely new topic with none of the old
- * configuration or subscriptions. Existing subscriptions to this topic are
- * not deleted, but their `topic` field is set to `_deleted-topic_`.
- *
- * The async variant is {@see PublisherClient::deleteTopicAsync()} .
- *
- * @param DeleteTopicRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteTopic(DeleteTopicRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('DeleteTopic', $request, $callOptions)->wait();
- }
-
- /**
- * Detaches a subscription from this topic. All messages retained in the
- * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
- * will return FAILED_PRECONDITION. If the subscription is a push
- * subscription, pushes to the endpoint will stop.
- *
- * The async variant is {@see PublisherClient::detachSubscriptionAsync()} .
- *
- * @param DetachSubscriptionRequest $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 DetachSubscriptionResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function detachSubscription(DetachSubscriptionRequest $request, array $callOptions = []): DetachSubscriptionResponse
- {
- return $this->startApiCall('DetachSubscription', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the configuration of a topic.
- *
- * The async variant is {@see PublisherClient::getTopicAsync()} .
- *
- * @param GetTopicRequest $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 Topic
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getTopic(GetTopicRequest $request, array $callOptions = []): Topic
- {
- return $this->startApiCall('GetTopic', $request, $callOptions)->wait();
- }
-
- /**
- * Lists the names of the snapshots on this topic. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * The async variant is {@see PublisherClient::listTopicSnapshotsAsync()} .
- *
- * @param ListTopicSnapshotsRequest $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 listTopicSnapshots(ListTopicSnapshotsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListTopicSnapshots', $request, $callOptions);
- }
-
- /**
- * Lists the names of the attached subscriptions on this topic.
- *
- * The async variant is {@see PublisherClient::listTopicSubscriptionsAsync()} .
- *
- * @param ListTopicSubscriptionsRequest $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 listTopicSubscriptions(ListTopicSubscriptionsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListTopicSubscriptions', $request, $callOptions);
- }
-
- /**
- * Lists matching topics.
- *
- * The async variant is {@see PublisherClient::listTopicsAsync()} .
- *
- * @param ListTopicsRequest $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 listTopics(ListTopicsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListTopics', $request, $callOptions);
- }
-
- /**
- * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
- * does not exist.
- *
- * The async variant is {@see PublisherClient::publishAsync()} .
- *
- * @param PublishRequest $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 PublishResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function publish(PublishRequest $request, array $callOptions = []): PublishResponse
- {
- return $this->startApiCall('Publish', $request, $callOptions)->wait();
- }
-
- /**
- * Updates an existing topic. Note that certain properties of a
- * topic are not modifiable.
- *
- * The async variant is {@see PublisherClient::updateTopicAsync()} .
- *
- * @param UpdateTopicRequest $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 Topic
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateTopic(UpdateTopicRequest $request, array $callOptions = []): Topic
- {
- return $this->startApiCall('UpdateTopic', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * The async variant is {@see PublisherClient::getIamPolicyAsync()} .
- *
- * @param GetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * The async variant is {@see PublisherClient::setIamPolicyAsync()} .
- *
- * @param SetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * The async variant is {@see PublisherClient::testIamPermissionsAsync()} .
- *
- * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
- return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Client/SchemaServiceClient.php b/owl-bot-staging/PubSub/v1/src/V1/Client/SchemaServiceClient.php
deleted file mode 100644
index 39bbbeff6133..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Client/SchemaServiceClient.php
+++ /dev/null
@@ -1,576 +0,0 @@
- self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/schema_service_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/schema_service_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/schema_service_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/schema_service_rest_client_config.php',
- ],
- ],
- ];
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName(string $project): string
- {
- return self::getPathTemplate('project')->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a schema
- * resource.
- *
- * @param string $project
- * @param string $schema
- *
- * @return string The formatted schema resource.
- */
- public static function schemaName(string $project, string $schema): string
- {
- return self::getPathTemplate('schema')->render([
- 'project' => $project,
- 'schema' => $schema,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - project: projects/{project}
- * - schema: projects/{project}/schemas/{schema}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName(string $formattedName, string $template = null): array
- {
- return self::parseFormattedName($formattedName, $template);
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /** Handles execution of the async variants for each documented method. */
- public function __call($method, $args)
- {
- if (substr($method, -5) !== 'Async') {
- trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR);
- }
-
- array_unshift($args, substr($method, 0, -5));
- return call_user_func_array([$this, 'startAsyncCall'], $args);
- }
-
- /**
- * Commits a new schema revision to an existing schema.
- *
- * The async variant is {@see SchemaServiceClient::commitSchemaAsync()} .
- *
- * @param CommitSchemaRequest $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 Schema
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function commitSchema(CommitSchemaRequest $request, array $callOptions = []): Schema
- {
- return $this->startApiCall('CommitSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a schema.
- *
- * The async variant is {@see SchemaServiceClient::createSchemaAsync()} .
- *
- * @param CreateSchemaRequest $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 Schema
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createSchema(CreateSchemaRequest $request, array $callOptions = []): Schema
- {
- return $this->startApiCall('CreateSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes a schema.
- *
- * The async variant is {@see SchemaServiceClient::deleteSchemaAsync()} .
- *
- * @param DeleteSchemaRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteSchema(DeleteSchemaRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('DeleteSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes a specific schema revision.
- *
- * The async variant is {@see SchemaServiceClient::deleteSchemaRevisionAsync()} .
- *
- * @param DeleteSchemaRevisionRequest $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 Schema
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteSchemaRevision(DeleteSchemaRevisionRequest $request, array $callOptions = []): Schema
- {
- return $this->startApiCall('DeleteSchemaRevision', $request, $callOptions)->wait();
- }
-
- /**
- * Gets a schema.
- *
- * The async variant is {@see SchemaServiceClient::getSchemaAsync()} .
- *
- * @param GetSchemaRequest $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 Schema
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getSchema(GetSchemaRequest $request, array $callOptions = []): Schema
- {
- return $this->startApiCall('GetSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Lists all schema revisions for the named schema.
- *
- * The async variant is {@see SchemaServiceClient::listSchemaRevisionsAsync()} .
- *
- * @param ListSchemaRevisionsRequest $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 listSchemaRevisions(ListSchemaRevisionsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListSchemaRevisions', $request, $callOptions);
- }
-
- /**
- * Lists schemas in a project.
- *
- * The async variant is {@see SchemaServiceClient::listSchemasAsync()} .
- *
- * @param ListSchemasRequest $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 listSchemas(ListSchemasRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListSchemas', $request, $callOptions);
- }
-
- /**
- * Creates a new schema revision that is a copy of the provided revision_id.
- *
- * The async variant is {@see SchemaServiceClient::rollbackSchemaAsync()} .
- *
- * @param RollbackSchemaRequest $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 Schema
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function rollbackSchema(RollbackSchemaRequest $request, array $callOptions = []): Schema
- {
- return $this->startApiCall('RollbackSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Validates a message against a schema.
- *
- * The async variant is {@see SchemaServiceClient::validateMessageAsync()} .
- *
- * @param ValidateMessageRequest $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 ValidateMessageResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function validateMessage(ValidateMessageRequest $request, array $callOptions = []): ValidateMessageResponse
- {
- return $this->startApiCall('ValidateMessage', $request, $callOptions)->wait();
- }
-
- /**
- * Validates a schema.
- *
- * The async variant is {@see SchemaServiceClient::validateSchemaAsync()} .
- *
- * @param ValidateSchemaRequest $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 ValidateSchemaResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function validateSchema(ValidateSchemaRequest $request, array $callOptions = []): ValidateSchemaResponse
- {
- return $this->startApiCall('ValidateSchema', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * The async variant is {@see SchemaServiceClient::getIamPolicyAsync()} .
- *
- * @param GetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * The async variant is {@see SchemaServiceClient::setIamPolicyAsync()} .
- *
- * @param SetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * The async variant is {@see SchemaServiceClient::testIamPermissionsAsync()} .
- *
- * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
- return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Client/SubscriberClient.php b/owl-bot-staging/PubSub/v1/src/V1/Client/SubscriberClient.php
deleted file mode 100644
index de7ee0ad07f2..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Client/SubscriberClient.php
+++ /dev/null
@@ -1,863 +0,0 @@
- self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/subscriber_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/subscriber_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/subscriber_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/subscriber_rest_client_config.php',
- ],
- ],
- ];
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * _deleted-topic_ resource.
- *
- * @return string The formatted _deleted-topic_ resource.
- */
- public static function deletedTopicName(): string
- {
- return self::getPathTemplate('deletedTopic')->render([]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName(string $project): string
- {
- return self::getPathTemplate('project')->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * project_topic resource.
- *
- * @param string $project
- * @param string $topic
- *
- * @return string The formatted project_topic resource.
- */
- public static function projectTopicName(string $project, string $topic): string
- {
- return self::getPathTemplate('projectTopic')->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a snapshot
- * resource.
- *
- * @param string $project
- * @param string $snapshot
- *
- * @return string The formatted snapshot resource.
- */
- public static function snapshotName(string $project, string $snapshot): string
- {
- return self::getPathTemplate('snapshot')->render([
- 'project' => $project,
- 'snapshot' => $snapshot,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subscription
- * resource.
- *
- * @param string $project
- * @param string $subscription
- *
- * @return string The formatted subscription resource.
- */
- public static function subscriptionName(string $project, string $subscription): string
- {
- return self::getPathTemplate('subscription')->render([
- 'project' => $project,
- 'subscription' => $subscription,
- ]);
- }
-
- /**
- * 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,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - deletedTopic: _deleted-topic_
- * - project: projects/{project}
- * - projectTopic: projects/{project}/topics/{topic}
- * - snapshot: projects/{project}/snapshots/{snapshot}
- * - subscription: projects/{project}/subscriptions/{subscription}
- * - topic: projects/{project}/topics/{topic}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName(string $formattedName, string $template = null): array
- {
- return self::parseFormattedName($formattedName, $template);
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /** Handles execution of the async variants for each documented method. */
- public function __call($method, $args)
- {
- if (substr($method, -5) !== 'Async') {
- trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR);
- }
-
- array_unshift($args, substr($method, 0, -5));
- return call_user_func_array([$this, 'startAsyncCall'], $args);
- }
-
- /**
- * Acknowledges the messages associated with the `ack_ids` in the
- * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
- * from the subscription.
- *
- * Acknowledging a message whose ack deadline has expired may succeed,
- * but such a message may be redelivered later. Acknowledging a message more
- * than once will not result in an error.
- *
- * The async variant is {@see SubscriberClient::acknowledgeAsync()} .
- *
- * @param AcknowledgeRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function acknowledge(AcknowledgeRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('Acknowledge', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a snapshot from the requested subscription. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- * If the snapshot already exists, returns `ALREADY_EXISTS`.
- * If the requested subscription doesn't exist, returns `NOT_FOUND`.
- * If the backlog in the subscription is too old -- and the resulting snapshot
- * would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
- * See also the `Snapshot.expire_time` field. If the name is not provided in
- * the request, the server will assign a random
- * name for this snapshot on the same project as the subscription, conforming
- * to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
- * generated name is populated in the returned Snapshot object. Note that for
- * REST API requests, you must specify a name in the request.
- *
- * The async variant is {@see SubscriberClient::createSnapshotAsync()} .
- *
- * @param CreateSnapshotRequest $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 Snapshot
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createSnapshot(CreateSnapshotRequest $request, array $callOptions = []): Snapshot
- {
- return $this->startApiCall('CreateSnapshot', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a subscription to a given topic. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * If the subscription already exists, returns `ALREADY_EXISTS`.
- * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
- *
- * If the name is not provided in the request, the server will assign a random
- * name for this subscription on the same project as the topic, conforming
- * to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
- * generated name is populated in the returned Subscription object. Note that
- * for REST API requests, you must specify a name in the request.
- *
- * The async variant is {@see SubscriberClient::createSubscriptionAsync()} .
- *
- * @param Subscription $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 Subscription
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createSubscription(Subscription $request, array $callOptions = []): Subscription
- {
- return $this->startApiCall('CreateSubscription', $request, $callOptions)->wait();
- }
-
- /**
- * Removes an existing snapshot. Snapshots are used in [Seek]
- * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- * When the snapshot is deleted, all messages retained in the snapshot
- * are immediately dropped. After a snapshot is deleted, a new one may be
- * created with the same name, but the new one has no association with the old
- * snapshot or its subscription, unless the same subscription is specified.
- *
- * The async variant is {@see SubscriberClient::deleteSnapshotAsync()} .
- *
- * @param DeleteSnapshotRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes an existing subscription. All messages retained in the subscription
- * are immediately dropped. Calls to `Pull` after deletion will return
- * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
- * the same name, but the new one has no association with the old
- * subscription or its topic unless the same topic is specified.
- *
- * The async variant is {@see SubscriberClient::deleteSubscriptionAsync()} .
- *
- * @param DeleteSubscriptionRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteSubscription(DeleteSubscriptionRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('DeleteSubscription', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the configuration details of a snapshot. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * The async variant is {@see SubscriberClient::getSnapshotAsync()} .
- *
- * @param GetSnapshotRequest $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 Snapshot
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot
- {
- return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the configuration details of a subscription.
- *
- * The async variant is {@see SubscriberClient::getSubscriptionAsync()} .
- *
- * @param GetSubscriptionRequest $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 Subscription
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getSubscription(GetSubscriptionRequest $request, array $callOptions = []): Subscription
- {
- return $this->startApiCall('GetSubscription', $request, $callOptions)->wait();
- }
-
- /**
- * Lists the existing snapshots. Snapshots are used in [Seek](
- * https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * The async variant is {@see SubscriberClient::listSnapshotsAsync()} .
- *
- * @param ListSnapshotsRequest $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 listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListSnapshots', $request, $callOptions);
- }
-
- /**
- * Lists matching subscriptions.
- *
- * The async variant is {@see SubscriberClient::listSubscriptionsAsync()} .
- *
- * @param ListSubscriptionsRequest $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 listSubscriptions(ListSubscriptionsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListSubscriptions', $request, $callOptions);
- }
-
- /**
- * Modifies the ack deadline for a specific message. This method is useful
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted. Note that this does not modify the
- * subscription-level `ackDeadlineSeconds` used for subsequent messages.
- *
- * The async variant is {@see SubscriberClient::modifyAckDeadlineAsync()} .
- *
- * @param ModifyAckDeadlineRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function modifyAckDeadline(ModifyAckDeadlineRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('ModifyAckDeadline', $request, $callOptions)->wait();
- }
-
- /**
- * Modifies the `PushConfig` for a specified subscription.
- *
- * This may be used to change a push subscription to a pull one (signified by
- * an empty `PushConfig`) or vice versa, or change the endpoint URL and other
- * attributes of a push subscription. Messages will accumulate for delivery
- * continuously through the call regardless of changes to the `PushConfig`.
- *
- * The async variant is {@see SubscriberClient::modifyPushConfigAsync()} .
- *
- * @param ModifyPushConfigRequest $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.
- * }
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function modifyPushConfig(ModifyPushConfigRequest $request, array $callOptions = []): void
- {
- $this->startApiCall('ModifyPushConfig', $request, $callOptions)->wait();
- }
-
- /**
- * Pulls messages from the server.
- *
- * The async variant is {@see SubscriberClient::pullAsync()} .
- *
- * @param PullRequest $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 PullResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function pull(PullRequest $request, array $callOptions = []): PullResponse
- {
- return $this->startApiCall('Pull', $request, $callOptions)->wait();
- }
-
- /**
- * Seeks an existing subscription to a point in time or to a given snapshot,
- * whichever is provided in the request. Snapshots are used in [Seek]
- * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot. Note that both the subscription and the
- * snapshot must be on the same topic.
- *
- * The async variant is {@see SubscriberClient::seekAsync()} .
- *
- * @param SeekRequest $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 SeekResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function seek(SeekRequest $request, array $callOptions = []): SeekResponse
- {
- return $this->startApiCall('Seek', $request, $callOptions)->wait();
- }
-
- /**
- * Establishes a stream with the server, which sends messages down to the
- * client. The client streams acknowledgements and ack deadline modifications
- * back to the server. The server will close the stream and return the status
- * on any error. The server may close the stream with status `UNAVAILABLE` to
- * reassign server-side resources, in which case, the client should
- * re-establish the stream. Flow control can be achieved by configuring the
- * underlying RPC channel.
- *
- * @param array $callOptions {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return BidiStream
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function streamingPull(array $callOptions = []): BidiStream
- {
- return $this->startApiCall('StreamingPull', null, $callOptions);
- }
-
- /**
- * Updates an existing snapshot. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * The async variant is {@see SubscriberClient::updateSnapshotAsync()} .
- *
- * @param UpdateSnapshotRequest $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 Snapshot
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateSnapshot(UpdateSnapshotRequest $request, array $callOptions = []): Snapshot
- {
- return $this->startApiCall('UpdateSnapshot', $request, $callOptions)->wait();
- }
-
- /**
- * Updates an existing subscription. Note that certain properties of a
- * subscription, such as its topic, are not modifiable.
- *
- * The async variant is {@see SubscriberClient::updateSubscriptionAsync()} .
- *
- * @param UpdateSubscriptionRequest $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 Subscription
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateSubscription(UpdateSubscriptionRequest $request, array $callOptions = []): Subscription
- {
- return $this->startApiCall('UpdateSubscription', $request, $callOptions)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * The async variant is {@see SubscriberClient::getIamPolicyAsync()} .
- *
- * @param GetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * The async variant is {@see SubscriberClient::setIamPolicyAsync()} .
- *
- * @param SetIamPolicyRequest $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 Policy
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy
- {
- return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * The async variant is {@see SubscriberClient::testIamPermissionsAsync()} .
- *
- * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse
- {
- return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Gapic/PublisherGapicClient.php b/owl-bot-staging/PubSub/v1/src/V1/Gapic/PublisherGapicClient.php
deleted file mode 100644
index 8d343c861cd9..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Gapic/PublisherGapicClient.php
+++ /dev/null
@@ -1,1095 +0,0 @@
-createTopic($name);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * This service has a new (beta) implementation. See {@see
- * \Google\Cloud\PubSub\V1\Client\PublisherClient} to use the new surface.
- */
-class PublisherGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.pubsub.v1.Publisher';
-
- /** The default address of the service. */
- const SERVICE_ADDRESS = 'pubsub.googleapis.com';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- 'https://www.googleapis.com/auth/pubsub',
- ];
-
- private static $deletedTopicNameTemplate;
-
- private static $projectNameTemplate;
-
- private static $projectTopicNameTemplate;
-
- private static $schemaNameTemplate;
-
- private static $subscriptionNameTemplate;
-
- private static $topicNameTemplate;
-
- private static $pathTemplateMap;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/publisher_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/publisher_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/publisher_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/publisher_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getDeletedTopicNameTemplate()
- {
- if (self::$deletedTopicNameTemplate == null) {
- self::$deletedTopicNameTemplate = new PathTemplate('_deleted-topic_');
- }
-
- return self::$deletedTopicNameTemplate;
- }
-
- private static function getProjectNameTemplate()
- {
- if (self::$projectNameTemplate == null) {
- self::$projectNameTemplate = new PathTemplate('projects/{project}');
- }
-
- return self::$projectNameTemplate;
- }
-
- private static function getProjectTopicNameTemplate()
- {
- if (self::$projectTopicNameTemplate == null) {
- self::$projectTopicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}');
- }
-
- return self::$projectTopicNameTemplate;
- }
-
- private static function getSchemaNameTemplate()
- {
- if (self::$schemaNameTemplate == null) {
- self::$schemaNameTemplate = new PathTemplate('projects/{project}/schemas/{schema}');
- }
-
- return self::$schemaNameTemplate;
- }
-
- private static function getSubscriptionNameTemplate()
- {
- if (self::$subscriptionNameTemplate == null) {
- self::$subscriptionNameTemplate = new PathTemplate('projects/{project}/subscriptions/{subscription}');
- }
-
- return self::$subscriptionNameTemplate;
- }
-
- private static function getTopicNameTemplate()
- {
- if (self::$topicNameTemplate == null) {
- self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}');
- }
-
- return self::$topicNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'deletedTopic' => self::getDeletedTopicNameTemplate(),
- 'project' => self::getProjectNameTemplate(),
- 'projectTopic' => self::getProjectTopicNameTemplate(),
- 'schema' => self::getSchemaNameTemplate(),
- 'subscription' => self::getSubscriptionNameTemplate(),
- 'topic' => self::getTopicNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * _deleted-topic_ resource.
- *
- * @return string The formatted _deleted-topic_ resource.
- */
- public static function deletedTopicName()
- {
- return self::getDeletedTopicNameTemplate()->render([]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName($project)
- {
- return self::getProjectNameTemplate()->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * project_topic resource.
- *
- * @param string $project
- * @param string $topic
- *
- * @return string The formatted project_topic resource.
- */
- public static function projectTopicName($project, $topic)
- {
- return self::getProjectTopicNameTemplate()->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a schema
- * resource.
- *
- * @param string $project
- * @param string $schema
- *
- * @return string The formatted schema resource.
- */
- public static function schemaName($project, $schema)
- {
- return self::getSchemaNameTemplate()->render([
- 'project' => $project,
- 'schema' => $schema,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subscription
- * resource.
- *
- * @param string $project
- * @param string $subscription
- *
- * @return string The formatted subscription resource.
- */
- public static function subscriptionName($project, $subscription)
- {
- return self::getSubscriptionNameTemplate()->render([
- 'project' => $project,
- 'subscription' => $subscription,
- ]);
- }
-
- /**
- * 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($project, $topic)
- {
- return self::getTopicNameTemplate()->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - deletedTopic: _deleted-topic_
- * - project: projects/{project}
- * - projectTopic: projects/{project}/topics/{topic}
- * - schema: projects/{project}/schemas/{schema}
- * - subscription: projects/{project}/subscriptions/{subscription}
- * - topic: projects/{project}/topics/{topic}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /**
- * Creates the given topic with the given name. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $name = 'name';
- * $response = $publisherClient->createTopic($name);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type array $labels
- * See [Creating and managing labels]
- * (https://cloud.google.com/pubsub/docs/labels).
- * @type MessageStoragePolicy $messageStoragePolicy
- * Policy constraining the set of Google Cloud Platform regions where messages
- * published to the topic may be stored. If not present, then no constraints
- * are in effect.
- * @type string $kmsKeyName
- * The resource name of the Cloud KMS CryptoKey to be used to protect access
- * to messages published on this topic.
- *
- * The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
- * @type SchemaSettings $schemaSettings
- * Settings for validating messages published against a schema.
- * @type bool $satisfiesPzs
- * Reserved for future use. This field is set only in responses from the
- * server; it is ignored if it is set in any requests.
- * @type Duration $messageRetentionDuration
- * Indicates the minimum duration to retain a message after it is published to
- * the topic. If this field is set, messages published to the topic in the
- * last `message_retention_duration` are always available to subscribers. For
- * instance, it allows any attached subscription to [seek to a
- * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
- * that is up to `message_retention_duration` in the past. If this field is
- * not set, message retention is controlled by settings on individual
- * subscriptions. Cannot be more than 31 days or less than 10 minutes.
- * @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 \Google\Cloud\PubSub\V1\Topic
- *
- * @throws ApiException if the remote call fails
- */
- public function createTopic($name, array $optionalArgs = [])
- {
- $request = new Topic();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['labels'])) {
- $request->setLabels($optionalArgs['labels']);
- }
-
- if (isset($optionalArgs['messageStoragePolicy'])) {
- $request->setMessageStoragePolicy($optionalArgs['messageStoragePolicy']);
- }
-
- if (isset($optionalArgs['kmsKeyName'])) {
- $request->setKmsKeyName($optionalArgs['kmsKeyName']);
- }
-
- if (isset($optionalArgs['schemaSettings'])) {
- $request->setSchemaSettings($optionalArgs['schemaSettings']);
- }
-
- if (isset($optionalArgs['satisfiesPzs'])) {
- $request->setSatisfiesPzs($optionalArgs['satisfiesPzs']);
- }
-
- if (isset($optionalArgs['messageRetentionDuration'])) {
- $request->setMessageRetentionDuration($optionalArgs['messageRetentionDuration']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateTopic', Topic::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
- * does not exist. After a topic is deleted, a new topic may be created with
- * the same name; this is an entirely new topic with none of the old
- * configuration or subscriptions. Existing subscriptions to this topic are
- * not deleted, but their `topic` field is set to `_deleted-topic_`.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
- * $publisherClient->deleteTopic($formattedTopic);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $topic Required. Name of the topic to delete.
- * Format is `projects/{project}/topics/{topic}`.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteTopic($topic, array $optionalArgs = [])
- {
- $request = new DeleteTopicRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $requestParamHeaders['topic'] = $topic;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteTopic', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Detaches a subscription from this topic. All messages retained in the
- * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
- * will return FAILED_PRECONDITION. If the subscription is a push
- * subscription, pushes to the endpoint will stop.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedSubscription = $publisherClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $response = $publisherClient->detachSubscription($formattedSubscription);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The subscription to detach.
- * Format is `projects/{project}/subscriptions/{subscription}`.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\DetachSubscriptionResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function detachSubscription($subscription, array $optionalArgs = [])
- {
- $request = new DetachSubscriptionRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DetachSubscription', DetachSubscriptionResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the configuration of a topic.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
- * $response = $publisherClient->getTopic($formattedTopic);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $topic Required. The name of the topic to get.
- * Format is `projects/{project}/topics/{topic}`.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Topic
- *
- * @throws ApiException if the remote call fails
- */
- public function getTopic($topic, array $optionalArgs = [])
- {
- $request = new GetTopicRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $requestParamHeaders['topic'] = $topic;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetTopic', Topic::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists the names of the snapshots on this topic. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
- * // Iterate over pages of elements
- * $pagedResponse = $publisherClient->listTopicSnapshots($formattedTopic);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $publisherClient->listTopicSnapshots($formattedTopic);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $topic Required. The name of the topic that snapshots are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listTopicSnapshots($topic, array $optionalArgs = [])
- {
- $request = new ListTopicSnapshotsRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $requestParamHeaders['topic'] = $topic;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListTopicSnapshots', $optionalArgs, ListTopicSnapshotsResponse::class, $request);
- }
-
- /**
- * Lists the names of the attached subscriptions on this topic.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
- * // Iterate over pages of elements
- * $pagedResponse = $publisherClient->listTopicSubscriptions($formattedTopic);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $publisherClient->listTopicSubscriptions($formattedTopic);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $topic Required. The name of the topic that subscriptions are attached to.
- * Format is `projects/{project}/topics/{topic}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listTopicSubscriptions($topic, array $optionalArgs = [])
- {
- $request = new ListTopicSubscriptionsRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $requestParamHeaders['topic'] = $topic;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListTopicSubscriptions', $optionalArgs, ListTopicSubscriptionsResponse::class, $request);
- }
-
- /**
- * Lists matching topics.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedProject = $publisherClient->projectName('[PROJECT]');
- * // Iterate over pages of elements
- * $pagedResponse = $publisherClient->listTopics($formattedProject);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $publisherClient->listTopics($formattedProject);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $project Required. The name of the project in which to list topics.
- * Format is `projects/{project-id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listTopics($project, array $optionalArgs = [])
- {
- $request = new ListTopicsRequest();
- $requestParamHeaders = [];
- $request->setProject($project);
- $requestParamHeaders['project'] = $project;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListTopics', $optionalArgs, ListTopicsResponse::class, $request);
- }
-
- /**
- * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
- * does not exist.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $formattedTopic = $publisherClient->topicName('[PROJECT]', '[TOPIC]');
- * $messages = [];
- * $response = $publisherClient->publish($formattedTopic, $messages);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $topic Required. The messages in the request will be published on this topic.
- * Format is `projects/{project}/topics/{topic}`.
- * @param PubsubMessage[] $messages Required. The messages to publish.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\PublishResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function publish($topic, $messages, array $optionalArgs = [])
- {
- $request = new PublishRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $request->setMessages($messages);
- $requestParamHeaders['topic'] = $topic;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('Publish', PublishResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Updates an existing topic. Note that certain properties of a
- * topic are not modifiable.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $topic = new Topic();
- * $updateMask = new FieldMask();
- * $response = $publisherClient->updateTopic($topic, $updateMask);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param Topic $topic Required. The updated topic object.
- * @param FieldMask $updateMask Required. Indicates which fields in the provided topic to update. Must be
- * specified and non-empty. Note that if `update_mask` contains
- * "message_storage_policy" but the `message_storage_policy` is not set in
- * the `topic` provided above, then the updated value is determined by the
- * policy configured at the project or organization level.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Topic
- *
- * @throws ApiException if the remote call fails
- */
- public function updateTopic($topic, $updateMask, array $optionalArgs = [])
- {
- $request = new UpdateTopicRequest();
- $requestParamHeaders = [];
- $request->setTopic($topic);
- $request->setUpdateMask($updateMask);
- $requestParamHeaders['topic.name'] = $topic->getName();
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateTopic', Topic::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $resource = 'resource';
- * $response = $publisherClient->getIamPolicy($resource);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $publisherClient->setIamPolicy($resource, $policy);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $publisherClient = new PublisherClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $publisherClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $publisherClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @param array $optionalArgs {
- * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Gapic/SchemaServiceGapicClient.php b/owl-bot-staging/PubSub/v1/src/V1/Gapic/SchemaServiceGapicClient.php
deleted file mode 100644
index 7800acb1cdd6..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Gapic/SchemaServiceGapicClient.php
+++ /dev/null
@@ -1,1000 +0,0 @@
-schemaName('[PROJECT]', '[SCHEMA]');
- * $schema = new Schema();
- * $response = $schemaServiceClient->commitSchema($formattedName, $schema);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * This service has a new (beta) implementation. See {@see
- * \Google\Cloud\PubSub\V1\Client\SchemaServiceClient} to use the new surface.
- */
-class SchemaServiceGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.pubsub.v1.SchemaService';
-
- /** The default address of the service. */
- const SERVICE_ADDRESS = 'pubsub.googleapis.com';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- 'https://www.googleapis.com/auth/pubsub',
- ];
-
- private static $projectNameTemplate;
-
- private static $schemaNameTemplate;
-
- private static $pathTemplateMap;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/schema_service_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/schema_service_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/schema_service_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/schema_service_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getProjectNameTemplate()
- {
- if (self::$projectNameTemplate == null) {
- self::$projectNameTemplate = new PathTemplate('projects/{project}');
- }
-
- return self::$projectNameTemplate;
- }
-
- private static function getSchemaNameTemplate()
- {
- if (self::$schemaNameTemplate == null) {
- self::$schemaNameTemplate = new PathTemplate('projects/{project}/schemas/{schema}');
- }
-
- return self::$schemaNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'project' => self::getProjectNameTemplate(),
- 'schema' => self::getSchemaNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName($project)
- {
- return self::getProjectNameTemplate()->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a schema
- * resource.
- *
- * @param string $project
- * @param string $schema
- *
- * @return string The formatted schema resource.
- */
- public static function schemaName($project, $schema)
- {
- return self::getSchemaNameTemplate()->render([
- 'project' => $project,
- 'schema' => $schema,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - project: projects/{project}
- * - schema: projects/{project}/schemas/{schema}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /**
- * Commits a new schema revision to an existing schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * $schema = new Schema();
- * $response = $schemaServiceClient->commitSchema($formattedName, $schema);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the schema we are revising.
- * Format is `projects/{project}/schemas/{schema}`.
- * @param Schema $schema Required. The schema revision to commit.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Schema
- *
- * @throws ApiException if the remote call fails
- */
- public function commitSchema($name, $schema, array $optionalArgs = [])
- {
- $request = new CommitSchemaRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setSchema($schema);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CommitSchema', Schema::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Creates a schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedParent = $schemaServiceClient->projectName('[PROJECT]');
- * $schema = new Schema();
- * $response = $schemaServiceClient->createSchema($formattedParent, $schema);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The name of the project in which to create the schema.
- * Format is `projects/{project-id}`.
- * @param Schema $schema Required. The schema object to create.
- *
- * This schema's `name` parameter is ignored. The schema object returned
- * by CreateSchema will have a `name` made using the given `parent` and
- * `schema_id`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $schemaId
- * The ID to use for the schema, which will become the final component of
- * the schema's resource name.
- *
- * See https://cloud.google.com/pubsub/docs/admin#resource_names for resource
- * name constraints.
- * @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 \Google\Cloud\PubSub\V1\Schema
- *
- * @throws ApiException if the remote call fails
- */
- public function createSchema($parent, $schema, array $optionalArgs = [])
- {
- $request = new CreateSchemaRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setSchema($schema);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['schemaId'])) {
- $request->setSchemaId($optionalArgs['schemaId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateSchema', Schema::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Deletes a schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * $schemaServiceClient->deleteSchema($formattedName);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. Name of the schema to delete.
- * Format is `projects/{project}/schemas/{schema}`.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteSchema($name, array $optionalArgs = [])
- {
- $request = new DeleteSchemaRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteSchema', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Deletes a specific schema revision.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * $revisionId = 'revision_id';
- * $response = $schemaServiceClient->deleteSchemaRevision($formattedName, $revisionId);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the schema revision to be deleted, with a revision ID
- * explicitly included.
- *
- * Example: `projects/123/schemas/my-schema@c7cfa2a8`
- * @param string $revisionId Optional. This field is deprecated and should not be used for specifying
- * the revision ID. The revision ID should be specified via the `name`
- * parameter.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Schema
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteSchemaRevision($name, $revisionId, array $optionalArgs = [])
- {
- $request = new DeleteSchemaRevisionRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setRevisionId($revisionId);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteSchemaRevision', Schema::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets a schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * $response = $schemaServiceClient->getSchema($formattedName);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the schema to get.
- * Format is `projects/{project}/schemas/{schema}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $view
- * The set of fields to return in the response. If not set, returns a Schema
- * with all fields filled out. Set to `BASIC` to omit the `definition`.
- * For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\SchemaView}
- * @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 \Google\Cloud\PubSub\V1\Schema
- *
- * @throws ApiException if the remote call fails
- */
- public function getSchema($name, array $optionalArgs = [])
- {
- $request = new GetSchemaRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['view'])) {
- $request->setView($optionalArgs['view']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetSchema', Schema::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists all schema revisions for the named schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * // Iterate over pages of elements
- * $pagedResponse = $schemaServiceClient->listSchemaRevisions($formattedName);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $schemaServiceClient->listSchemaRevisions($formattedName);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the schema to list revisions for.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $view
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- * For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\SchemaView}
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listSchemaRevisions($name, array $optionalArgs = [])
- {
- $request = new ListSchemaRevisionsRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['view'])) {
- $request->setView($optionalArgs['view']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListSchemaRevisions', $optionalArgs, ListSchemaRevisionsResponse::class, $request);
- }
-
- /**
- * Lists schemas in a project.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedParent = $schemaServiceClient->projectName('[PROJECT]');
- * // Iterate over pages of elements
- * $pagedResponse = $schemaServiceClient->listSchemas($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $schemaServiceClient->listSchemas($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The name of the project in which to list schemas.
- * Format is `projects/{project-id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $view
- * The set of Schema fields to return in the response. If not set, returns
- * Schemas with `name` and `type`, but not `definition`. Set to `FULL` to
- * retrieve all fields.
- * For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\SchemaView}
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listSchemas($parent, array $optionalArgs = [])
- {
- $request = new ListSchemasRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['view'])) {
- $request->setView($optionalArgs['view']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListSchemas', $optionalArgs, ListSchemasResponse::class, $request);
- }
-
- /**
- * Creates a new schema revision that is a copy of the provided revision_id.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedName = $schemaServiceClient->schemaName('[PROJECT]', '[SCHEMA]');
- * $revisionId = 'revision_id';
- * $response = $schemaServiceClient->rollbackSchema($formattedName, $revisionId);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $name Required. The schema being rolled back with revision id.
- * @param string $revisionId Required. The revision ID to roll back to.
- * It must be a revision of the same schema.
- *
- * Example: c7cfa2a8
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Schema
- *
- * @throws ApiException if the remote call fails
- */
- public function rollbackSchema($name, $revisionId, array $optionalArgs = [])
- {
- $request = new RollbackSchemaRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setRevisionId($revisionId);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('RollbackSchema', Schema::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Validates a message against a schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedParent = $schemaServiceClient->projectName('[PROJECT]');
- * $response = $schemaServiceClient->validateMessage($formattedParent);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Name of the schema against which to validate.
- *
- * Format is `projects/{project}/schemas/{schema}`.
- * @type Schema $schema
- * Ad-hoc schema against which to validate
- * @type string $message
- * Message to validate against the provided `schema_spec`.
- * @type int $encoding
- * The encoding expected for messages
- * For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\Encoding}
- * @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 \Google\Cloud\PubSub\V1\ValidateMessageResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function validateMessage($parent, array $optionalArgs = [])
- {
- $request = new ValidateMessageRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- }
-
- if (isset($optionalArgs['schema'])) {
- $request->setSchema($optionalArgs['schema']);
- }
-
- if (isset($optionalArgs['message'])) {
- $request->setMessage($optionalArgs['message']);
- }
-
- if (isset($optionalArgs['encoding'])) {
- $request->setEncoding($optionalArgs['encoding']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('ValidateMessage', ValidateMessageResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Validates a schema.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $formattedParent = $schemaServiceClient->projectName('[PROJECT]');
- * $schema = new Schema();
- * $response = $schemaServiceClient->validateSchema($formattedParent, $schema);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The name of the project in which to validate schemas.
- * Format is `projects/{project-id}`.
- * @param Schema $schema Required. The schema object to validate.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\ValidateSchemaResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function validateSchema($parent, $schema, array $optionalArgs = [])
- {
- $request = new ValidateSchemaRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setSchema($schema);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('ValidateSchema', ValidateSchemaResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $resource = 'resource';
- * $response = $schemaServiceClient->getIamPolicy($resource);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $schemaServiceClient->setIamPolicy($resource, $policy);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $schemaServiceClient = new SchemaServiceClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $schemaServiceClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $schemaServiceClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @param array $optionalArgs {
- * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/Gapic/SubscriberGapicClient.php b/owl-bot-staging/PubSub/v1/src/V1/Gapic/SubscriberGapicClient.php
deleted file mode 100644
index 1af6122db2cb..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/Gapic/SubscriberGapicClient.php
+++ /dev/null
@@ -1,1655 +0,0 @@
-subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $ackIds = [];
- * $subscriberClient->acknowledge($formattedSubscription, $ackIds);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * This service has a new (beta) implementation. See {@see
- * \Google\Cloud\PubSub\V1\Client\SubscriberClient} to use the new surface.
- */
-class SubscriberGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.pubsub.v1.Subscriber';
-
- /** The default address of the service. */
- const SERVICE_ADDRESS = 'pubsub.googleapis.com';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- 'https://www.googleapis.com/auth/pubsub',
- ];
-
- private static $deletedTopicNameTemplate;
-
- private static $projectNameTemplate;
-
- private static $projectTopicNameTemplate;
-
- private static $snapshotNameTemplate;
-
- private static $subscriptionNameTemplate;
-
- private static $topicNameTemplate;
-
- private static $pathTemplateMap;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/subscriber_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/subscriber_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/subscriber_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/subscriber_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getDeletedTopicNameTemplate()
- {
- if (self::$deletedTopicNameTemplate == null) {
- self::$deletedTopicNameTemplate = new PathTemplate('_deleted-topic_');
- }
-
- return self::$deletedTopicNameTemplate;
- }
-
- private static function getProjectNameTemplate()
- {
- if (self::$projectNameTemplate == null) {
- self::$projectNameTemplate = new PathTemplate('projects/{project}');
- }
-
- return self::$projectNameTemplate;
- }
-
- private static function getProjectTopicNameTemplate()
- {
- if (self::$projectTopicNameTemplate == null) {
- self::$projectTopicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}');
- }
-
- return self::$projectTopicNameTemplate;
- }
-
- private static function getSnapshotNameTemplate()
- {
- if (self::$snapshotNameTemplate == null) {
- self::$snapshotNameTemplate = new PathTemplate('projects/{project}/snapshots/{snapshot}');
- }
-
- return self::$snapshotNameTemplate;
- }
-
- private static function getSubscriptionNameTemplate()
- {
- if (self::$subscriptionNameTemplate == null) {
- self::$subscriptionNameTemplate = new PathTemplate('projects/{project}/subscriptions/{subscription}');
- }
-
- return self::$subscriptionNameTemplate;
- }
-
- private static function getTopicNameTemplate()
- {
- if (self::$topicNameTemplate == null) {
- self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}');
- }
-
- return self::$topicNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'deletedTopic' => self::getDeletedTopicNameTemplate(),
- 'project' => self::getProjectNameTemplate(),
- 'projectTopic' => self::getProjectTopicNameTemplate(),
- 'snapshot' => self::getSnapshotNameTemplate(),
- 'subscription' => self::getSubscriptionNameTemplate(),
- 'topic' => self::getTopicNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * _deleted-topic_ resource.
- *
- * @return string The formatted _deleted-topic_ resource.
- */
- public static function deletedTopicName()
- {
- return self::getDeletedTopicNameTemplate()->render([]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a project
- * resource.
- *
- * @param string $project
- *
- * @return string The formatted project resource.
- */
- public static function projectName($project)
- {
- return self::getProjectNameTemplate()->render([
- 'project' => $project,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * project_topic resource.
- *
- * @param string $project
- * @param string $topic
- *
- * @return string The formatted project_topic resource.
- */
- public static function projectTopicName($project, $topic)
- {
- return self::getProjectTopicNameTemplate()->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a snapshot
- * resource.
- *
- * @param string $project
- * @param string $snapshot
- *
- * @return string The formatted snapshot resource.
- */
- public static function snapshotName($project, $snapshot)
- {
- return self::getSnapshotNameTemplate()->render([
- 'project' => $project,
- 'snapshot' => $snapshot,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subscription
- * resource.
- *
- * @param string $project
- * @param string $subscription
- *
- * @return string The formatted subscription resource.
- */
- public static function subscriptionName($project, $subscription)
- {
- return self::getSubscriptionNameTemplate()->render([
- 'project' => $project,
- 'subscription' => $subscription,
- ]);
- }
-
- /**
- * 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($project, $topic)
- {
- return self::getTopicNameTemplate()->render([
- 'project' => $project,
- 'topic' => $topic,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - deletedTopic: _deleted-topic_
- * - project: projects/{project}
- * - projectTopic: projects/{project}/topics/{topic}
- * - snapshot: projects/{project}/snapshots/{snapshot}
- * - subscription: projects/{project}/subscriptions/{subscription}
- * - topic: projects/{project}/topics/{topic}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'pubsub.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /**
- * Acknowledges the messages associated with the `ack_ids` in the
- * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
- * from the subscription.
- *
- * Acknowledging a message whose ack deadline has expired may succeed,
- * but such a message may be redelivered later. Acknowledging a message more
- * than once will not result in an error.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $ackIds = [];
- * $subscriberClient->acknowledge($formattedSubscription, $ackIds);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The subscription whose message is being acknowledged.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param string[] $ackIds Required. The acknowledgment ID for the messages being acknowledged that
- * was returned by the Pub/Sub system in the `Pull` response. Must not be
- * empty.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function acknowledge($subscription, $ackIds, array $optionalArgs = [])
- {
- $request = new AcknowledgeRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $request->setAckIds($ackIds);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('Acknowledge', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Creates a snapshot from the requested subscription. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- * If the snapshot already exists, returns `ALREADY_EXISTS`.
- * If the requested subscription doesn't exist, returns `NOT_FOUND`.
- * If the backlog in the subscription is too old -- and the resulting snapshot
- * would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
- * See also the `Snapshot.expire_time` field. If the name is not provided in
- * the request, the server will assign a random
- * name for this snapshot on the same project as the subscription, conforming
- * to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
- * generated name is populated in the returned Snapshot object. Note that for
- * REST API requests, you must specify a name in the request.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedName = $subscriberClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $response = $subscriberClient->createSnapshot($formattedName, $formattedSubscription);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $name Required. User-provided name for this snapshot. If the name is not provided
- * in the request, the server will assign a random name for this snapshot on
- * the same project as the subscription. Note that for REST API requests, you
- * must specify a name. See the [resource name
- * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * Format is `projects/{project}/snapshots/{snap}`.
- * @param string $subscription Required. The subscription whose backlog the snapshot retains.
- * Specifically, the created snapshot is guaranteed to retain:
- * (a) The existing backlog on the subscription. More precisely, this is
- * defined as the messages in the subscription's backlog that are
- * unacknowledged upon the successful completion of the
- * `CreateSnapshot` request; as well as:
- * (b) Any messages published to the subscription's topic following the
- * successful completion of the CreateSnapshot request.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type array $labels
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- * @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 \Google\Cloud\PubSub\V1\Snapshot
- *
- * @throws ApiException if the remote call fails
- */
- public function createSnapshot($name, $subscription, array $optionalArgs = [])
- {
- $request = new CreateSnapshotRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setSubscription($subscription);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['labels'])) {
- $request->setLabels($optionalArgs['labels']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateSnapshot', Snapshot::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Creates a subscription to a given topic. See the [resource name rules]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).
- * If the subscription already exists, returns `ALREADY_EXISTS`.
- * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
- *
- * If the name is not provided in the request, the server will assign a random
- * name for this subscription on the same project as the topic, conforming
- * to the [resource name format]
- * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The
- * generated name is populated in the returned Subscription object. Note that
- * for REST API requests, you must specify a name in the request.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $name = 'name';
- * $formattedTopic = $subscriberClient->topicName('[PROJECT]', '[TOPIC]');
- * $response = $subscriberClient->createSubscription($name, $formattedTopic);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the subscription. It must have the format
- * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
- * start with a letter, and contain only letters (`[A-Za-z]`), numbers
- * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
- * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
- * in length, and it must not start with `"goog"`.
- * @param string $topic Required. The name of the topic from which this subscription is receiving
- * messages. Format is `projects/{project}/topics/{topic}`. The value of this
- * field will be `_deleted-topic_` if the topic has been deleted.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type PushConfig $pushConfig
- * If push delivery is used with this subscription, this field is
- * used to configure it.
- * @type BigQueryConfig $bigqueryConfig
- * If delivery to BigQuery is used with this subscription, this field is
- * used to configure it.
- * @type CloudStorageConfig $cloudStorageConfig
- * If delivery to Google Cloud Storage is used with this subscription, this
- * field is used to configure it.
- * @type int $ackDeadlineSeconds
- * The approximate amount of time (on a best-effort basis) Pub/Sub waits for
- * the subscriber to acknowledge receipt before resending the message. In the
- * interval after the message is delivered and before it is acknowledged, it
- * is considered to be _outstanding_. During that time period, the
- * message will not be redelivered (on a best-effort basis).
- *
- * For pull subscriptions, this value is used as the initial value for the ack
- * deadline. To override this value for a given message, call
- * `ModifyAckDeadline` with the corresponding `ack_id` if using
- * non-streaming pull or send the `ack_id` in a
- * `StreamingModifyAckDeadlineRequest` if using streaming pull.
- * The minimum custom deadline you can specify is 10 seconds.
- * The maximum custom deadline you can specify is 600 seconds (10 minutes).
- * If this parameter is 0, a default value of 10 seconds is used.
- *
- * For push delivery, this value is also used to set the request timeout for
- * the call to the push endpoint.
- *
- * If the subscriber never acknowledges the message, the Pub/Sub
- * system will eventually redeliver the message.
- * @type bool $retainAckedMessages
- * Indicates whether to retain acknowledged messages. If true, then
- * messages are not expunged from the subscription's backlog, even if they are
- * acknowledged, until they fall out of the `message_retention_duration`
- * window. This must be true if you would like to [`Seek` to a timestamp]
- * (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
- * the past to replay previously-acknowledged messages.
- * @type Duration $messageRetentionDuration
- * How long to retain unacknowledged messages in the subscription's backlog,
- * from the moment a message is published.
- * If `retain_acked_messages` is true, then this also configures the retention
- * of acknowledged messages, and thus configures how far back in time a `Seek`
- * can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
- * minutes.
- * @type array $labels
- * See [Creating and managing
- * labels](https://cloud.google.com/pubsub/docs/labels).
- * @type bool $enableMessageOrdering
- * If true, messages published with the same `ordering_key` in `PubsubMessage`
- * will be delivered to the subscribers in the order in which they
- * are received by the Pub/Sub system. Otherwise, they may be delivered in
- * any order.
- * @type ExpirationPolicy $expirationPolicy
- * A policy that specifies the conditions for this subscription's expiration.
- * A subscription is considered active as long as any connected subscriber is
- * successfully consuming messages from the subscription or is issuing
- * operations on the subscription. If `expiration_policy` is not set, a
- * *default policy* with `ttl` of 31 days will be used. The minimum allowed
- * value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set,
- * but `expiration_policy.ttl` is not set, the subscription never expires.
- * @type string $filter
- * An expression written in the Pub/Sub [filter
- * language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
- * then only `PubsubMessage`s whose `attributes` field matches the filter are
- * delivered on this subscription. If empty, then no messages are filtered
- * out.
- * @type DeadLetterPolicy $deadLetterPolicy
- * A policy that specifies the conditions for dead lettering messages in
- * this subscription. If dead_letter_policy is not set, dead lettering
- * is disabled.
- *
- * The Cloud Pub/Sub service account associated with this subscriptions's
- * parent project (i.e.,
- * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
- * permission to Acknowledge() messages on this subscription.
- * @type RetryPolicy $retryPolicy
- * A policy that specifies how Pub/Sub retries message delivery for this
- * subscription.
- *
- * If not set, the default retry policy is applied. This generally implies
- * that messages will be retried as soon as possible for healthy subscribers.
- * RetryPolicy will be triggered on NACKs or acknowledgement deadline
- * exceeded events for a given message.
- * @type bool $detached
- * Indicates whether the subscription is detached from its topic. Detached
- * subscriptions don't receive messages from their topic and don't retain any
- * backlog. `Pull` and `StreamingPull` requests will return
- * FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
- * the endpoint will not be made.
- * @type bool $enableExactlyOnceDelivery
- * If true, Pub/Sub provides the following guarantees for the delivery of
- * a message with a given value of `message_id` on this subscription:
- *
- * * The message sent to a subscriber is guaranteed not to be resent
- * before the message's acknowledgement deadline expires.
- * * An acknowledged message will not be resent to a subscriber.
- *
- * Note that subscribers may still receive multiple copies of a message
- * when `enable_exactly_once_delivery` is true if the message was published
- * multiple times by a publisher client. These copies are considered distinct
- * by Pub/Sub and have distinct `message_id` values.
- * @type Duration $topicMessageRetentionDuration
- * Output only. Indicates the minimum duration for which a message is retained
- * after it is published to the subscription's topic. If this field is set,
- * messages published to the subscription's topic in the last
- * `topic_message_retention_duration` are always available to subscribers. See
- * the `message_retention_duration` field in `Topic`. This field is set only
- * in responses from the server; it is ignored if it is set in any requests.
- * @type int $state
- * Output only. An output-only field indicating whether or not the
- * subscription can receive messages.
- * For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\Subscription\State}
- * @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 \Google\Cloud\PubSub\V1\Subscription
- *
- * @throws ApiException if the remote call fails
- */
- public function createSubscription($name, $topic, array $optionalArgs = [])
- {
- $request = new Subscription();
- $requestParamHeaders = [];
- $request->setName($name);
- $request->setTopic($topic);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['pushConfig'])) {
- $request->setPushConfig($optionalArgs['pushConfig']);
- }
-
- if (isset($optionalArgs['bigqueryConfig'])) {
- $request->setBigqueryConfig($optionalArgs['bigqueryConfig']);
- }
-
- if (isset($optionalArgs['cloudStorageConfig'])) {
- $request->setCloudStorageConfig($optionalArgs['cloudStorageConfig']);
- }
-
- if (isset($optionalArgs['ackDeadlineSeconds'])) {
- $request->setAckDeadlineSeconds($optionalArgs['ackDeadlineSeconds']);
- }
-
- if (isset($optionalArgs['retainAckedMessages'])) {
- $request->setRetainAckedMessages($optionalArgs['retainAckedMessages']);
- }
-
- if (isset($optionalArgs['messageRetentionDuration'])) {
- $request->setMessageRetentionDuration($optionalArgs['messageRetentionDuration']);
- }
-
- if (isset($optionalArgs['labels'])) {
- $request->setLabels($optionalArgs['labels']);
- }
-
- if (isset($optionalArgs['enableMessageOrdering'])) {
- $request->setEnableMessageOrdering($optionalArgs['enableMessageOrdering']);
- }
-
- if (isset($optionalArgs['expirationPolicy'])) {
- $request->setExpirationPolicy($optionalArgs['expirationPolicy']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['deadLetterPolicy'])) {
- $request->setDeadLetterPolicy($optionalArgs['deadLetterPolicy']);
- }
-
- if (isset($optionalArgs['retryPolicy'])) {
- $request->setRetryPolicy($optionalArgs['retryPolicy']);
- }
-
- if (isset($optionalArgs['detached'])) {
- $request->setDetached($optionalArgs['detached']);
- }
-
- if (isset($optionalArgs['enableExactlyOnceDelivery'])) {
- $request->setEnableExactlyOnceDelivery($optionalArgs['enableExactlyOnceDelivery']);
- }
-
- if (isset($optionalArgs['topicMessageRetentionDuration'])) {
- $request->setTopicMessageRetentionDuration($optionalArgs['topicMessageRetentionDuration']);
- }
-
- if (isset($optionalArgs['state'])) {
- $request->setState($optionalArgs['state']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateSubscription', Subscription::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Removes an existing snapshot. Snapshots are used in [Seek]
- * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- * When the snapshot is deleted, all messages retained in the snapshot
- * are immediately dropped. After a snapshot is deleted, a new one may be
- * created with the same name, but the new one has no association with the old
- * snapshot or its subscription, unless the same subscription is specified.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSnapshot = $subscriberClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- * $subscriberClient->deleteSnapshot($formattedSnapshot);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $snapshot Required. The name of the snapshot to delete.
- * Format is `projects/{project}/snapshots/{snap}`.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteSnapshot($snapshot, array $optionalArgs = [])
- {
- $request = new DeleteSnapshotRequest();
- $requestParamHeaders = [];
- $request->setSnapshot($snapshot);
- $requestParamHeaders['snapshot'] = $snapshot;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteSnapshot', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Deletes an existing subscription. All messages retained in the subscription
- * are immediately dropped. Calls to `Pull` after deletion will return
- * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
- * the same name, but the new one has no association with the old
- * subscription or its topic unless the same topic is specified.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $subscriberClient->deleteSubscription($formattedSubscription);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The subscription to delete.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteSubscription($subscription, array $optionalArgs = [])
- {
- $request = new DeleteSubscriptionRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteSubscription', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the configuration details of a snapshot. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSnapshot = $subscriberClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- * $response = $subscriberClient->getSnapshot($formattedSnapshot);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $snapshot Required. The name of the snapshot to get.
- * Format is `projects/{project}/snapshots/{snap}`.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Snapshot
- *
- * @throws ApiException if the remote call fails
- */
- public function getSnapshot($snapshot, array $optionalArgs = [])
- {
- $request = new GetSnapshotRequest();
- $requestParamHeaders = [];
- $request->setSnapshot($snapshot);
- $requestParamHeaders['snapshot'] = $snapshot;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetSnapshot', Snapshot::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the configuration details of a subscription.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $response = $subscriberClient->getSubscription($formattedSubscription);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The name of the subscription to get.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Subscription
- *
- * @throws ApiException if the remote call fails
- */
- public function getSubscription($subscription, array $optionalArgs = [])
- {
- $request = new GetSubscriptionRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetSubscription', Subscription::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists the existing snapshots. Snapshots are used in [Seek](
- * https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedProject = $subscriberClient->projectName('[PROJECT]');
- * // Iterate over pages of elements
- * $pagedResponse = $subscriberClient->listSnapshots($formattedProject);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $subscriberClient->listSnapshots($formattedProject);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $project Required. The name of the project in which to list snapshots.
- * Format is `projects/{project-id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listSnapshots($project, array $optionalArgs = [])
- {
- $request = new ListSnapshotsRequest();
- $requestParamHeaders = [];
- $request->setProject($project);
- $requestParamHeaders['project'] = $project;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListSnapshots', $optionalArgs, ListSnapshotsResponse::class, $request);
- }
-
- /**
- * Lists matching subscriptions.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedProject = $subscriberClient->projectName('[PROJECT]');
- * // Iterate over pages of elements
- * $pagedResponse = $subscriberClient->listSubscriptions($formattedProject);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $subscriberClient->listSubscriptions($formattedProject);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $project Required. The name of the project in which to list subscriptions.
- * Format is `projects/{project-id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listSubscriptions($project, array $optionalArgs = [])
- {
- $request = new ListSubscriptionsRequest();
- $requestParamHeaders = [];
- $request->setProject($project);
- $requestParamHeaders['project'] = $project;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListSubscriptions', $optionalArgs, ListSubscriptionsResponse::class, $request);
- }
-
- /**
- * Modifies the ack deadline for a specific message. This method is useful
- * to indicate that more time is needed to process a message by the
- * subscriber, or to make the message available for redelivery if the
- * processing was interrupted. Note that this does not modify the
- * subscription-level `ackDeadlineSeconds` used for subsequent messages.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $ackIds = [];
- * $ackDeadlineSeconds = 0;
- * $subscriberClient->modifyAckDeadline($formattedSubscription, $ackIds, $ackDeadlineSeconds);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param string[] $ackIds Required. List of acknowledgment IDs.
- * @param int $ackDeadlineSeconds Required. The new ack deadline with respect to the time this request was
- * sent to the Pub/Sub system. For example, if the value is 10, the new ack
- * deadline will expire 10 seconds after the `ModifyAckDeadline` call was
- * made. Specifying zero might immediately make the message available for
- * delivery to another subscriber client. This typically results in an
- * increase in the rate of message redeliveries (that is, duplicates).
- * The minimum deadline you can specify is 0 seconds.
- * The maximum deadline you can specify is 600 seconds (10 minutes).
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function modifyAckDeadline($subscription, $ackIds, $ackDeadlineSeconds, array $optionalArgs = [])
- {
- $request = new ModifyAckDeadlineRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $request->setAckIds($ackIds);
- $request->setAckDeadlineSeconds($ackDeadlineSeconds);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('ModifyAckDeadline', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Modifies the `PushConfig` for a specified subscription.
- *
- * This may be used to change a push subscription to a pull one (signified by
- * an empty `PushConfig`) or vice versa, or change the endpoint URL and other
- * attributes of a push subscription. Messages will accumulate for delivery
- * continuously through the call regardless of changes to the `PushConfig`.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $pushConfig = new PushConfig();
- * $subscriberClient->modifyPushConfig($formattedSubscription, $pushConfig);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The name of the subscription.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param PushConfig $pushConfig Required. The push configuration for future deliveries.
- *
- * An empty `pushConfig` indicates that the Pub/Sub system should
- * stop pushing messages from the given subscription and allow
- * messages to be pulled and acknowledged - effectively pausing
- * the subscription if `Pull` or `StreamingPull` is not called.
- * @param array $optionalArgs {
- * 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.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function modifyPushConfig($subscription, $pushConfig, array $optionalArgs = [])
- {
- $request = new ModifyPushConfigRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $request->setPushConfig($pushConfig);
- $requestParamHeaders['subscription'] = $subscription;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('ModifyPushConfig', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Pulls messages from the server.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $maxMessages = 0;
- * $response = $subscriberClient->pull($formattedSubscription, $maxMessages);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The subscription from which messages should be pulled.
- * Format is `projects/{project}/subscriptions/{sub}`.
- * @param int $maxMessages Required. The maximum number of messages to return for this request. Must
- * be a positive integer. The Pub/Sub system may return fewer than the number
- * specified.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $returnImmediately
- * Optional. If this field set to true, the system will respond immediately
- * even if it there are no messages available to return in the `Pull`
- * response. Otherwise, the system may wait (for a bounded amount of time)
- * until at least one message is available, rather than returning no messages.
- * Warning: setting this field to `true` is discouraged because it adversely
- * impacts the performance of `Pull` operations. We recommend that users do
- * not set this field.
- * @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 \Google\Cloud\PubSub\V1\PullResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function pull($subscription, $maxMessages, array $optionalArgs = [])
- {
- $request = new PullRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $request->setMaxMessages($maxMessages);
- $requestParamHeaders['subscription'] = $subscription;
- if (isset($optionalArgs['returnImmediately'])) {
- $request->setReturnImmediately($optionalArgs['returnImmediately']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('Pull', PullResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Seeks an existing subscription to a point in time or to a given snapshot,
- * whichever is provided in the request. Snapshots are used in [Seek]
- * (https://cloud.google.com/pubsub/docs/replay-overview) operations, which
- * allow you to manage message acknowledgments in bulk. That is, you can set
- * the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot. Note that both the subscription and the
- * snapshot must be on the same topic.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $formattedSubscription = $subscriberClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- * $response = $subscriberClient->seek($formattedSubscription);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $subscription Required. The subscription to affect.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type Timestamp $time
- * The time to seek to.
- * Messages retained in the subscription that were published before this
- * time are marked as acknowledged, and messages retained in the
- * subscription that were published after this time are marked as
- * unacknowledged. Note that this operation affects only those messages
- * retained in the subscription (configured by the combination of
- * `message_retention_duration` and `retain_acked_messages`). For example,
- * if `time` corresponds to a point before the message retention
- * window (or to a point before the system's notion of the subscription
- * creation time), only retained messages will be marked as unacknowledged,
- * and already-expunged messages will not be restored.
- * @type string $snapshot
- * The snapshot to seek to. The snapshot's topic must be the same as that of
- * the provided subscription.
- * Format is `projects/{project}/snapshots/{snap}`.
- * @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 \Google\Cloud\PubSub\V1\SeekResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function seek($subscription, array $optionalArgs = [])
- {
- $request = new SeekRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $requestParamHeaders['subscription'] = $subscription;
- if (isset($optionalArgs['time'])) {
- $request->setTime($optionalArgs['time']);
- }
-
- if (isset($optionalArgs['snapshot'])) {
- $request->setSnapshot($optionalArgs['snapshot']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('Seek', SeekResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Establishes a stream with the server, which sends messages down to the
- * client. The client streams acknowledgements and ack deadline modifications
- * back to the server. The server will close the stream and return the status
- * on any error. The server may close the stream with status `UNAVAILABLE` to
- * reassign server-side resources, in which case, the client should
- * re-establish the stream. Flow control can be achieved by configuring the
- * underlying RPC channel.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $subscription = 'subscription';
- * $streamAckDeadlineSeconds = 0;
- * $request = new StreamingPullRequest();
- * $request->setSubscription($subscription);
- * $request->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds);
- * // Write all requests to the server, then read all responses until the
- * // stream is complete
- * $requests = [
- * $request,
- * ];
- * $stream = $subscriberClient->streamingPull();
- * $stream->writeAll($requests);
- * foreach ($stream->closeWriteAndReadAll() as $element) {
- * // doSomethingWith($element);
- * }
- * // Alternatively:
- * // Write requests individually, making read() calls if
- * // required. Call closeWrite() once writes are complete, and read the
- * // remaining responses from the server.
- * $requests = [
- * $request,
- * ];
- * $stream = $subscriberClient->streamingPull();
- * foreach ($requests as $request) {
- * $stream->write($request);
- * // if required, read a single response from the stream
- * $element = $stream->read();
- * // doSomethingWith($element)
- * }
- * $stream->closeWrite();
- * $element = $stream->read();
- * while (!is_null($element)) {
- * // doSomethingWith($element)
- * $element = $stream->read();
- * }
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return \Google\ApiCore\BidiStream
- *
- * @throws ApiException if the remote call fails
- */
- public function streamingPull(array $optionalArgs = [])
- {
- return $this->startCall('StreamingPull', StreamingPullResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL);
- }
-
- /**
- * Updates an existing snapshot. Snapshots are used in
- * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
- * which allow you to manage message acknowledgments in bulk. That is, you can
- * set the acknowledgment state of messages in an existing subscription to the
- * state captured by a snapshot.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $snapshot = new Snapshot();
- * $updateMask = new FieldMask();
- * $response = $subscriberClient->updateSnapshot($snapshot, $updateMask);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param Snapshot $snapshot Required. The updated snapshot object.
- * @param FieldMask $updateMask Required. Indicates which fields in the provided snapshot to update.
- * Must be specified and non-empty.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Snapshot
- *
- * @throws ApiException if the remote call fails
- */
- public function updateSnapshot($snapshot, $updateMask, array $optionalArgs = [])
- {
- $request = new UpdateSnapshotRequest();
- $requestParamHeaders = [];
- $request->setSnapshot($snapshot);
- $request->setUpdateMask($updateMask);
- $requestParamHeaders['snapshot.name'] = $snapshot->getName();
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateSnapshot', Snapshot::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Updates an existing subscription. Note that certain properties of a
- * subscription, such as its topic, are not modifiable.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $subscription = new Subscription();
- * $updateMask = new FieldMask();
- * $response = $subscriberClient->updateSubscription($subscription, $updateMask);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param Subscription $subscription Required. The updated subscription object.
- * @param FieldMask $updateMask Required. Indicates which fields in the provided subscription to update.
- * Must be specified and non-empty.
- * @param array $optionalArgs {
- * 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 \Google\Cloud\PubSub\V1\Subscription
- *
- * @throws ApiException if the remote call fails
- */
- public function updateSubscription($subscription, $updateMask, array $optionalArgs = [])
- {
- $request = new UpdateSubscriptionRequest();
- $requestParamHeaders = [];
- $request->setSubscription($subscription);
- $request->setUpdateMask($updateMask);
- $requestParamHeaders['subscription.name'] = $subscription->getName();
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateSubscription', Subscription::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $resource = 'resource';
- * $response = $subscriberClient->getIamPolicy($resource);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $subscriberClient->setIamPolicy($resource, $policy);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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 \Google\Cloud\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $subscriberClient = new SubscriberClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $subscriberClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $subscriberClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @param array $optionalArgs {
- * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/PublisherClient.php b/owl-bot-staging/PubSub/v1/src/V1/PublisherClient.php
deleted file mode 100644
index 1b6559bdc458..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/PublisherClient.php
+++ /dev/null
@@ -1,34 +0,0 @@
- [
- 'google.pubsub.v1.Publisher' => [
- 'CreateTopic' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Topic',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteTopic' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'topic',
- 'fieldAccessors' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'DetachSubscription' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\DetachSubscriptionResponse',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'GetTopic' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Topic',
- 'headerParams' => [
- [
- 'keyName' => 'topic',
- 'fieldAccessors' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopicSnapshots' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSnapshots',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListTopicSnapshotsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'topic',
- 'fieldAccessors' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopicSubscriptions' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSubscriptions',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListTopicSubscriptionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'topic',
- 'fieldAccessors' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopics' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getTopics',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListTopicsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'project',
- 'fieldAccessors' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'Publish' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\PublishResponse',
- 'headerParams' => [
- [
- 'keyName' => 'topic',
- 'fieldAccessors' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'UpdateTopic' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Topic',
- 'headerParams' => [
- [
- 'keyName' => 'topic.name',
- 'fieldAccessors' => [
- 'getTopic',
- 'getName',
- ],
- ],
- ],
- ],
- 'GetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'templateMap' => [
- 'deletedTopic' => '_deleted-topic_',
- 'project' => 'projects/{project}',
- 'projectTopic' => 'projects/{project}/topics/{topic}',
- 'schema' => 'projects/{project}/schemas/{schema}',
- 'subscription' => 'projects/{project}/subscriptions/{subscription}',
- 'topic' => 'projects/{project}/topics/{topic}',
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/publisher_rest_client_config.php b/owl-bot-staging/PubSub/v1/src/V1/resources/publisher_rest_client_config.php
deleted file mode 100644
index fbf6fd4b9f2e..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/publisher_rest_client_config.php
+++ /dev/null
@@ -1,197 +0,0 @@
- [
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.pubsub.v1.Publisher' => [
- 'CreateTopic' => [
- 'method' => 'put',
- 'uriTemplate' => '/v1/{name=projects/*/topics/*}',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteTopic' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{topic=projects/*/topics/*}',
- 'placeholders' => [
- 'topic' => [
- 'getters' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'DetachSubscription' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:detach',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'GetTopic' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{topic=projects/*/topics/*}',
- 'placeholders' => [
- 'topic' => [
- 'getters' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopicSnapshots' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{topic=projects/*/topics/*}/snapshots',
- 'placeholders' => [
- 'topic' => [
- 'getters' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopicSubscriptions' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{topic=projects/*/topics/*}/subscriptions',
- 'placeholders' => [
- 'topic' => [
- 'getters' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'ListTopics' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{project=projects/*}/topics',
- 'placeholders' => [
- 'project' => [
- 'getters' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'Publish' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{topic=projects/*/topics/*}:publish',
- 'body' => '*',
- 'placeholders' => [
- 'topic' => [
- 'getters' => [
- 'getTopic',
- ],
- ],
- ],
- ],
- 'UpdateTopic' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1/{topic.name=projects/*/topics/*}',
- 'body' => '*',
- 'placeholders' => [
- 'topic.name' => [
- 'getters' => [
- 'getTopic',
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_client_config.json b/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_client_config.json
deleted file mode 100644
index 2773e2ae2d5e..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_client_config.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "interfaces": {
- "google.pubsub.v1.SchemaService": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_8_codes": [
- "UNAVAILABLE"
- ]
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_8_params": {
- "initial_retry_delay_millis": 100,
- "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
- }
- },
- "methods": {
- "CommitSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "CreateSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "DeleteSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "DeleteSchemaRevision": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "GetSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "ListSchemaRevisions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "ListSchemas": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "RollbackSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "ValidateMessage": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "ValidateSchema": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_8_codes",
- "retry_params_name": "retry_policy_8_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- }
- }
- }
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_descriptor_config.php b/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_descriptor_config.php
deleted file mode 100644
index 419ce2442082..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_descriptor_config.php
+++ /dev/null
@@ -1,187 +0,0 @@
- [
- 'google.pubsub.v1.SchemaService' => [
- 'CommitSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Schema',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'CreateSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Schema',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteSchemaRevision' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Schema',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Schema',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListSchemaRevisions' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSchemas',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListSchemaRevisionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListSchemas' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSchemas',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListSchemasResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'RollbackSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Schema',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ValidateMessage' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ValidateMessageResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ValidateSchema' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ValidateSchemaResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'GetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'templateMap' => [
- 'project' => 'projects/{project}',
- 'schema' => 'projects/{project}/schemas/{schema}',
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_rest_client_config.php b/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_rest_client_config.php
deleted file mode 100644
index f91306680604..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/schema_service_rest_client_config.php
+++ /dev/null
@@ -1,209 +0,0 @@
- [
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.pubsub.v1.SchemaService' => [
- 'CommitSchema' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}:commit',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'CreateSchema' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{parent=projects/*}/schemas',
- 'body' => 'schema',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteSchema' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteSchemaRevision' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}:deleteRevision',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetSchema' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListSchemaRevisions' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}:listRevisions',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListSchemas' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{parent=projects/*}/schemas',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'RollbackSchema' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{name=projects/*/schemas/*}:rollback',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ValidateMessage' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{parent=projects/*}/schemas:validateMessage',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ValidateSchema' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{parent=projects/*}/schemas:validate',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_client_config.json b/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_client_config.json
deleted file mode 100644
index c4812e9de3f8..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_client_config.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "interfaces": {
- "google.pubsub.v1.Subscriber": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_4_codes": [
- "DEADLINE_EXCEEDED",
- "RESOURCE_EXHAUSTED",
- "ABORTED",
- "INTERNAL",
- "UNAVAILABLE"
- ],
- "retry_policy_5_codes": [
- "UNKNOWN",
- "ABORTED",
- "UNAVAILABLE",
- "INTERNAL"
- ],
- "retry_policy_6_codes": [
- "UNKNOWN",
- "ABORTED",
- "UNAVAILABLE"
- ],
- "retry_policy_7_codes": [
- "UNAVAILABLE"
- ]
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_4_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 4.0,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 900000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 900000,
- "total_timeout_millis": 900000
- },
- "retry_policy_5_params": {
- "initial_retry_delay_millis": 100,
- "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
- },
- "retry_policy_6_params": {
- "initial_retry_delay_millis": 100,
- "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
- },
- "retry_policy_7_params": {
- "initial_retry_delay_millis": 100,
- "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
- }
- },
- "methods": {
- "Acknowledge": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "CreateSnapshot": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "CreateSubscription": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "DeleteSnapshot": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "DeleteSubscription": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "GetSnapshot": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "GetSubscription": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "ListSnapshots": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "ListSubscriptions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "ModifyAckDeadline": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "ModifyPushConfig": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "Pull": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_5_codes",
- "retry_params_name": "retry_policy_5_params"
- },
- "Seek": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "StreamingPull": {
- "timeout_millis": 900000
- },
- "UpdateSnapshot": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "UpdateSubscription": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_6_codes",
- "retry_params_name": "retry_policy_6_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_7_codes",
- "retry_params_name": "retry_policy_7_params"
- }
- }
- }
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_descriptor_config.php b/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_descriptor_config.php
deleted file mode 100644
index 497c2fd7960e..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_descriptor_config.php
+++ /dev/null
@@ -1,260 +0,0 @@
- [
- 'google.pubsub.v1.Subscriber' => [
- 'Acknowledge' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'CreateSnapshot' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Snapshot',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'CreateSubscription' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Subscription',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteSnapshot' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'snapshot',
- 'fieldAccessors' => [
- 'getSnapshot',
- ],
- ],
- ],
- ],
- 'DeleteSubscription' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'GetSnapshot' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Snapshot',
- 'headerParams' => [
- [
- 'keyName' => 'snapshot',
- 'fieldAccessors' => [
- 'getSnapshot',
- ],
- ],
- ],
- ],
- 'GetSubscription' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Subscription',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'ListSnapshots' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSnapshots',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListSnapshotsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'project',
- 'fieldAccessors' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'ListSubscriptions' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getSubscriptions',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\ListSubscriptionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'project',
- 'fieldAccessors' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'ModifyAckDeadline' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'ModifyPushConfig' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Protobuf\GPBEmpty',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'Pull' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\PullResponse',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'Seek' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\SeekResponse',
- 'headerParams' => [
- [
- 'keyName' => 'subscription',
- 'fieldAccessors' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'StreamingPull' => [
- 'grpcStreaming' => [
- 'grpcStreamingType' => 'BidiStreaming',
- ],
- 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\StreamingPullResponse',
- ],
- 'UpdateSnapshot' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Snapshot',
- 'headerParams' => [
- [
- 'keyName' => 'snapshot.name',
- 'fieldAccessors' => [
- 'getSnapshot',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateSubscription' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\PubSub\V1\Subscription',
- 'headerParams' => [
- [
- 'keyName' => 'subscription.name',
- 'fieldAccessors' => [
- 'getSubscription',
- 'getName',
- ],
- ],
- ],
- ],
- 'GetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\Policy',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'resource',
- 'fieldAccessors' => [
- 'getResource',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'templateMap' => [
- 'deletedTopic' => '_deleted-topic_',
- 'project' => 'projects/{project}',
- 'projectTopic' => 'projects/{project}/topics/{topic}',
- 'snapshot' => 'projects/{project}/snapshots/{snapshot}',
- 'subscription' => 'projects/{project}/subscriptions/{subscription}',
- 'topic' => 'projects/{project}/topics/{topic}',
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_rest_client_config.php b/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_rest_client_config.php
deleted file mode 100644
index 3643254a4cf1..000000000000
--- a/owl-bot-staging/PubSub/v1/src/V1/resources/subscriber_rest_client_config.php
+++ /dev/null
@@ -1,270 +0,0 @@
- [
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/subscriptions/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/topics/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/snapshots/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{resource=projects/*/schemas/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.pubsub.v1.Subscriber' => [
- 'Acknowledge' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:acknowledge',
- 'body' => '*',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'CreateSnapshot' => [
- 'method' => 'put',
- 'uriTemplate' => '/v1/{name=projects/*/snapshots/*}',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'CreateSubscription' => [
- 'method' => 'put',
- 'uriTemplate' => '/v1/{name=projects/*/subscriptions/*}',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteSnapshot' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{snapshot=projects/*/snapshots/*}',
- 'placeholders' => [
- 'snapshot' => [
- 'getters' => [
- 'getSnapshot',
- ],
- ],
- ],
- ],
- 'DeleteSubscription' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'GetSnapshot' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{snapshot=projects/*/snapshots/*}',
- 'placeholders' => [
- 'snapshot' => [
- 'getters' => [
- 'getSnapshot',
- ],
- ],
- ],
- ],
- 'GetSubscription' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'ListSnapshots' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{project=projects/*}/snapshots',
- 'placeholders' => [
- 'project' => [
- 'getters' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'ListSubscriptions' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{project=projects/*}/subscriptions',
- 'placeholders' => [
- 'project' => [
- 'getters' => [
- 'getProject',
- ],
- ],
- ],
- ],
- 'ModifyAckDeadline' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline',
- 'body' => '*',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'ModifyPushConfig' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig',
- 'body' => '*',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'Pull' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:pull',
- 'body' => '*',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'Seek' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{subscription=projects/*/subscriptions/*}:seek',
- 'body' => '*',
- 'placeholders' => [
- 'subscription' => [
- 'getters' => [
- 'getSubscription',
- ],
- ],
- ],
- ],
- 'UpdateSnapshot' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1/{snapshot.name=projects/*/snapshots/*}',
- 'body' => '*',
- 'placeholders' => [
- 'snapshot.name' => [
- 'getters' => [
- 'getSnapshot',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateSubscription' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1/{subscription.name=projects/*/subscriptions/*}',
- 'body' => '*',
- 'placeholders' => [
- 'subscription.name' => [
- 'getters' => [
- 'getSubscription',
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/PublisherClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/PublisherClientTest.php
deleted file mode 100644
index 0bd73b8bd560..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/PublisherClientTest.php
+++ /dev/null
@@ -1,941 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return PublisherClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new PublisherClient($options);
- }
-
- /** @test */
- public function createTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $kmsKeyName2 = 'kmsKeyName2-1057489140';
- $satisfiesPzs2 = true;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name2);
- $expectedResponse->setKmsKeyName($kmsKeyName2);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $request = (new Topic())
- ->setName($name);
- $response = $gapicClient->createTopic($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/CreateTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createTopicExceptionTest()
- {
- $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
- $name = 'name3373707';
- $request = (new Topic())
- ->setName($name);
- try {
- $gapicClient->createTopic($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 deleteTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new DeleteTopicRequest())
- ->setTopic($formattedTopic);
- $gapicClient->deleteTopic($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/DeleteTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteTopicExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new DeleteTopicRequest())
- ->setTopic($formattedTopic);
- try {
- $gapicClient->deleteTopic($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 detachSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new DetachSubscriptionResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new DetachSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- $response = $gapicClient->detachSubscription($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/DetachSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function detachSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new DetachSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- try {
- $gapicClient->detachSubscription($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 getTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $satisfiesPzs = false;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new GetTopicRequest())
- ->setTopic($formattedTopic);
- $response = $gapicClient->getTopic($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/GetTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getTopicExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new GetTopicRequest())
- ->setTopic($formattedTopic);
- try {
- $gapicClient->getTopic($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 listTopicSnapshotsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $snapshotsElement = 'snapshotsElement1339034092';
- $snapshots = [
- $snapshotsElement,
- ];
- $expectedResponse = new ListTopicSnapshotsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSnapshots($snapshots);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new ListTopicSnapshotsRequest())
- ->setTopic($formattedTopic);
- $response = $gapicClient->listTopicSnapshots($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopicSnapshots', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicSnapshotsExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new ListTopicSnapshotsRequest())
- ->setTopic($formattedTopic);
- try {
- $gapicClient->listTopicSnapshots($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 listTopicSubscriptionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $subscriptionsElement = 'subscriptionsElement1698708147';
- $subscriptions = [
- $subscriptionsElement,
- ];
- $expectedResponse = new ListTopicSubscriptionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSubscriptions($subscriptions);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new ListTopicSubscriptionsRequest())
- ->setTopic($formattedTopic);
- $response = $gapicClient->listTopicSubscriptions($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopicSubscriptions', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicSubscriptionsExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new ListTopicSubscriptionsRequest())
- ->setTopic($formattedTopic);
- try {
- $gapicClient->listTopicSubscriptions($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 listTopicsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $topicsElement = new Topic();
- $topics = [
- $topicsElement,
- ];
- $expectedResponse = new ListTopicsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setTopics($topics);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListTopicsRequest())
- ->setProject($formattedProject);
- $response = $gapicClient->listTopics($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getTopics()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopics', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListTopicsRequest())
- ->setProject($formattedProject);
- try {
- $gapicClient->listTopics($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 publishTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new PublishResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $messages = [];
- $request = (new PublishRequest())
- ->setTopic($formattedTopic)
- ->setMessages($messages);
- $response = $gapicClient->publish($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/Publish', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $actualValue = $actualRequestObject->getMessages();
- $this->assertProtobufEquals($messages, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function publishExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $messages = [];
- $request = (new PublishRequest())
- ->setTopic($formattedTopic)
- ->setMessages($messages);
- try {
- $gapicClient->publish($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 updateTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $satisfiesPzs = false;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs);
- $transport->addResponse($expectedResponse);
- // Mock request
- $topic = new Topic();
- $topicName = 'topicName388205658';
- $topic->setName($topicName);
- $updateMask = new FieldMask();
- $request = (new UpdateTopicRequest())
- ->setTopic($topic)
- ->setUpdateMask($updateMask);
- $response = $gapicClient->updateTopic($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/UpdateTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($topic, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateTopicExceptionTest()
- {
- $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
- $topic = new Topic();
- $topicName = 'topicName388205658';
- $topic->setName($topicName);
- $updateMask = new FieldMask();
- $request = (new UpdateTopicRequest())
- ->setTopic($topic)
- ->setUpdateMask($updateMask);
- try {
- $gapicClient->updateTopic($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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- $response = $gapicClient->getIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- try {
- $gapicClient->getIamPolicy($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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- $response = $gapicClient->setIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- try {
- $gapicClient->setIamPolicy($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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- $response = $gapicClient->testIamPermissions($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- try {
- $gapicClient->testIamPermissions($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 createTopicAsyncTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $kmsKeyName2 = 'kmsKeyName2-1057489140';
- $satisfiesPzs2 = true;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name2);
- $expectedResponse->setKmsKeyName($kmsKeyName2);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $request = (new Topic())
- ->setName($name);
- $response = $gapicClient->createTopicAsync($request)->wait();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/CreateTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php
deleted file mode 100644
index f3d4617842e0..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SchemaServiceClientTest.php
+++ /dev/null
@@ -1,1037 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SchemaServiceClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SchemaServiceClient($options);
- }
-
- /** @test */
- public function commitSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new CommitSchemaRequest())
- ->setName($formattedName)
- ->setSchema($schema);
- $response = $gapicClient->commitSchema($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/CommitSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function commitSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new CommitSchemaRequest())
- ->setName($formattedName)
- ->setSchema($schema);
- try {
- $gapicClient->commitSchema($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 createSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new CreateSchemaRequest())
- ->setParent($formattedParent)
- ->setSchema($schema);
- $response = $gapicClient->createSchema($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/CreateSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSchemaExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new CreateSchemaRequest())
- ->setParent($formattedParent)
- ->setSchema($schema);
- try {
- $gapicClient->createSchema($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 deleteSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new DeleteSchemaRequest())
- ->setName($formattedName);
- $gapicClient->deleteSchema($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/DeleteSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new DeleteSchemaRequest())
- ->setName($formattedName);
- try {
- $gapicClient->deleteSchema($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 deleteSchemaRevisionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId2 = 'revisionId2-100208654';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $request = (new DeleteSchemaRevisionRequest())
- ->setName($formattedName)
- ->setRevisionId($revisionId);
- $response = $gapicClient->deleteSchemaRevision($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/DeleteSchemaRevision', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getRevisionId();
- $this->assertProtobufEquals($revisionId, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSchemaRevisionExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $request = (new DeleteSchemaRevisionRequest())
- ->setName($formattedName)
- ->setRevisionId($revisionId);
- try {
- $gapicClient->deleteSchemaRevision($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 getSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new GetSchemaRequest())
- ->setName($formattedName);
- $response = $gapicClient->getSchema($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/GetSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new GetSchemaRequest())
- ->setName($formattedName);
- try {
- $gapicClient->getSchema($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 listSchemaRevisionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $schemasElement = new Schema();
- $schemas = [
- $schemasElement,
- ];
- $expectedResponse = new ListSchemaRevisionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSchemas($schemas);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new ListSchemaRevisionsRequest())
- ->setName($formattedName);
- $response = $gapicClient->listSchemaRevisions($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ListSchemaRevisions', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSchemaRevisionsExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $request = (new ListSchemaRevisionsRequest())
- ->setName($formattedName);
- try {
- $gapicClient->listSchemaRevisions($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 listSchemasTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $schemasElement = new Schema();
- $schemas = [
- $schemasElement,
- ];
- $expectedResponse = new ListSchemasResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSchemas($schemas);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $request = (new ListSchemasRequest())
- ->setParent($formattedParent);
- $response = $gapicClient->listSchemas($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ListSchemas', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSchemasExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $request = (new ListSchemasRequest())
- ->setParent($formattedParent);
- try {
- $gapicClient->listSchemas($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 rollbackSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId2 = 'revisionId2-100208654';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $request = (new RollbackSchemaRequest())
- ->setName($formattedName)
- ->setRevisionId($revisionId);
- $response = $gapicClient->rollbackSchema($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/RollbackSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getRevisionId();
- $this->assertProtobufEquals($revisionId, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function rollbackSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $request = (new RollbackSchemaRequest())
- ->setName($formattedName)
- ->setRevisionId($revisionId);
- try {
- $gapicClient->rollbackSchema($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 validateMessageTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new ValidateMessageResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $request = (new ValidateMessageRequest())
- ->setParent($formattedParent);
- $response = $gapicClient->validateMessage($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ValidateMessage', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function validateMessageExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $request = (new ValidateMessageRequest())
- ->setParent($formattedParent);
- try {
- $gapicClient->validateMessage($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 validateSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new ValidateSchemaResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new ValidateSchemaRequest())
- ->setParent($formattedParent)
- ->setSchema($schema);
- $response = $gapicClient->validateSchema($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ValidateSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function validateSchemaExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new ValidateSchemaRequest())
- ->setParent($formattedParent)
- ->setSchema($schema);
- try {
- $gapicClient->validateSchema($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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- $response = $gapicClient->getIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- try {
- $gapicClient->getIamPolicy($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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- $response = $gapicClient->setIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- try {
- $gapicClient->setIamPolicy($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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- $response = $gapicClient->testIamPermissions($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- try {
- $gapicClient->testIamPermissions($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 commitSchemaAsyncTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $request = (new CommitSchemaRequest())
- ->setName($formattedName)
- ->setSchema($schema);
- $response = $gapicClient->commitSchemaAsync($request)->wait();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/CommitSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SubscriberClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SubscriberClientTest.php
deleted file mode 100644
index 6bc7cdf9d606..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/Client/SubscriberClientTest.php
+++ /dev/null
@@ -1,1494 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SubscriberClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SubscriberClient($options);
- }
-
- /** @test */
- public function acknowledgeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $request = (new AcknowledgeRequest())
- ->setSubscription($formattedSubscription)
- ->setAckIds($ackIds);
- $gapicClient->acknowledge($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Acknowledge', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getAckIds();
- $this->assertProtobufEquals($ackIds, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function acknowledgeExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $request = (new AcknowledgeRequest())
- ->setSubscription($formattedSubscription)
- ->setAckIds($ackIds);
- try {
- $gapicClient->acknowledge($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 createSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name2);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new CreateSnapshotRequest())
- ->setName($formattedName)
- ->setSubscription($formattedSubscription);
- $response = $gapicClient->createSnapshot($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/CreateSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSnapshotExceptionTest()
- {
- $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->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new CreateSnapshotRequest())
- ->setName($formattedName)
- ->setSubscription($formattedSubscription);
- try {
- $gapicClient->createSnapshot($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 createSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $topic2 = 'topic2-1139259102';
- $ackDeadlineSeconds2 = 921632575;
- $retainAckedMessages2 = true;
- $enableMessageOrdering2 = false;
- $filter2 = 'filter2-721168085';
- $detached2 = false;
- $enableExactlyOnceDelivery2 = true;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name2);
- $expectedResponse->setTopic($topic2);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds2);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages2);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering2);
- $expectedResponse->setFilter($filter2);
- $expectedResponse->setDetached($detached2);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new Subscription())
- ->setName($name)
- ->setTopic($formattedTopic);
- $response = $gapicClient->createSubscription($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/CreateSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSubscriptionExceptionTest()
- {
- $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
- $name = 'name3373707';
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $request = (new Subscription())
- ->setName($name)
- ->setTopic($formattedTopic);
- try {
- $gapicClient->createSubscription($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 deleteSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $request = (new DeleteSnapshotRequest())
- ->setSnapshot($formattedSnapshot);
- $gapicClient->deleteSnapshot($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/DeleteSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($formattedSnapshot, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSnapshotExceptionTest()
- {
- $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
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $request = (new DeleteSnapshotRequest())
- ->setSnapshot($formattedSnapshot);
- try {
- $gapicClient->deleteSnapshot($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 deleteSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new DeleteSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- $gapicClient->deleteSubscription($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/DeleteSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new DeleteSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- try {
- $gapicClient->deleteSubscription($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 getSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $request = (new GetSnapshotRequest())
- ->setSnapshot($formattedSnapshot);
- $response = $gapicClient->getSnapshot($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/GetSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($formattedSnapshot, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSnapshotExceptionTest()
- {
- $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
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $request = (new GetSnapshotRequest())
- ->setSnapshot($formattedSnapshot);
- try {
- $gapicClient->getSnapshot($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 getSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $ackDeadlineSeconds = 2135351438;
- $retainAckedMessages = false;
- $enableMessageOrdering = true;
- $filter = 'filter-1274492040';
- $detached = true;
- $enableExactlyOnceDelivery = false;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering);
- $expectedResponse->setFilter($filter);
- $expectedResponse->setDetached($detached);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new GetSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- $response = $gapicClient->getSubscription($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/GetSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new GetSubscriptionRequest())
- ->setSubscription($formattedSubscription);
- try {
- $gapicClient->getSubscription($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 listSnapshotsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $snapshotsElement = new Snapshot();
- $snapshots = [
- $snapshotsElement,
- ];
- $expectedResponse = new ListSnapshotsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSnapshots($snapshots);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListSnapshotsRequest())
- ->setProject($formattedProject);
- $response = $gapicClient->listSnapshots($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ListSnapshots', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSnapshotsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListSnapshotsRequest())
- ->setProject($formattedProject);
- try {
- $gapicClient->listSnapshots($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 listSubscriptionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $subscriptionsElement = new Subscription();
- $subscriptions = [
- $subscriptionsElement,
- ];
- $expectedResponse = new ListSubscriptionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSubscriptions($subscriptions);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListSubscriptionsRequest())
- ->setProject($formattedProject);
- $response = $gapicClient->listSubscriptions($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ListSubscriptions', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSubscriptionsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $request = (new ListSubscriptionsRequest())
- ->setProject($formattedProject);
- try {
- $gapicClient->listSubscriptions($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 modifyAckDeadlineTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $ackDeadlineSeconds = 2135351438;
- $request = (new ModifyAckDeadlineRequest())
- ->setSubscription($formattedSubscription)
- ->setAckIds($ackIds)
- ->setAckDeadlineSeconds($ackDeadlineSeconds);
- $gapicClient->modifyAckDeadline($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ModifyAckDeadline', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getAckIds();
- $this->assertProtobufEquals($ackIds, $actualValue);
- $actualValue = $actualRequestObject->getAckDeadlineSeconds();
- $this->assertProtobufEquals($ackDeadlineSeconds, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function modifyAckDeadlineExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $ackDeadlineSeconds = 2135351438;
- $request = (new ModifyAckDeadlineRequest())
- ->setSubscription($formattedSubscription)
- ->setAckIds($ackIds)
- ->setAckDeadlineSeconds($ackDeadlineSeconds);
- try {
- $gapicClient->modifyAckDeadline($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 modifyPushConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $pushConfig = new PushConfig();
- $request = (new ModifyPushConfigRequest())
- ->setSubscription($formattedSubscription)
- ->setPushConfig($pushConfig);
- $gapicClient->modifyPushConfig($request);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ModifyPushConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getPushConfig();
- $this->assertProtobufEquals($pushConfig, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function modifyPushConfigExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $pushConfig = new PushConfig();
- $request = (new ModifyPushConfigRequest())
- ->setSubscription($formattedSubscription)
- ->setPushConfig($pushConfig);
- try {
- $gapicClient->modifyPushConfig($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 pullTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new PullResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $maxMessages = 496131527;
- $request = (new PullRequest())
- ->setSubscription($formattedSubscription)
- ->setMaxMessages($maxMessages);
- $response = $gapicClient->pull($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Pull', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getMaxMessages();
- $this->assertProtobufEquals($maxMessages, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function pullExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $maxMessages = 496131527;
- $request = (new PullRequest())
- ->setSubscription($formattedSubscription)
- ->setMaxMessages($maxMessages);
- try {
- $gapicClient->pull($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 seekTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new SeekResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new SeekRequest())
- ->setSubscription($formattedSubscription);
- $response = $gapicClient->seek($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Seek', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function seekExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $request = (new SeekRequest())
- ->setSubscription($formattedSubscription);
- try {
- $gapicClient->seek($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 streamingPullTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new StreamingPullResponse();
- $transport->addResponse($expectedResponse);
- $expectedResponse2 = new StreamingPullResponse();
- $transport->addResponse($expectedResponse2);
- $expectedResponse3 = new StreamingPullResponse();
- $transport->addResponse($expectedResponse3);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds = 1875467245;
- $request = new StreamingPullRequest();
- $request->setSubscription($formattedSubscription);
- $request->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds);
- $formattedSubscription2 = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds2 = 1562238880;
- $request2 = new StreamingPullRequest();
- $request2->setSubscription($formattedSubscription2);
- $request2->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds2);
- $formattedSubscription3 = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds3 = 1562238879;
- $request3 = new StreamingPullRequest();
- $request3->setSubscription($formattedSubscription3);
- $request3->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds3);
- $bidi = $gapicClient->streamingPull();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/StreamingPull', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingPullExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $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->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingPull();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream 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 updateSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $snapshot = new Snapshot();
- $updateMask = new FieldMask();
- $request = (new UpdateSnapshotRequest())
- ->setSnapshot($snapshot)
- ->setUpdateMask($updateMask);
- $response = $gapicClient->updateSnapshot($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/UpdateSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($snapshot, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateSnapshotExceptionTest()
- {
- $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
- $snapshot = new Snapshot();
- $updateMask = new FieldMask();
- $request = (new UpdateSnapshotRequest())
- ->setSnapshot($snapshot)
- ->setUpdateMask($updateMask);
- try {
- $gapicClient->updateSnapshot($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 updateSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $ackDeadlineSeconds = 2135351438;
- $retainAckedMessages = false;
- $enableMessageOrdering = true;
- $filter = 'filter-1274492040';
- $detached = true;
- $enableExactlyOnceDelivery = false;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering);
- $expectedResponse->setFilter($filter);
- $expectedResponse->setDetached($detached);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery);
- $transport->addResponse($expectedResponse);
- // Mock request
- $subscription = new Subscription();
- $subscriptionName = 'subscriptionName-515935928';
- $subscription->setName($subscriptionName);
- $subscriptionTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $subscription->setTopic($subscriptionTopic);
- $updateMask = new FieldMask();
- $request = (new UpdateSubscriptionRequest())
- ->setSubscription($subscription)
- ->setUpdateMask($updateMask);
- $response = $gapicClient->updateSubscription($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/UpdateSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($subscription, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateSubscriptionExceptionTest()
- {
- $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
- $subscription = new Subscription();
- $subscriptionName = 'subscriptionName-515935928';
- $subscription->setName($subscriptionName);
- $subscriptionTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $subscription->setTopic($subscriptionTopic);
- $updateMask = new FieldMask();
- $request = (new UpdateSubscriptionRequest())
- ->setSubscription($subscription)
- ->setUpdateMask($updateMask);
- try {
- $gapicClient->updateSubscription($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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- $response = $gapicClient->getIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $request = (new GetIamPolicyRequest())
- ->setResource($resource);
- try {
- $gapicClient->getIamPolicy($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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- $response = $gapicClient->setIamPolicy($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- $request = (new SetIamPolicyRequest())
- ->setResource($resource)
- ->setPolicy($policy);
- try {
- $gapicClient->setIamPolicy($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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- $response = $gapicClient->testIamPermissions($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- $request = (new TestIamPermissionsRequest())
- ->setResource($resource)
- ->setPermissions($permissions);
- try {
- $gapicClient->testIamPermissions($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 acknowledgeAsyncTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $request = (new AcknowledgeRequest())
- ->setSubscription($formattedSubscription)
- ->setAckIds($ackIds);
- $gapicClient->acknowledgeAsync($request)->wait();
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Acknowledge', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getAckIds();
- $this->assertProtobufEquals($ackIds, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/PublisherClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/PublisherClientTest.php
deleted file mode 100644
index 7cae846107b8..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/PublisherClientTest.php
+++ /dev/null
@@ -1,841 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return PublisherClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new PublisherClient($options);
- }
-
- /** @test */
- public function createTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $kmsKeyName2 = 'kmsKeyName2-1057489140';
- $satisfiesPzs2 = true;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name2);
- $expectedResponse->setKmsKeyName($kmsKeyName2);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $response = $gapicClient->createTopic($name);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/CreateTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createTopicExceptionTest()
- {
- $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
- $name = 'name3373707';
- try {
- $gapicClient->createTopic($name);
- // 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 deleteTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $gapicClient->deleteTopic($formattedTopic);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/DeleteTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteTopicExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- try {
- $gapicClient->deleteTopic($formattedTopic);
- // 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 detachSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new DetachSubscriptionResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $response = $gapicClient->detachSubscription($formattedSubscription);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/DetachSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function detachSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- try {
- $gapicClient->detachSubscription($formattedSubscription);
- // 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 getTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $satisfiesPzs = false;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $response = $gapicClient->getTopic($formattedTopic);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/GetTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getTopicExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- try {
- $gapicClient->getTopic($formattedTopic);
- // 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 listTopicSnapshotsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $snapshotsElement = 'snapshotsElement1339034092';
- $snapshots = [
- $snapshotsElement,
- ];
- $expectedResponse = new ListTopicSnapshotsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSnapshots($snapshots);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $response = $gapicClient->listTopicSnapshots($formattedTopic);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopicSnapshots', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicSnapshotsExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- try {
- $gapicClient->listTopicSnapshots($formattedTopic);
- // 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 listTopicSubscriptionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $subscriptionsElement = 'subscriptionsElement1698708147';
- $subscriptions = [
- $subscriptionsElement,
- ];
- $expectedResponse = new ListTopicSubscriptionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSubscriptions($subscriptions);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $response = $gapicClient->listTopicSubscriptions($formattedTopic);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopicSubscriptions', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicSubscriptionsExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- try {
- $gapicClient->listTopicSubscriptions($formattedTopic);
- // 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 listTopicsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $topicsElement = new Topic();
- $topics = [
- $topicsElement,
- ];
- $expectedResponse = new ListTopicsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setTopics($topics);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $response = $gapicClient->listTopics($formattedProject);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getTopics()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/ListTopics', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listTopicsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- try {
- $gapicClient->listTopics($formattedProject);
- // 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 publishTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new PublishResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $messages = [];
- $response = $gapicClient->publish($formattedTopic, $messages);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/Publish', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $actualValue = $actualRequestObject->getMessages();
- $this->assertProtobufEquals($messages, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function publishExceptionTest()
- {
- $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
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $messages = [];
- try {
- $gapicClient->publish($formattedTopic, $messages);
- // 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 updateTopicTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $satisfiesPzs = false;
- $expectedResponse = new Topic();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setSatisfiesPzs($satisfiesPzs);
- $transport->addResponse($expectedResponse);
- // Mock request
- $topic = new Topic();
- $topicName = 'topicName388205658';
- $topic->setName($topicName);
- $updateMask = new FieldMask();
- $response = $gapicClient->updateTopic($topic, $updateMask);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Publisher/UpdateTopic', $actualFuncCall);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($topic, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateTopicExceptionTest()
- {
- $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
- $topic = new Topic();
- $topicName = 'topicName388205658';
- $topic->setName($topicName);
- $updateMask = new FieldMask();
- try {
- $gapicClient->updateTopic($topic, $updateMask);
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/SchemaServiceClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/SchemaServiceClientTest.php
deleted file mode 100644
index 1a1ed203e5bc..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/SchemaServiceClientTest.php
+++ /dev/null
@@ -1,919 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SchemaServiceClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SchemaServiceClient($options);
- }
-
- /** @test */
- public function commitSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $response = $gapicClient->commitSchema($formattedName, $schema);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/CommitSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function commitSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- try {
- $gapicClient->commitSchema($formattedName, $schema);
- // 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 createSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $response = $gapicClient->createSchema($formattedParent, $schema);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/CreateSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSchemaExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- try {
- $gapicClient->createSchema($formattedParent, $schema);
- // 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 deleteSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $gapicClient->deleteSchema($formattedName);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/DeleteSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- try {
- $gapicClient->deleteSchema($formattedName);
- // 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 deleteSchemaRevisionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId2 = 'revisionId2-100208654';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $response = $gapicClient->deleteSchemaRevision($formattedName, $revisionId);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/DeleteSchemaRevision', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getRevisionId();
- $this->assertProtobufEquals($revisionId, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSchemaRevisionExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- try {
- $gapicClient->deleteSchemaRevision($formattedName, $revisionId);
- // 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 getSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId = 'revisionId513861631';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $response = $gapicClient->getSchema($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/GetSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- try {
- $gapicClient->getSchema($formattedName);
- // 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 listSchemaRevisionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $schemasElement = new Schema();
- $schemas = [
- $schemasElement,
- ];
- $expectedResponse = new ListSchemaRevisionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSchemas($schemas);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $response = $gapicClient->listSchemaRevisions($formattedName);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ListSchemaRevisions', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSchemaRevisionsExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- try {
- $gapicClient->listSchemaRevisions($formattedName);
- // 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 listSchemasTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $schemasElement = new Schema();
- $schemas = [
- $schemasElement,
- ];
- $expectedResponse = new ListSchemasResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSchemas($schemas);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $response = $gapicClient->listSchemas($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSchemas()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ListSchemas', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSchemasExceptionTest()
- {
- $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->projectName('[PROJECT]');
- try {
- $gapicClient->listSchemas($formattedParent);
- // 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 rollbackSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $definition = 'definition-1014418093';
- $revisionId2 = 'revisionId2-100208654';
- $expectedResponse = new Schema();
- $expectedResponse->setName($name2);
- $expectedResponse->setDefinition($definition);
- $expectedResponse->setRevisionId($revisionId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- $response = $gapicClient->rollbackSchema($formattedName, $revisionId);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/RollbackSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getRevisionId();
- $this->assertProtobufEquals($revisionId, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function rollbackSchemaExceptionTest()
- {
- $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->schemaName('[PROJECT]', '[SCHEMA]');
- $revisionId = 'revisionId513861631';
- try {
- $gapicClient->rollbackSchema($formattedName, $revisionId);
- // 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 validateMessageTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new ValidateMessageResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $response = $gapicClient->validateMessage($formattedParent);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ValidateMessage', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function validateMessageExceptionTest()
- {
- $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->projectName('[PROJECT]');
- try {
- $gapicClient->validateMessage($formattedParent);
- // 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 validateSchemaTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new ValidateSchemaResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- $response = $gapicClient->validateSchema($formattedParent, $schema);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.SchemaService/ValidateSchema', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getSchema();
- $this->assertProtobufEquals($schema, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function validateSchemaExceptionTest()
- {
- $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->projectName('[PROJECT]');
- $schema = new Schema();
- $schemaName = 'schemaName-448762932';
- $schema->setName($schemaName);
- try {
- $gapicClient->validateSchema($formattedParent, $schema);
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}
diff --git a/owl-bot-staging/PubSub/v1/tests/Unit/V1/SubscriberClientTest.php b/owl-bot-staging/PubSub/v1/tests/Unit/V1/SubscriberClientTest.php
deleted file mode 100644
index fdd8b629e2e5..000000000000
--- a/owl-bot-staging/PubSub/v1/tests/Unit/V1/SubscriberClientTest.php
+++ /dev/null
@@ -1,1353 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SubscriberClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SubscriberClient($options);
- }
-
- /** @test */
- public function acknowledgeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $gapicClient->acknowledge($formattedSubscription, $ackIds);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Acknowledge', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getAckIds();
- $this->assertProtobufEquals($ackIds, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function acknowledgeExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- try {
- $gapicClient->acknowledge($formattedSubscription, $ackIds);
- // 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 createSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name2);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $response = $gapicClient->createSnapshot($formattedName, $formattedSubscription);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/CreateSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSnapshotExceptionTest()
- {
- $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->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- try {
- $gapicClient->createSnapshot($formattedName, $formattedSubscription);
- // 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 createSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $topic2 = 'topic2-1139259102';
- $ackDeadlineSeconds2 = 921632575;
- $retainAckedMessages2 = true;
- $enableMessageOrdering2 = false;
- $filter2 = 'filter2-721168085';
- $detached2 = false;
- $enableExactlyOnceDelivery2 = true;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name2);
- $expectedResponse->setTopic($topic2);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds2);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages2);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering2);
- $expectedResponse->setFilter($filter2);
- $expectedResponse->setDetached($detached2);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $name = 'name3373707';
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $response = $gapicClient->createSubscription($name, $formattedTopic);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/CreateSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($name, $actualValue);
- $actualValue = $actualRequestObject->getTopic();
- $this->assertProtobufEquals($formattedTopic, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createSubscriptionExceptionTest()
- {
- $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
- $name = 'name3373707';
- $formattedTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- try {
- $gapicClient->createSubscription($name, $formattedTopic);
- // 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 deleteSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $gapicClient->deleteSnapshot($formattedSnapshot);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/DeleteSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($formattedSnapshot, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSnapshotExceptionTest()
- {
- $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
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- try {
- $gapicClient->deleteSnapshot($formattedSnapshot);
- // 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 deleteSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $gapicClient->deleteSubscription($formattedSubscription);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/DeleteSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- try {
- $gapicClient->deleteSubscription($formattedSubscription);
- // 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 getSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- $response = $gapicClient->getSnapshot($formattedSnapshot);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/GetSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($formattedSnapshot, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSnapshotExceptionTest()
- {
- $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
- $formattedSnapshot = $gapicClient->snapshotName('[PROJECT]', '[SNAPSHOT]');
- try {
- $gapicClient->getSnapshot($formattedSnapshot);
- // 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 getSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $ackDeadlineSeconds = 2135351438;
- $retainAckedMessages = false;
- $enableMessageOrdering = true;
- $filter = 'filter-1274492040';
- $detached = true;
- $enableExactlyOnceDelivery = false;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering);
- $expectedResponse->setFilter($filter);
- $expectedResponse->setDetached($detached);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $response = $gapicClient->getSubscription($formattedSubscription);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/GetSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getSubscriptionExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- try {
- $gapicClient->getSubscription($formattedSubscription);
- // 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 listSnapshotsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $snapshotsElement = new Snapshot();
- $snapshots = [
- $snapshotsElement,
- ];
- $expectedResponse = new ListSnapshotsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSnapshots($snapshots);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $response = $gapicClient->listSnapshots($formattedProject);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ListSnapshots', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSnapshotsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- try {
- $gapicClient->listSnapshots($formattedProject);
- // 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 listSubscriptionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $subscriptionsElement = new Subscription();
- $subscriptions = [
- $subscriptionsElement,
- ];
- $expectedResponse = new ListSubscriptionsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setSubscriptions($subscriptions);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- $response = $gapicClient->listSubscriptions($formattedProject);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getSubscriptions()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ListSubscriptions', $actualFuncCall);
- $actualValue = $actualRequestObject->getProject();
- $this->assertProtobufEquals($formattedProject, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listSubscriptionsExceptionTest()
- {
- $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
- $formattedProject = $gapicClient->projectName('[PROJECT]');
- try {
- $gapicClient->listSubscriptions($formattedProject);
- // 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 modifyAckDeadlineTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $ackDeadlineSeconds = 2135351438;
- $gapicClient->modifyAckDeadline($formattedSubscription, $ackIds, $ackDeadlineSeconds);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ModifyAckDeadline', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getAckIds();
- $this->assertProtobufEquals($ackIds, $actualValue);
- $actualValue = $actualRequestObject->getAckDeadlineSeconds();
- $this->assertProtobufEquals($ackDeadlineSeconds, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function modifyAckDeadlineExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $ackIds = [];
- $ackDeadlineSeconds = 2135351438;
- try {
- $gapicClient->modifyAckDeadline($formattedSubscription, $ackIds, $ackDeadlineSeconds);
- // 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 modifyPushConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $pushConfig = new PushConfig();
- $gapicClient->modifyPushConfig($formattedSubscription, $pushConfig);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/ModifyPushConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getPushConfig();
- $this->assertProtobufEquals($pushConfig, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function modifyPushConfigExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $pushConfig = new PushConfig();
- try {
- $gapicClient->modifyPushConfig($formattedSubscription, $pushConfig);
- // 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 pullTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new PullResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $maxMessages = 496131527;
- $response = $gapicClient->pull($formattedSubscription, $maxMessages);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Pull', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $actualValue = $actualRequestObject->getMaxMessages();
- $this->assertProtobufEquals($maxMessages, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function pullExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $maxMessages = 496131527;
- try {
- $gapicClient->pull($formattedSubscription, $maxMessages);
- // 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 seekTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new SeekResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $response = $gapicClient->seek($formattedSubscription);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/Seek', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($formattedSubscription, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function seekExceptionTest()
- {
- $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
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- try {
- $gapicClient->seek($formattedSubscription);
- // 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 streamingPullTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new StreamingPullResponse();
- $transport->addResponse($expectedResponse);
- $expectedResponse2 = new StreamingPullResponse();
- $transport->addResponse($expectedResponse2);
- $expectedResponse3 = new StreamingPullResponse();
- $transport->addResponse($expectedResponse3);
- // Mock request
- $formattedSubscription = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds = 1875467245;
- $request = new StreamingPullRequest();
- $request->setSubscription($formattedSubscription);
- $request->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds);
- $formattedSubscription2 = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds2 = 1562238880;
- $request2 = new StreamingPullRequest();
- $request2->setSubscription($formattedSubscription2);
- $request2->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds2);
- $formattedSubscription3 = $gapicClient->subscriptionName('[PROJECT]', '[SUBSCRIPTION]');
- $streamAckDeadlineSeconds3 = 1562238879;
- $request3 = new StreamingPullRequest();
- $request3->setSubscription($formattedSubscription3);
- $request3->setStreamAckDeadlineSeconds($streamAckDeadlineSeconds3);
- $bidi = $gapicClient->streamingPull();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/StreamingPull', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingPullExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $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->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingPull();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream 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 updateSnapshotTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $expectedResponse = new Snapshot();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $transport->addResponse($expectedResponse);
- // Mock request
- $snapshot = new Snapshot();
- $updateMask = new FieldMask();
- $response = $gapicClient->updateSnapshot($snapshot, $updateMask);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/UpdateSnapshot', $actualFuncCall);
- $actualValue = $actualRequestObject->getSnapshot();
- $this->assertProtobufEquals($snapshot, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateSnapshotExceptionTest()
- {
- $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
- $snapshot = new Snapshot();
- $updateMask = new FieldMask();
- try {
- $gapicClient->updateSnapshot($snapshot, $updateMask);
- // 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 updateSubscriptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $topic = 'topic110546223';
- $ackDeadlineSeconds = 2135351438;
- $retainAckedMessages = false;
- $enableMessageOrdering = true;
- $filter = 'filter-1274492040';
- $detached = true;
- $enableExactlyOnceDelivery = false;
- $expectedResponse = new Subscription();
- $expectedResponse->setName($name);
- $expectedResponse->setTopic($topic);
- $expectedResponse->setAckDeadlineSeconds($ackDeadlineSeconds);
- $expectedResponse->setRetainAckedMessages($retainAckedMessages);
- $expectedResponse->setEnableMessageOrdering($enableMessageOrdering);
- $expectedResponse->setFilter($filter);
- $expectedResponse->setDetached($detached);
- $expectedResponse->setEnableExactlyOnceDelivery($enableExactlyOnceDelivery);
- $transport->addResponse($expectedResponse);
- // Mock request
- $subscription = new Subscription();
- $subscriptionName = 'subscriptionName-515935928';
- $subscription->setName($subscriptionName);
- $subscriptionTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $subscription->setTopic($subscriptionTopic);
- $updateMask = new FieldMask();
- $response = $gapicClient->updateSubscription($subscription, $updateMask);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.pubsub.v1.Subscriber/UpdateSubscription', $actualFuncCall);
- $actualValue = $actualRequestObject->getSubscription();
- $this->assertProtobufEquals($subscription, $actualValue);
- $actualValue = $actualRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateSubscriptionExceptionTest()
- {
- $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
- $subscription = new Subscription();
- $subscriptionName = 'subscriptionName-515935928';
- $subscription->setName($subscriptionName);
- $subscriptionTopic = $gapicClient->topicName('[PROJECT]', '[TOPIC]');
- $subscription->setTopic($subscriptionTopic);
- $updateMask = new FieldMask();
- try {
- $gapicClient->updateSubscription($subscription, $updateMask);
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}