From 3aade58c11e739c4652f5b1ab8e7f3cf12992ce9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:15:17 -0700 Subject: [PATCH] feat: [cloudbuild] Add PrivateServiceConnect option to WorkerPool (#5770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add PrivateServiceConnect option to WorkerPool PiperOrigin-RevId: 690046730 Source-Link: https://github.com/googleapis/googleapis/commit/48d30c4966ef9ea31b897e13f75d8f94070cc8e9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2e1af9f204cc2f13f07bca1f53ed2e2151a9c48d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkYnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjJlMWFmOWYyMDRjYzJmMTNmMDdiY2ExZjUzZWQyZTIxNTFhOWM0OGQifQ== * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../devtools/cloudbuild/v1/cloudbuild.proto | 47 +++ .../protos/protos.d.ts | 115 ++++++++ .../protos/protos.js | 278 ++++++++++++++++++ .../protos/protos.json | 33 +++ 4 files changed, 473 insertions(+) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 965d1c297b8..b288169fe7d 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -67,6 +67,10 @@ option (google.api.resource_definition) = { type: "pubsub.googleapis.com/Topic" pattern: "projects/{project}/topics/{topic}" }; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/NetworkAttachment" + pattern: "projects/{project}/regions/{region}/networkAttachments/{networkattachment}" +}; option (google.api.resource_definition) = { type: "cloudbuild.googleapis.com/Repository" pattern: "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}" @@ -2583,11 +2587,54 @@ message PrivatePoolV1Config { [(google.api.field_behavior) = IMMUTABLE]; } + // Defines the Private Service Connect network configuration for the pool. + message PrivateServiceConnect { + // Required. Immutable. The network attachment that the worker network + // interface is peered to. Must be in the format + // `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. + // The region of network attachment must be the same as the worker pool. + // See [Network + // Attachments](https://cloud.google.com/vpc/docs/about-network-attachments) + string network_attachment = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/NetworkAttachment" + } + ]; + + // Required. Immutable. Disable public IP on the primary network interface. + // + // If true, workers are created without any public address, which prevents + // network egress to public IPs unless a network proxy is configured. + // If false, workers are created with a public address which allows for + // public internet egress. The public address only applies to traffic + // through the primary network interface. + // If `route_all_traffic` is set to true, all traffic will go through the + // non-primary network interface, this boolean has no effect. + bool public_ip_address_disabled = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Immutable. Route all traffic through PSC interface. Enable this if you + // want full control of traffic in the private pool. Configure Cloud NAT for + // the subnet of network attachment if you need to access public Internet. + // + // If false, Only route private IPs, e.g. 10.0.0.0/8, 172.16.0.0/12, and + // 192.168.0.0/16 through PSC interface. + bool route_all_traffic = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + // Machine configuration for the workers in the pool. WorkerConfig worker_config = 1; // Network configuration for the pool. NetworkConfig network_config = 2; + + // Immutable. Private Service Connect(PSC) Network configuration for the pool. + PrivateServiceConnect private_service_connect = 5 + [(google.api.field_behavior) = IMMUTABLE]; } // Request to create a new `WorkerPool`. diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 4b03ab67c8e..6a26b348e7a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -8120,6 +8120,9 @@ export namespace google { /** PrivatePoolV1Config networkConfig */ networkConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null); + + /** PrivatePoolV1Config privateServiceConnect */ + privateServiceConnect?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect|null); } /** Represents a PrivatePoolV1Config. */ @@ -8137,6 +8140,9 @@ export namespace google { /** PrivatePoolV1Config networkConfig. */ public networkConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null); + /** PrivatePoolV1Config privateServiceConnect. */ + public privateServiceConnect?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect|null); + /** * Creates a new PrivatePoolV1Config instance using the specified properties. * @param [properties] Properties to set @@ -8438,6 +8444,115 @@ export namespace google { PUBLIC_EGRESS = 2 } } + + /** Properties of a PrivateServiceConnect. */ + interface IPrivateServiceConnect { + + /** PrivateServiceConnect networkAttachment */ + networkAttachment?: (string|null); + + /** PrivateServiceConnect publicIpAddressDisabled */ + publicIpAddressDisabled?: (boolean|null); + + /** PrivateServiceConnect routeAllTraffic */ + routeAllTraffic?: (boolean|null); + } + + /** Represents a PrivateServiceConnect. */ + class PrivateServiceConnect implements IPrivateServiceConnect { + + /** + * Constructs a new PrivateServiceConnect. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect); + + /** PrivateServiceConnect networkAttachment. */ + public networkAttachment: string; + + /** PrivateServiceConnect publicIpAddressDisabled. */ + public publicIpAddressDisabled: boolean; + + /** PrivateServiceConnect routeAllTraffic. */ + public routeAllTraffic: boolean; + + /** + * Creates a new PrivateServiceConnect instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateServiceConnect instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect): google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect; + + /** + * Encodes the specified PrivateServiceConnect message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.verify|verify} messages. + * @param message PrivateServiceConnect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateServiceConnect message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.verify|verify} messages. + * @param message PrivateServiceConnect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateServiceConnect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateServiceConnect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect; + + /** + * Decodes a PrivateServiceConnect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateServiceConnect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect; + + /** + * Verifies a PrivateServiceConnect message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateServiceConnect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateServiceConnect + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect; + + /** + * Creates a plain object from a PrivateServiceConnect message. Also converts values to other types if specified. + * @param message PrivateServiceConnect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateServiceConnect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateServiceConnect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a CreateWorkerPoolRequest. */ diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 624866adf13..faaeed96549 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -21455,6 +21455,7 @@ * @interface IPrivatePoolV1Config * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig|null} [workerConfig] PrivatePoolV1Config workerConfig * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null} [networkConfig] PrivatePoolV1Config networkConfig + * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect|null} [privateServiceConnect] PrivatePoolV1Config privateServiceConnect */ /** @@ -21488,6 +21489,14 @@ */ PrivatePoolV1Config.prototype.networkConfig = null; + /** + * PrivatePoolV1Config privateServiceConnect. + * @member {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect|null|undefined} privateServiceConnect + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @instance + */ + PrivatePoolV1Config.prototype.privateServiceConnect = null; + /** * Creates a new PrivatePoolV1Config instance using the specified properties. * @function create @@ -21516,6 +21525,8 @@ $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.encode(message.workerConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.privateServiceConnect != null && Object.hasOwnProperty.call(message, "privateServiceConnect")) + $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.encode(message.privateServiceConnect, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -21558,6 +21569,10 @@ message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.decode(reader, reader.uint32()); break; } + case 5: { + message.privateServiceConnect = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21603,6 +21618,11 @@ if (error) return "networkConfig." + error; } + if (message.privateServiceConnect != null && message.hasOwnProperty("privateServiceConnect")) { + var error = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.verify(message.privateServiceConnect); + if (error) + return "privateServiceConnect." + error; + } return null; }; @@ -21628,6 +21648,11 @@ throw TypeError(".google.devtools.cloudbuild.v1.PrivatePoolV1Config.networkConfig: object expected"); message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.fromObject(object.networkConfig); } + if (object.privateServiceConnect != null) { + if (typeof object.privateServiceConnect !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.PrivatePoolV1Config.privateServiceConnect: object expected"); + message.privateServiceConnect = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.fromObject(object.privateServiceConnect); + } return message; }; @@ -21647,11 +21672,14 @@ if (options.defaults) { object.workerConfig = null; object.networkConfig = null; + object.privateServiceConnect = null; } if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) object.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.toObject(message.workerConfig, options); if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) object.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.toObject(message.networkConfig, options); + if (message.privateServiceConnect != null && message.hasOwnProperty("privateServiceConnect")) + object.privateServiceConnect = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.toObject(message.privateServiceConnect, options); return object; }; @@ -22212,6 +22240,256 @@ return NetworkConfig; })(); + PrivatePoolV1Config.PrivateServiceConnect = (function() { + + /** + * Properties of a PrivateServiceConnect. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @interface IPrivateServiceConnect + * @property {string|null} [networkAttachment] PrivateServiceConnect networkAttachment + * @property {boolean|null} [publicIpAddressDisabled] PrivateServiceConnect publicIpAddressDisabled + * @property {boolean|null} [routeAllTraffic] PrivateServiceConnect routeAllTraffic + */ + + /** + * Constructs a new PrivateServiceConnect. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @classdesc Represents a PrivateServiceConnect. + * @implements IPrivateServiceConnect + * @constructor + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect=} [properties] Properties to set + */ + function PrivateServiceConnect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateServiceConnect networkAttachment. + * @member {string} networkAttachment + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @instance + */ + PrivateServiceConnect.prototype.networkAttachment = ""; + + /** + * PrivateServiceConnect publicIpAddressDisabled. + * @member {boolean} publicIpAddressDisabled + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @instance + */ + PrivateServiceConnect.prototype.publicIpAddressDisabled = false; + + /** + * PrivateServiceConnect routeAllTraffic. + * @member {boolean} routeAllTraffic + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @instance + */ + PrivateServiceConnect.prototype.routeAllTraffic = false; + + /** + * Creates a new PrivateServiceConnect instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect} PrivateServiceConnect instance + */ + PrivateServiceConnect.create = function create(properties) { + return new PrivateServiceConnect(properties); + }; + + /** + * Encodes the specified PrivateServiceConnect message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect} message PrivateServiceConnect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateServiceConnect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkAttachment); + if (message.publicIpAddressDisabled != null && Object.hasOwnProperty.call(message, "publicIpAddressDisabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.publicIpAddressDisabled); + if (message.routeAllTraffic != null && Object.hasOwnProperty.call(message, "routeAllTraffic")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.routeAllTraffic); + return writer; + }; + + /** + * Encodes the specified PrivateServiceConnect message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IPrivateServiceConnect} message PrivateServiceConnect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateServiceConnect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateServiceConnect message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect} PrivateServiceConnect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateServiceConnect.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkAttachment = reader.string(); + break; + } + case 2: { + message.publicIpAddressDisabled = reader.bool(); + break; + } + case 3: { + message.routeAllTraffic = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateServiceConnect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect} PrivateServiceConnect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateServiceConnect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateServiceConnect message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateServiceConnect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + if (message.publicIpAddressDisabled != null && message.hasOwnProperty("publicIpAddressDisabled")) + if (typeof message.publicIpAddressDisabled !== "boolean") + return "publicIpAddressDisabled: boolean expected"; + if (message.routeAllTraffic != null && message.hasOwnProperty("routeAllTraffic")) + if (typeof message.routeAllTraffic !== "boolean") + return "routeAllTraffic: boolean expected"; + return null; + }; + + /** + * Creates a PrivateServiceConnect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect} PrivateServiceConnect + */ + PrivateServiceConnect.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect(); + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + if (object.publicIpAddressDisabled != null) + message.publicIpAddressDisabled = Boolean(object.publicIpAddressDisabled); + if (object.routeAllTraffic != null) + message.routeAllTraffic = Boolean(object.routeAllTraffic); + return message; + }; + + /** + * Creates a plain object from a PrivateServiceConnect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect} message PrivateServiceConnect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateServiceConnect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkAttachment = ""; + object.publicIpAddressDisabled = false; + object.routeAllTraffic = false; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + object.networkAttachment = message.networkAttachment; + if (message.publicIpAddressDisabled != null && message.hasOwnProperty("publicIpAddressDisabled")) + object.publicIpAddressDisabled = message.publicIpAddressDisabled; + if (message.routeAllTraffic != null && message.hasOwnProperty("routeAllTraffic")) + object.routeAllTraffic = message.routeAllTraffic; + return object; + }; + + /** + * Converts this PrivateServiceConnect to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @instance + * @returns {Object.} JSON object + */ + PrivateServiceConnect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateServiceConnect + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateServiceConnect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect"; + }; + + return PrivateServiceConnect; + })(); + return PrivatePoolV1Config; })(); diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 74ab3d01157..70d039c9a2f 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -2746,6 +2746,13 @@ "networkConfig": { "type": "NetworkConfig", "id": 2 + }, + "privateServiceConnect": { + "type": "PrivateServiceConnect", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } }, "nested": { @@ -2792,6 +2799,32 @@ } } } + }, + "PrivateServiceConnect": { + "fields": { + "networkAttachment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/NetworkAttachment" + } + }, + "publicIpAddressDisabled": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "routeAllTraffic": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } } } },