diff --git a/protos/google/container/v1/cluster_service.proto b/protos/google/container/v1/cluster_service.proto index c48f0a8..6dc6eec 100644 --- a/protos/google/container/v1/cluster_service.proto +++ b/protos/google/container/v1/cluster_service.proto @@ -3384,6 +3384,39 @@ message ServiceExternalIPsConfig { bool enabled = 1; } +// GetOpenIDConfigRequest gets the OIDC discovery document for the +// cluster. See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigRequest { + // The cluster (project, location, cluster name) to get the discovery document + // for. Specified in the format `projects/*/locations/*/clusters/*`. + string parent = 1; +} + +// GetOpenIDConfigResponse is an OIDC discovery document for the cluster. +// See the OpenID Connect Discovery 1.0 specification for details. +message GetOpenIDConfigResponse { + // OIDC Issuer. + string issuer = 1; + + // JSON Web Key uri. + string jwks_uri = 2; + + // Supported response types. + repeated string response_types_supported = 3; + + // Supported subject types. + repeated string subject_types_supported = 4; + + // supported ID Token signing Algorithms. + repeated string id_token_signing_alg_values_supported = 5; + + // Supported claims. + repeated string claims_supported = 6; + + // Supported grant types. + repeated string grant_types = 7; +} + // GetJSONWebKeysRequest gets the public component of the keys used by the // cluster to sign token requests. This will be the jwks_uri for the discover // document returned by getOpenIDConfig. See the OpenID Connect diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 55ff728..dea8887 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -11373,6 +11373,222 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a GetOpenIDConfigRequest. */ + interface IGetOpenIDConfigRequest { + + /** GetOpenIDConfigRequest parent */ + parent?: (string|null); + } + + /** Represents a GetOpenIDConfigRequest. */ + class GetOpenIDConfigRequest implements IGetOpenIDConfigRequest { + + /** + * Constructs a new GetOpenIDConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetOpenIDConfigRequest); + + /** GetOpenIDConfigRequest parent. */ + public parent: string; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigRequest instance + */ + public static create(properties?: google.container.v1.IGetOpenIDConfigRequest): google.container.v1.GetOpenIDConfigRequest; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @param message GetOpenIDConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigRequest + * @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.container.v1.GetOpenIDConfigRequest; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigRequest + * @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.container.v1.GetOpenIDConfigRequest; + + /** + * Verifies a GetOpenIDConfigRequest 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 GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigRequest; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @param message GetOpenIDConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetOpenIDConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOpenIDConfigResponse. */ + interface IGetOpenIDConfigResponse { + + /** GetOpenIDConfigResponse issuer */ + issuer?: (string|null); + + /** GetOpenIDConfigResponse jwksUri */ + jwksUri?: (string|null); + + /** GetOpenIDConfigResponse responseTypesSupported */ + responseTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse subjectTypesSupported */ + subjectTypesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported */ + idTokenSigningAlgValuesSupported?: (string[]|null); + + /** GetOpenIDConfigResponse claimsSupported */ + claimsSupported?: (string[]|null); + + /** GetOpenIDConfigResponse grantTypes */ + grantTypes?: (string[]|null); + } + + /** Represents a GetOpenIDConfigResponse. */ + class GetOpenIDConfigResponse implements IGetOpenIDConfigResponse { + + /** + * Constructs a new GetOpenIDConfigResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGetOpenIDConfigResponse); + + /** GetOpenIDConfigResponse issuer. */ + public issuer: string; + + /** GetOpenIDConfigResponse jwksUri. */ + public jwksUri: string; + + /** GetOpenIDConfigResponse responseTypesSupported. */ + public responseTypesSupported: string[]; + + /** GetOpenIDConfigResponse subjectTypesSupported. */ + public subjectTypesSupported: string[]; + + /** GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. */ + public idTokenSigningAlgValuesSupported: string[]; + + /** GetOpenIDConfigResponse claimsSupported. */ + public claimsSupported: string[]; + + /** GetOpenIDConfigResponse grantTypes. */ + public grantTypes: string[]; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOpenIDConfigResponse instance + */ + public static create(properties?: google.container.v1.IGetOpenIDConfigResponse): google.container.v1.GetOpenIDConfigResponse; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @param message GetOpenIDConfigResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGetOpenIDConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOpenIDConfigResponse + * @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.container.v1.GetOpenIDConfigResponse; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOpenIDConfigResponse + * @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.container.v1.GetOpenIDConfigResponse; + + /** + * Verifies a GetOpenIDConfigResponse 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 GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOpenIDConfigResponse + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GetOpenIDConfigResponse; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @param message GetOpenIDConfigResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GetOpenIDConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a GetJSONWebKeysRequest. */ interface IGetJSONWebKeysRequest { diff --git a/protos/protos.js b/protos/protos.js index a5a4fe6..fe7c472 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -28904,6 +28904,595 @@ return ServiceExternalIPsConfig; })(); + v1.GetOpenIDConfigRequest = (function() { + + /** + * Properties of a GetOpenIDConfigRequest. + * @memberof google.container.v1 + * @interface IGetOpenIDConfigRequest + * @property {string|null} [parent] GetOpenIDConfigRequest parent + */ + + /** + * Constructs a new GetOpenIDConfigRequest. + * @memberof google.container.v1 + * @classdesc Represents a GetOpenIDConfigRequest. + * @implements IGetOpenIDConfigRequest + * @constructor + * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set + */ + function GetOpenIDConfigRequest(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]]; + } + + /** + * GetOpenIDConfigRequest parent. + * @member {string} parent + * @memberof google.container.v1.GetOpenIDConfigRequest + * @instance + */ + GetOpenIDConfigRequest.prototype.parent = ""; + + /** + * Creates a new GetOpenIDConfigRequest instance using the specified properties. + * @function create + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest=} [properties] Properties to set + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest instance + */ + GetOpenIDConfigRequest.create = function create(properties) { + return new GetOpenIDConfigRequest(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigRequest message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.IGetOpenIDConfigRequest} message GetOpenIDConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.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.container.v1.GetOpenIDConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigRequest message. + * @function verify + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a GetOpenIDConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetOpenIDConfigRequest} GetOpenIDConfigRequest + */ + GetOpenIDConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetOpenIDConfigRequest) + return object; + var message = new $root.google.container.v1.GetOpenIDConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetOpenIDConfigRequest + * @static + * @param {google.container.v1.GetOpenIDConfigRequest} message GetOpenIDConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this GetOpenIDConfigRequest to JSON. + * @function toJSON + * @memberof google.container.v1.GetOpenIDConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOpenIDConfigRequest; + })(); + + v1.GetOpenIDConfigResponse = (function() { + + /** + * Properties of a GetOpenIDConfigResponse. + * @memberof google.container.v1 + * @interface IGetOpenIDConfigResponse + * @property {string|null} [issuer] GetOpenIDConfigResponse issuer + * @property {string|null} [jwksUri] GetOpenIDConfigResponse jwksUri + * @property {Array.|null} [responseTypesSupported] GetOpenIDConfigResponse responseTypesSupported + * @property {Array.|null} [subjectTypesSupported] GetOpenIDConfigResponse subjectTypesSupported + * @property {Array.|null} [idTokenSigningAlgValuesSupported] GetOpenIDConfigResponse idTokenSigningAlgValuesSupported + * @property {Array.|null} [claimsSupported] GetOpenIDConfigResponse claimsSupported + * @property {Array.|null} [grantTypes] GetOpenIDConfigResponse grantTypes + */ + + /** + * Constructs a new GetOpenIDConfigResponse. + * @memberof google.container.v1 + * @classdesc Represents a GetOpenIDConfigResponse. + * @implements IGetOpenIDConfigResponse + * @constructor + * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set + */ + function GetOpenIDConfigResponse(properties) { + this.responseTypesSupported = []; + this.subjectTypesSupported = []; + this.idTokenSigningAlgValuesSupported = []; + this.claimsSupported = []; + this.grantTypes = []; + 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]]; + } + + /** + * GetOpenIDConfigResponse issuer. + * @member {string} issuer + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.issuer = ""; + + /** + * GetOpenIDConfigResponse jwksUri. + * @member {string} jwksUri + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.jwksUri = ""; + + /** + * GetOpenIDConfigResponse responseTypesSupported. + * @member {Array.} responseTypesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.responseTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse subjectTypesSupported. + * @member {Array.} subjectTypesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.subjectTypesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse idTokenSigningAlgValuesSupported. + * @member {Array.} idTokenSigningAlgValuesSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.idTokenSigningAlgValuesSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse claimsSupported. + * @member {Array.} claimsSupported + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.claimsSupported = $util.emptyArray; + + /** + * GetOpenIDConfigResponse grantTypes. + * @member {Array.} grantTypes + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + */ + GetOpenIDConfigResponse.prototype.grantTypes = $util.emptyArray; + + /** + * Creates a new GetOpenIDConfigResponse instance using the specified properties. + * @function create + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse=} [properties] Properties to set + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse instance + */ + GetOpenIDConfigResponse.create = function create(properties) { + return new GetOpenIDConfigResponse(properties); + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.jwksUri != null && Object.hasOwnProperty.call(message, "jwksUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jwksUri); + if (message.responseTypesSupported != null && message.responseTypesSupported.length) + for (var i = 0; i < message.responseTypesSupported.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.responseTypesSupported[i]); + if (message.subjectTypesSupported != null && message.subjectTypesSupported.length) + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subjectTypesSupported[i]); + if (message.idTokenSigningAlgValuesSupported != null && message.idTokenSigningAlgValuesSupported.length) + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.idTokenSigningAlgValuesSupported[i]); + if (message.claimsSupported != null && message.claimsSupported.length) + for (var i = 0; i < message.claimsSupported.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.claimsSupported[i]); + if (message.grantTypes != null && message.grantTypes.length) + for (var i = 0; i < message.grantTypes.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.grantTypes[i]); + return writer; + }; + + /** + * Encodes the specified GetOpenIDConfigResponse message, length delimited. Does not implicitly {@link google.container.v1.GetOpenIDConfigResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.IGetOpenIDConfigResponse} message GetOpenIDConfigResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOpenIDConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.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.container.v1.GetOpenIDConfigResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.issuer = reader.string(); + break; + case 2: + message.jwksUri = reader.string(); + break; + case 3: + if (!(message.responseTypesSupported && message.responseTypesSupported.length)) + message.responseTypesSupported = []; + message.responseTypesSupported.push(reader.string()); + break; + case 4: + if (!(message.subjectTypesSupported && message.subjectTypesSupported.length)) + message.subjectTypesSupported = []; + message.subjectTypesSupported.push(reader.string()); + break; + case 5: + if (!(message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length)) + message.idTokenSigningAlgValuesSupported = []; + message.idTokenSigningAlgValuesSupported.push(reader.string()); + break; + case 6: + if (!(message.claimsSupported && message.claimsSupported.length)) + message.claimsSupported = []; + message.claimsSupported.push(reader.string()); + break; + case 7: + if (!(message.grantTypes && message.grantTypes.length)) + message.grantTypes = []; + message.grantTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOpenIDConfigResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOpenIDConfigResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOpenIDConfigResponse message. + * @function verify + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOpenIDConfigResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + if (!$util.isString(message.jwksUri)) + return "jwksUri: string expected"; + if (message.responseTypesSupported != null && message.hasOwnProperty("responseTypesSupported")) { + if (!Array.isArray(message.responseTypesSupported)) + return "responseTypesSupported: array expected"; + for (var i = 0; i < message.responseTypesSupported.length; ++i) + if (!$util.isString(message.responseTypesSupported[i])) + return "responseTypesSupported: string[] expected"; + } + if (message.subjectTypesSupported != null && message.hasOwnProperty("subjectTypesSupported")) { + if (!Array.isArray(message.subjectTypesSupported)) + return "subjectTypesSupported: array expected"; + for (var i = 0; i < message.subjectTypesSupported.length; ++i) + if (!$util.isString(message.subjectTypesSupported[i])) + return "subjectTypesSupported: string[] expected"; + } + if (message.idTokenSigningAlgValuesSupported != null && message.hasOwnProperty("idTokenSigningAlgValuesSupported")) { + if (!Array.isArray(message.idTokenSigningAlgValuesSupported)) + return "idTokenSigningAlgValuesSupported: array expected"; + for (var i = 0; i < message.idTokenSigningAlgValuesSupported.length; ++i) + if (!$util.isString(message.idTokenSigningAlgValuesSupported[i])) + return "idTokenSigningAlgValuesSupported: string[] expected"; + } + if (message.claimsSupported != null && message.hasOwnProperty("claimsSupported")) { + if (!Array.isArray(message.claimsSupported)) + return "claimsSupported: array expected"; + for (var i = 0; i < message.claimsSupported.length; ++i) + if (!$util.isString(message.claimsSupported[i])) + return "claimsSupported: string[] expected"; + } + if (message.grantTypes != null && message.hasOwnProperty("grantTypes")) { + if (!Array.isArray(message.grantTypes)) + return "grantTypes: array expected"; + for (var i = 0; i < message.grantTypes.length; ++i) + if (!$util.isString(message.grantTypes[i])) + return "grantTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a GetOpenIDConfigResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GetOpenIDConfigResponse} GetOpenIDConfigResponse + */ + GetOpenIDConfigResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GetOpenIDConfigResponse) + return object; + var message = new $root.google.container.v1.GetOpenIDConfigResponse(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.jwksUri != null) + message.jwksUri = String(object.jwksUri); + if (object.responseTypesSupported) { + if (!Array.isArray(object.responseTypesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.responseTypesSupported: array expected"); + message.responseTypesSupported = []; + for (var i = 0; i < object.responseTypesSupported.length; ++i) + message.responseTypesSupported[i] = String(object.responseTypesSupported[i]); + } + if (object.subjectTypesSupported) { + if (!Array.isArray(object.subjectTypesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.subjectTypesSupported: array expected"); + message.subjectTypesSupported = []; + for (var i = 0; i < object.subjectTypesSupported.length; ++i) + message.subjectTypesSupported[i] = String(object.subjectTypesSupported[i]); + } + if (object.idTokenSigningAlgValuesSupported) { + if (!Array.isArray(object.idTokenSigningAlgValuesSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.idTokenSigningAlgValuesSupported: array expected"); + message.idTokenSigningAlgValuesSupported = []; + for (var i = 0; i < object.idTokenSigningAlgValuesSupported.length; ++i) + message.idTokenSigningAlgValuesSupported[i] = String(object.idTokenSigningAlgValuesSupported[i]); + } + if (object.claimsSupported) { + if (!Array.isArray(object.claimsSupported)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.claimsSupported: array expected"); + message.claimsSupported = []; + for (var i = 0; i < object.claimsSupported.length; ++i) + message.claimsSupported[i] = String(object.claimsSupported[i]); + } + if (object.grantTypes) { + if (!Array.isArray(object.grantTypes)) + throw TypeError(".google.container.v1.GetOpenIDConfigResponse.grantTypes: array expected"); + message.grantTypes = []; + for (var i = 0; i < object.grantTypes.length; ++i) + message.grantTypes[i] = String(object.grantTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a GetOpenIDConfigResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GetOpenIDConfigResponse + * @static + * @param {google.container.v1.GetOpenIDConfigResponse} message GetOpenIDConfigResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOpenIDConfigResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.responseTypesSupported = []; + object.subjectTypesSupported = []; + object.idTokenSigningAlgValuesSupported = []; + object.claimsSupported = []; + object.grantTypes = []; + } + if (options.defaults) { + object.issuer = ""; + object.jwksUri = ""; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.jwksUri != null && message.hasOwnProperty("jwksUri")) + object.jwksUri = message.jwksUri; + if (message.responseTypesSupported && message.responseTypesSupported.length) { + object.responseTypesSupported = []; + for (var j = 0; j < message.responseTypesSupported.length; ++j) + object.responseTypesSupported[j] = message.responseTypesSupported[j]; + } + if (message.subjectTypesSupported && message.subjectTypesSupported.length) { + object.subjectTypesSupported = []; + for (var j = 0; j < message.subjectTypesSupported.length; ++j) + object.subjectTypesSupported[j] = message.subjectTypesSupported[j]; + } + if (message.idTokenSigningAlgValuesSupported && message.idTokenSigningAlgValuesSupported.length) { + object.idTokenSigningAlgValuesSupported = []; + for (var j = 0; j < message.idTokenSigningAlgValuesSupported.length; ++j) + object.idTokenSigningAlgValuesSupported[j] = message.idTokenSigningAlgValuesSupported[j]; + } + if (message.claimsSupported && message.claimsSupported.length) { + object.claimsSupported = []; + for (var j = 0; j < message.claimsSupported.length; ++j) + object.claimsSupported[j] = message.claimsSupported[j]; + } + if (message.grantTypes && message.grantTypes.length) { + object.grantTypes = []; + for (var j = 0; j < message.grantTypes.length; ++j) + object.grantTypes[j] = message.grantTypes[j]; + } + return object; + }; + + /** + * Converts this GetOpenIDConfigResponse to JSON. + * @function toJSON + * @memberof google.container.v1.GetOpenIDConfigResponse + * @instance + * @returns {Object.} JSON object + */ + GetOpenIDConfigResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOpenIDConfigResponse; + })(); + v1.GetJSONWebKeysRequest = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index f0a20e7..a69746c 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -3689,6 +3689,51 @@ } } }, + "GetOpenIDConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "GetOpenIDConfigResponse": { + "fields": { + "issuer": { + "type": "string", + "id": 1 + }, + "jwksUri": { + "type": "string", + "id": 2 + }, + "responseTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "subjectTypesSupported": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "idTokenSigningAlgValuesSupported": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "claimsSupported": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "grantTypes": { + "rule": "repeated", + "type": "string", + "id": 7 + } + } + }, "GetJSONWebKeysRequest": { "fields": { "parent": {