From c53285473c2c0973baf5932e52d2d135958c6948 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:17:45 -0400 Subject: [PATCH] feat: add service_account_email for export subscriptions (#1927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add service_account_email for export subscriptions PiperOrigin-RevId: 638641437 Source-Link: https://github.com/googleapis/googleapis/commit/a3016a877a58aee3bef1e93871542ef79993daf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2001c330aee62a9d4e8a9852d8e5bf2662818ad4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjAwMWMzMzBhZWU2MmE5ZDRlOGE5ODUyZDhlNWJmMjY2MjgxOGFkNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- protos/google/pubsub/v1/pubsub.proto | 16 ++++++++++ protos/protos.d.ts | 12 ++++++++ protos/protos.js | 46 ++++++++++++++++++++++++++++ protos/protos.json | 14 +++++++++ 4 files changed, 88 insertions(+) diff --git a/protos/google/pubsub/v1/pubsub.proto b/protos/google/pubsub/v1/pubsub.proto index 2e606060d..8546dacf9 100644 --- a/protos/google/pubsub/v1/pubsub.proto +++ b/protos/google/pubsub/v1/pubsub.proto @@ -1141,6 +1141,14 @@ message BigQueryConfig { // write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be // enabled at the same time. bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + string service_account_email = 7 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for a Cloud Storage subscription. @@ -1227,6 +1235,14 @@ message CloudStorageConfig { // Output only. An output-only field that indicates whether or not the // subscription can receive messages. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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. + string service_account_email = 11 [(google.api.field_behavior) = OPTIONAL]; } // A message and its corresponding acknowledgment ID. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index e4f105872..17d730c34 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -3601,6 +3601,9 @@ export namespace google { /** BigQueryConfig useTableSchema */ useTableSchema?: (boolean|null); + + /** BigQueryConfig serviceAccountEmail */ + serviceAccountEmail?: (string|null); } /** Represents a BigQueryConfig. */ @@ -3630,6 +3633,9 @@ export namespace google { /** BigQueryConfig useTableSchema. */ public useTableSchema: boolean; + /** BigQueryConfig serviceAccountEmail. */ + public serviceAccountEmail: string; + /** * Creates a new BigQueryConfig instance using the specified properties. * @param [properties] Properties to set @@ -3750,6 +3756,9 @@ export namespace google { /** CloudStorageConfig state */ state?: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State|null); + + /** CloudStorageConfig serviceAccountEmail */ + serviceAccountEmail?: (string|null); } /** Represents a CloudStorageConfig. */ @@ -3788,6 +3797,9 @@ export namespace google { /** CloudStorageConfig state. */ public state: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State); + /** CloudStorageConfig serviceAccountEmail. */ + public serviceAccountEmail: string; + /** CloudStorageConfig outputFormat. */ public outputFormat?: ("textConfig"|"avroConfig"); diff --git a/protos/protos.js b/protos/protos.js index 1bb3b1694..65103b824 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -8267,6 +8267,7 @@ * @property {boolean|null} [dropUnknownFields] BigQueryConfig dropUnknownFields * @property {google.pubsub.v1.BigQueryConfig.State|null} [state] BigQueryConfig state * @property {boolean|null} [useTableSchema] BigQueryConfig useTableSchema + * @property {string|null} [serviceAccountEmail] BigQueryConfig serviceAccountEmail */ /** @@ -8332,6 +8333,14 @@ */ BigQueryConfig.prototype.useTableSchema = false; + /** + * BigQueryConfig serviceAccountEmail. + * @member {string} serviceAccountEmail + * @memberof google.pubsub.v1.BigQueryConfig + * @instance + */ + BigQueryConfig.prototype.serviceAccountEmail = ""; + /** * Creates a new BigQueryConfig instance using the specified properties. * @function create @@ -8368,6 +8377,8 @@ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.useTableSchema); + if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccountEmail); return writer; }; @@ -8426,6 +8437,10 @@ message.useTableSchema = reader.bool(); break; } + case 7: { + message.serviceAccountEmail = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8488,6 +8503,9 @@ if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema")) if (typeof message.useTableSchema !== "boolean") return "useTableSchema: boolean expected"; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + if (!$util.isString(message.serviceAccountEmail)) + return "serviceAccountEmail: string expected"; return null; }; @@ -8545,6 +8563,8 @@ } if (object.useTableSchema != null) message.useTableSchema = Boolean(object.useTableSchema); + if (object.serviceAccountEmail != null) + message.serviceAccountEmail = String(object.serviceAccountEmail); return message; }; @@ -8568,6 +8588,7 @@ object.dropUnknownFields = false; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.useTableSchema = false; + object.serviceAccountEmail = ""; } if (message.table != null && message.hasOwnProperty("table")) object.table = message.table; @@ -8581,6 +8602,8 @@ object.state = options.enums === String ? $root.google.pubsub.v1.BigQueryConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.BigQueryConfig.State[message.state] : message.state; if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema")) object.useTableSchema = message.useTableSchema; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + object.serviceAccountEmail = message.serviceAccountEmail; return object; }; @@ -8650,6 +8673,7 @@ * @property {google.protobuf.IDuration|null} [maxDuration] CloudStorageConfig maxDuration * @property {number|Long|null} [maxBytes] CloudStorageConfig maxBytes * @property {google.pubsub.v1.CloudStorageConfig.State|null} [state] CloudStorageConfig state + * @property {string|null} [serviceAccountEmail] CloudStorageConfig serviceAccountEmail */ /** @@ -8739,6 +8763,14 @@ */ CloudStorageConfig.prototype.state = 0; + /** + * CloudStorageConfig serviceAccountEmail. + * @member {string} serviceAccountEmail + * @memberof google.pubsub.v1.CloudStorageConfig + * @instance + */ + CloudStorageConfig.prototype.serviceAccountEmail = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -8795,6 +8827,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state); if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.filenameDatetimeFormat); + if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.serviceAccountEmail); return writer; }; @@ -8865,6 +8899,10 @@ message.state = reader.int32(); break; } + case 11: { + message.serviceAccountEmail = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8950,6 +8988,9 @@ case 4: break; } + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + if (!$util.isString(message.serviceAccountEmail)) + return "serviceAccountEmail: string expected"; return null; }; @@ -9025,6 +9066,8 @@ message.state = 4; break; } + if (object.serviceAccountEmail != null) + message.serviceAccountEmail = String(object.serviceAccountEmail); return message; }; @@ -9053,6 +9096,7 @@ object.maxBytes = options.longs === String ? "0" : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.filenameDatetimeFormat = ""; + object.serviceAccountEmail = ""; } if (message.bucket != null && message.hasOwnProperty("bucket")) object.bucket = message.bucket; @@ -9081,6 +9125,8 @@ object.state = options.enums === String ? $root.google.pubsub.v1.CloudStorageConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.CloudStorageConfig.State[message.state] : message.state; if (message.filenameDatetimeFormat != null && message.hasOwnProperty("filenameDatetimeFormat")) object.filenameDatetimeFormat = message.filenameDatetimeFormat; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + object.serviceAccountEmail = message.serviceAccountEmail; return object; }; diff --git a/protos/protos.json b/protos/protos.json index f63d0e5e7..e37e3bd25 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1274,6 +1274,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "serviceAccountEmail": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1361,6 +1368,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "serviceAccountEmail": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": {