From f86b038cbcd587411c598d6c15ebecda2190fa09 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 31 May 2024 15:28:54 -0400 Subject: [PATCH] feat: add service_account_email for export subscriptions (#7353) PiperOrigin-RevId: 638641437 Source-Link: https://github.com/googleapis/googleapis/commit/a3016a877a58aee3bef1e93871542ef79993daf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2001c330aee62a9d4e8a9852d8e5bf2662818ad4 Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiIyMDAxYzMzMGFlZTYyYTlkNGU4YTk4NTJkOGU1YmYyNjYyODE4YWQ0In0= --- PubSub/metadata/V1/Pubsub.php | Bin 15596 -> 15668 bytes PubSub/src/V1/BigQueryConfig.php | 54 +++++++++++++++++++++++++++ PubSub/src/V1/CloudStorageConfig.php | 54 +++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) diff --git a/PubSub/metadata/V1/Pubsub.php b/PubSub/metadata/V1/Pubsub.php index 416804f66cdf0c3546bdfc7e3cc7df7e44430523..f3397d12f3af01f4049712e6e47697a9b187f963 100644 GIT binary patch delta 75 zcmaD;xut5uS!SjwMVrqv&lO?nW1gHRad+}OaVZ{l1x5`{C*}u^j7nXTx3=akI|@ofHD<0+VhS-IH$_jso=rv;P^i0khW|T_JX$5wrjR diff --git a/PubSub/src/V1/BigQueryConfig.php b/PubSub/src/V1/BigQueryConfig.php index 6949c403f2c6..64a73f17d55a 100644 --- a/PubSub/src/V1/BigQueryConfig.php +++ b/PubSub/src/V1/BigQueryConfig.php @@ -65,6 +65,17 @@ class BigQueryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool use_table_schema = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $use_table_schema = false; + /** + * Optional. The service account to use to write to BigQuery. The subscription + * creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub [service + * agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account_email = ''; /** * Constructor. @@ -98,6 +109,13 @@ class BigQueryConfig extends \Google\Protobuf\Internal\Message * Optional. When true, use the BigQuery table's schema as the columns to * write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be * enabled at the same time. + * @type string $service_account_email + * Optional. The service account to use to write to BigQuery. The subscription + * creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub [service + * agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. * } */ public function __construct($data = NULL) { @@ -289,5 +307,41 @@ public function setUseTableSchema($var) return $this; } + /** + * Optional. The service account to use to write to BigQuery. The subscription + * creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub [service + * agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * Optional. The service account to use to write to BigQuery. The subscription + * creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub [service + * agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + } diff --git a/PubSub/src/V1/CloudStorageConfig.php b/PubSub/src/V1/CloudStorageConfig.php index 136d636c81c5..59bd8903f911 100644 --- a/PubSub/src/V1/CloudStorageConfig.php +++ b/PubSub/src/V1/CloudStorageConfig.php @@ -70,6 +70,17 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state = 0; + /** + * Optional. The service account to use to write to Cloud Storage. The + * subscription creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub + * [service agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account_email = ''; protected $output_format; /** @@ -111,6 +122,13 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * @type int $state * Output only. An output-only field that indicates whether or not the * subscription can receive messages. + * @type string $service_account_email + * Optional. The service account to use to write to Cloud Storage. The + * subscription creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub + * [service agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. * } */ public function __construct($data = NULL) { @@ -402,6 +420,42 @@ public function setState($var) return $this; } + /** + * Optional. The service account to use to write to Cloud Storage. The + * subscription creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub + * [service agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * Optional. The service account to use to write to Cloud Storage. The + * subscription creator or updater that specifies this field must have + * `iam.serviceAccounts.actAs` permission on the service account. If not + * specified, the Pub/Sub + * [service agent](https://cloud.google.com/iam/docs/service-agents), + * service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used. + * + * Generated from protobuf field string service_account_email = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + /** * @return string */