From 47f3f084fddebf4057d99cf8aed7f71e5f62bf69 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:16:45 -0700 Subject: [PATCH] build: use bazel build (#355) --- .../google-cloud-oslogin/protos/protos.d.ts | 1228 ++--- .../google-cloud-oslogin/protos/protos.js | 4472 ++++++++--------- .../google-cloud-oslogin/protos/protos.json | 384 +- .../v1/os_login_service_client_config.json | 18 +- .../src/v1/os_login_service_proto_list.json | 1 - .../os_login_service_client_config.json | 18 +- .../v1beta/os_login_service_proto_list.json | 1 - packages/google-cloud-oslogin/synth.metadata | 26 +- packages/google-cloud-oslogin/synth.py | 12 +- 9 files changed, 3077 insertions(+), 3083 deletions(-) diff --git a/packages/google-cloud-oslogin/protos/protos.d.ts b/packages/google-cloud-oslogin/protos/protos.d.ts index 3ffbd07895e5..59dcfb608fdf 100644 --- a/packages/google-cloud-oslogin/protos/protos.d.ts +++ b/packages/google-cloud-oslogin/protos/protos.d.ts @@ -23,275 +23,6 @@ export namespace google { /** Namespace oslogin. */ namespace oslogin { - /** Namespace common. */ - namespace common { - - /** OperatingSystemType enum. */ - enum OperatingSystemType { - OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0, - LINUX = 1, - WINDOWS = 2 - } - - /** Properties of a PosixAccount. */ - interface IPosixAccount { - - /** PosixAccount primary */ - primary?: (boolean|null); - - /** PosixAccount username */ - username?: (string|null); - - /** PosixAccount uid */ - uid?: (number|Long|string|null); - - /** PosixAccount gid */ - gid?: (number|Long|string|null); - - /** PosixAccount homeDirectory */ - homeDirectory?: (string|null); - - /** PosixAccount shell */ - shell?: (string|null); - - /** PosixAccount gecos */ - gecos?: (string|null); - - /** PosixAccount systemId */ - systemId?: (string|null); - - /** PosixAccount accountId */ - accountId?: (string|null); - - /** PosixAccount operatingSystemType */ - operatingSystemType?: (google.cloud.oslogin.common.OperatingSystemType|keyof typeof google.cloud.oslogin.common.OperatingSystemType|null); - - /** PosixAccount name */ - name?: (string|null); - } - - /** Represents a PosixAccount. */ - class PosixAccount implements IPosixAccount { - - /** - * Constructs a new PosixAccount. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.oslogin.common.IPosixAccount); - - /** PosixAccount primary. */ - public primary: boolean; - - /** PosixAccount username. */ - public username: string; - - /** PosixAccount uid. */ - public uid: (number|Long|string); - - /** PosixAccount gid. */ - public gid: (number|Long|string); - - /** PosixAccount homeDirectory. */ - public homeDirectory: string; - - /** PosixAccount shell. */ - public shell: string; - - /** PosixAccount gecos. */ - public gecos: string; - - /** PosixAccount systemId. */ - public systemId: string; - - /** PosixAccount accountId. */ - public accountId: string; - - /** PosixAccount operatingSystemType. */ - public operatingSystemType: (google.cloud.oslogin.common.OperatingSystemType|keyof typeof google.cloud.oslogin.common.OperatingSystemType); - - /** PosixAccount name. */ - public name: string; - - /** - * Creates a new PosixAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns PosixAccount instance - */ - public static create(properties?: google.cloud.oslogin.common.IPosixAccount): google.cloud.oslogin.common.PosixAccount; - - /** - * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. - * @param message PosixAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.oslogin.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PosixAccount message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. - * @param message PosixAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.oslogin.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PosixAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PosixAccount - * @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.cloud.oslogin.common.PosixAccount; - - /** - * Decodes a PosixAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PosixAccount - * @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.cloud.oslogin.common.PosixAccount; - - /** - * Verifies a PosixAccount 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 PosixAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PosixAccount - */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.PosixAccount; - - /** - * Creates a plain object from a PosixAccount message. Also converts values to other types if specified. - * @param message PosixAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.oslogin.common.PosixAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PosixAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SshPublicKey. */ - interface ISshPublicKey { - - /** SshPublicKey key */ - key?: (string|null); - - /** SshPublicKey expirationTimeUsec */ - expirationTimeUsec?: (number|Long|string|null); - - /** SshPublicKey fingerprint */ - fingerprint?: (string|null); - - /** SshPublicKey name */ - name?: (string|null); - } - - /** Represents a SshPublicKey. */ - class SshPublicKey implements ISshPublicKey { - - /** - * Constructs a new SshPublicKey. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.oslogin.common.ISshPublicKey); - - /** SshPublicKey key. */ - public key: string; - - /** SshPublicKey expirationTimeUsec. */ - public expirationTimeUsec: (number|Long|string); - - /** SshPublicKey fingerprint. */ - public fingerprint: string; - - /** SshPublicKey name. */ - public name: string; - - /** - * Creates a new SshPublicKey instance using the specified properties. - * @param [properties] Properties to set - * @returns SshPublicKey instance - */ - public static create(properties?: google.cloud.oslogin.common.ISshPublicKey): google.cloud.oslogin.common.SshPublicKey; - - /** - * Encodes the specified SshPublicKey message. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. - * @param message SshPublicKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.oslogin.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SshPublicKey message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. - * @param message SshPublicKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.oslogin.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SshPublicKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SshPublicKey - * @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.cloud.oslogin.common.SshPublicKey; - - /** - * Decodes a SshPublicKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SshPublicKey - * @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.cloud.oslogin.common.SshPublicKey; - - /** - * Verifies a SshPublicKey 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 SshPublicKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SshPublicKey - */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.SshPublicKey; - - /** - * Creates a plain object from a SshPublicKey message. Also converts values to other types if specified. - * @param message SshPublicKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.oslogin.common.SshPublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SshPublicKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - /** Namespace v1. */ namespace v1 { @@ -958,256 +689,525 @@ export namespace google { public static create(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyRequest): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; /** - * Encodes the specified ImportSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. - * @param message ImportSshPublicKeyRequest message or plain object to encode + * Encodes the specified ImportSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. + * @param message ImportSshPublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. + * @param message ImportSshPublicKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportSshPublicKeyRequest + * @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.cloud.oslogin.v1.ImportSshPublicKeyRequest; + + /** + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportSshPublicKeyRequest + * @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.cloud.oslogin.v1.ImportSshPublicKeyRequest; + + /** + * Verifies an ImportSshPublicKeyRequest 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 an ImportSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportSshPublicKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; + + /** + * Creates a plain object from an ImportSshPublicKeyRequest message. Also converts values to other types if specified. + * @param message ImportSshPublicKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportSshPublicKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ImportSshPublicKeyResponse. */ + interface IImportSshPublicKeyResponse { + + /** ImportSshPublicKeyResponse loginProfile */ + loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); + } + + /** Represents an ImportSshPublicKeyResponse. */ + class ImportSshPublicKeyResponse implements IImportSshPublicKeyResponse { + + /** + * Constructs a new ImportSshPublicKeyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse); + + /** ImportSshPublicKeyResponse loginProfile. */ + public loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); + + /** + * Creates a new ImportSshPublicKeyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportSshPublicKeyResponse instance + */ + public static create(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; + + /** + * Encodes the specified ImportSshPublicKeyResponse message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. + * @param message ImportSshPublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportSshPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. + * @param message ImportSshPublicKeyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportSshPublicKeyResponse + * @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.cloud.oslogin.v1.ImportSshPublicKeyResponse; + + /** + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportSshPublicKeyResponse + * @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.cloud.oslogin.v1.ImportSshPublicKeyResponse; + + /** + * Verifies an ImportSshPublicKeyResponse 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 an ImportSshPublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportSshPublicKeyResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; + + /** + * Creates a plain object from an ImportSshPublicKeyResponse message. Also converts values to other types if specified. + * @param message ImportSshPublicKeyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportSshPublicKeyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateSshPublicKeyRequest. */ + interface IUpdateSshPublicKeyRequest { + + /** UpdateSshPublicKeyRequest name */ + name?: (string|null); + + /** UpdateSshPublicKeyRequest sshPublicKey */ + sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); + + /** UpdateSshPublicKeyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSshPublicKeyRequest. */ + class UpdateSshPublicKeyRequest implements IUpdateSshPublicKeyRequest { + + /** + * Constructs a new UpdateSshPublicKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest); + + /** UpdateSshPublicKeyRequest name. */ + public name: string; + + /** UpdateSshPublicKeyRequest sshPublicKey. */ + public sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); + + /** UpdateSshPublicKeyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSshPublicKeyRequest instance + */ + public static create(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + + /** + * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. + * @param message UpdateSshPublicKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. - * @param message ImportSshPublicKeyRequest message or plain object to encode + * Encodes the specified UpdateSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. + * @param message UpdateSshPublicKeyRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSshPublicKeyRequest + * @returns UpdateSshPublicKeyRequest * @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.cloud.oslogin.v1.ImportSshPublicKeyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSshPublicKeyRequest + * @returns UpdateSshPublicKeyRequest * @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.cloud.oslogin.v1.ImportSshPublicKeyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Verifies an ImportSshPublicKeyRequest message. + * Verifies an UpdateSshPublicKeyRequest 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 an ImportSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSshPublicKeyRequest + * @returns UpdateSshPublicKeyRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Creates a plain object from an ImportSshPublicKeyRequest message. Also converts values to other types if specified. - * @param message ImportSshPublicKeyRequest + * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. + * @param message UpdateSshPublicKeyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.v1.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSshPublicKeyRequest to JSON. + * Converts this UpdateSshPublicKeyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } + } - /** Properties of an ImportSshPublicKeyResponse. */ - interface IImportSshPublicKeyResponse { + /** Namespace common. */ + namespace common { - /** ImportSshPublicKeyResponse loginProfile */ - loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); + /** OperatingSystemType enum. */ + enum OperatingSystemType { + OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0, + LINUX = 1, + WINDOWS = 2 } - /** Represents an ImportSshPublicKeyResponse. */ - class ImportSshPublicKeyResponse implements IImportSshPublicKeyResponse { + /** Properties of a PosixAccount. */ + interface IPosixAccount { + + /** PosixAccount primary */ + primary?: (boolean|null); + + /** PosixAccount username */ + username?: (string|null); + + /** PosixAccount uid */ + uid?: (number|Long|string|null); + + /** PosixAccount gid */ + gid?: (number|Long|string|null); + + /** PosixAccount homeDirectory */ + homeDirectory?: (string|null); + + /** PosixAccount shell */ + shell?: (string|null); + + /** PosixAccount gecos */ + gecos?: (string|null); + + /** PosixAccount systemId */ + systemId?: (string|null); + + /** PosixAccount accountId */ + accountId?: (string|null); + + /** PosixAccount operatingSystemType */ + operatingSystemType?: (google.cloud.oslogin.common.OperatingSystemType|keyof typeof google.cloud.oslogin.common.OperatingSystemType|null); + + /** PosixAccount name */ + name?: (string|null); + } + + /** Represents a PosixAccount. */ + class PosixAccount implements IPosixAccount { /** - * Constructs a new ImportSshPublicKeyResponse. + * Constructs a new PosixAccount. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse); + constructor(properties?: google.cloud.oslogin.common.IPosixAccount); - /** ImportSshPublicKeyResponse loginProfile. */ - public loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); + /** PosixAccount primary. */ + public primary: boolean; + + /** PosixAccount username. */ + public username: string; + + /** PosixAccount uid. */ + public uid: (number|Long|string); + + /** PosixAccount gid. */ + public gid: (number|Long|string); + + /** PosixAccount homeDirectory. */ + public homeDirectory: string; + + /** PosixAccount shell. */ + public shell: string; + + /** PosixAccount gecos. */ + public gecos: string; + + /** PosixAccount systemId. */ + public systemId: string; + + /** PosixAccount accountId. */ + public accountId: string; + + /** PosixAccount operatingSystemType. */ + public operatingSystemType: (google.cloud.oslogin.common.OperatingSystemType|keyof typeof google.cloud.oslogin.common.OperatingSystemType); + + /** PosixAccount name. */ + public name: string; /** - * Creates a new ImportSshPublicKeyResponse instance using the specified properties. + * Creates a new PosixAccount instance using the specified properties. * @param [properties] Properties to set - * @returns ImportSshPublicKeyResponse instance + * @returns PosixAccount instance */ - public static create(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; + public static create(properties?: google.cloud.oslogin.common.IPosixAccount): google.cloud.oslogin.common.PosixAccount; /** - * Encodes the specified ImportSshPublicKeyResponse message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. - * @param message ImportSshPublicKeyResponse message or plain object to encode + * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. + * @param message PosixAccount message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportSshPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. - * @param message ImportSshPublicKeyResponse message or plain object to encode + * Encodes the specified PosixAccount message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. + * @param message PosixAccount message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. + * Decodes a PosixAccount message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportSshPublicKeyResponse + * @returns PosixAccount * @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.cloud.oslogin.v1.ImportSshPublicKeyResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.common.PosixAccount; /** - * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer, length delimited. + * Decodes a PosixAccount message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportSshPublicKeyResponse + * @returns PosixAccount * @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.cloud.oslogin.v1.ImportSshPublicKeyResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.common.PosixAccount; /** - * Verifies an ImportSshPublicKeyResponse message. + * Verifies a PosixAccount 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 an ImportSshPublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PosixAccount message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportSshPublicKeyResponse + * @returns PosixAccount */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.PosixAccount; /** - * Creates a plain object from an ImportSshPublicKeyResponse message. Also converts values to other types if specified. - * @param message ImportSshPublicKeyResponse + * Creates a plain object from a PosixAccount message. Also converts values to other types if specified. + * @param message PosixAccount * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.common.PosixAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportSshPublicKeyResponse to JSON. + * Converts this PosixAccount to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateSshPublicKeyRequest. */ - interface IUpdateSshPublicKeyRequest { + /** Properties of a SshPublicKey. */ + interface ISshPublicKey { - /** UpdateSshPublicKeyRequest name */ - name?: (string|null); + /** SshPublicKey key */ + key?: (string|null); - /** UpdateSshPublicKeyRequest sshPublicKey */ - sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); + /** SshPublicKey expirationTimeUsec */ + expirationTimeUsec?: (number|Long|string|null); - /** UpdateSshPublicKeyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** SshPublicKey fingerprint */ + fingerprint?: (string|null); + + /** SshPublicKey name */ + name?: (string|null); } - /** Represents an UpdateSshPublicKeyRequest. */ - class UpdateSshPublicKeyRequest implements IUpdateSshPublicKeyRequest { + /** Represents a SshPublicKey. */ + class SshPublicKey implements ISshPublicKey { /** - * Constructs a new UpdateSshPublicKeyRequest. + * Constructs a new SshPublicKey. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest); + constructor(properties?: google.cloud.oslogin.common.ISshPublicKey); - /** UpdateSshPublicKeyRequest name. */ - public name: string; + /** SshPublicKey key. */ + public key: string; - /** UpdateSshPublicKeyRequest sshPublicKey. */ - public sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); + /** SshPublicKey expirationTimeUsec. */ + public expirationTimeUsec: (number|Long|string); - /** UpdateSshPublicKeyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SshPublicKey fingerprint. */ + public fingerprint: string; + + /** SshPublicKey name. */ + public name: string; /** - * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * Creates a new SshPublicKey instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSshPublicKeyRequest instance + * @returns SshPublicKey instance */ - public static create(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static create(properties?: google.cloud.oslogin.common.ISshPublicKey): google.cloud.oslogin.common.SshPublicKey; /** - * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. - * @param message UpdateSshPublicKeyRequest message or plain object to encode + * Encodes the specified SshPublicKey message. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. + * @param message SshPublicKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. - * @param message UpdateSshPublicKeyRequest message or plain object to encode + * Encodes the specified SshPublicKey message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. + * @param message SshPublicKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a SshPublicKey message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSshPublicKeyRequest + * @returns SshPublicKey * @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.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.common.SshPublicKey; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a SshPublicKey message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSshPublicKeyRequest + * @returns SshPublicKey * @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.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.common.SshPublicKey; /** - * Verifies an UpdateSshPublicKeyRequest message. + * Verifies a SshPublicKey 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 an UpdateSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SshPublicKey message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSshPublicKeyRequest + * @returns SshPublicKey */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.SshPublicKey; /** - * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. - * @param message UpdateSshPublicKeyRequest + * Creates a plain object from a SshPublicKey message. Also converts values to other types if specified. + * @param message SshPublicKey * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.oslogin.v1.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.common.SshPublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSshPublicKeyRequest to JSON. + * Converts this SshPublicKey to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -2123,259 +2123,23 @@ export namespace google { /** * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. * @param message UpdateSshPublicKeyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSshPublicKeyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this UpdateSshPublicKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } } + } + + /** Namespace api. */ + namespace api { /** Properties of a Http. */ interface IHttp { @@ -2715,6 +2479,242 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace protobuf. */ diff --git a/packages/google-cloud-oslogin/protos/protos.js b/packages/google-cloud-oslogin/protos/protos.js index 289b865a1262..2db38ac0885a 100644 --- a/packages/google-cloud-oslogin/protos/protos.js +++ b/packages/google-cloud-oslogin/protos/protos.js @@ -57,265 +57,383 @@ */ var oslogin = {}; - oslogin.common = (function() { + oslogin.v1 = (function() { /** - * Namespace common. + * Namespace v1. * @memberof google.cloud.oslogin * @namespace */ - var common = {}; + var v1 = {}; - /** - * OperatingSystemType enum. - * @name google.cloud.oslogin.common.OperatingSystemType - * @enum {number} - * @property {number} OPERATING_SYSTEM_TYPE_UNSPECIFIED=0 OPERATING_SYSTEM_TYPE_UNSPECIFIED value - * @property {number} LINUX=1 LINUX value - * @property {number} WINDOWS=2 WINDOWS value - */ - common.OperatingSystemType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATING_SYSTEM_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINUX"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - return values; - })(); + v1.OsLoginService = (function() { - common.PosixAccount = (function() { + /** + * Constructs a new OsLoginService service. + * @memberof google.cloud.oslogin.v1 + * @classdesc Represents an OsLoginService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function OsLoginService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (OsLoginService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsLoginService; /** - * Properties of a PosixAccount. - * @memberof google.cloud.oslogin.common - * @interface IPosixAccount - * @property {boolean|null} [primary] PosixAccount primary - * @property {string|null} [username] PosixAccount username - * @property {number|Long|null} [uid] PosixAccount uid - * @property {number|Long|null} [gid] PosixAccount gid - * @property {string|null} [homeDirectory] PosixAccount homeDirectory - * @property {string|null} [shell] PosixAccount shell - * @property {string|null} [gecos] PosixAccount gecos - * @property {string|null} [systemId] PosixAccount systemId - * @property {string|null} [accountId] PosixAccount accountId - * @property {google.cloud.oslogin.common.OperatingSystemType|null} [operatingSystemType] PosixAccount operatingSystemType - * @property {string|null} [name] PosixAccount name + * Creates new OsLoginService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.oslogin.v1.OsLoginService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {OsLoginService} RPC service. Useful where requests and/or responses are streamed. */ + OsLoginService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Constructs a new PosixAccount. - * @memberof google.cloud.oslogin.common - * @classdesc Represents a PosixAccount. - * @implements IPosixAccount - * @constructor - * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#deletePosixAccount}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef DeletePosixAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - function PosixAccount(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]]; - } /** - * PosixAccount primary. - * @member {boolean} primary - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls DeletePosixAccount. + * @function deletePosixAccount + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} request DeletePosixAccountRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.DeletePosixAccountCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - PosixAccount.prototype.primary = false; + Object.defineProperty(OsLoginService.prototype.deletePosixAccount = function deletePosixAccount(request, callback) { + return this.rpcCall(deletePosixAccount, $root.google.cloud.oslogin.v1.DeletePosixAccountRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePosixAccount" }); /** - * PosixAccount username. - * @member {string} username - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls DeletePosixAccount. + * @function deletePosixAccount + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} request DeletePosixAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PosixAccount.prototype.username = ""; /** - * PosixAccount uid. - * @member {number|Long} uid - * @memberof google.cloud.oslogin.common.PosixAccount - * @instance + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#deleteSshPublicKey}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef DeleteSshPublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - PosixAccount.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * PosixAccount gid. - * @member {number|Long} gid - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls DeleteSshPublicKey. + * @function deleteSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} request DeleteSshPublicKeyRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.DeleteSshPublicKeyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - PosixAccount.prototype.gid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(OsLoginService.prototype.deleteSshPublicKey = function deleteSshPublicKey(request, callback) { + return this.rpcCall(deleteSshPublicKey, $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSshPublicKey" }); /** - * PosixAccount homeDirectory. - * @member {string} homeDirectory - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls DeleteSshPublicKey. + * @function deleteSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} request DeleteSshPublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PosixAccount.prototype.homeDirectory = ""; /** - * PosixAccount shell. - * @member {string} shell - * @memberof google.cloud.oslogin.common.PosixAccount + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#getLoginProfile}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef GetLoginProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.oslogin.v1.LoginProfile} [response] LoginProfile + */ + + /** + * Calls GetLoginProfile. + * @function getLoginProfile + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} request GetLoginProfileRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.GetLoginProfileCallback} callback Node-style callback called with the error, if any, and LoginProfile + * @returns {undefined} + * @variation 1 */ - PosixAccount.prototype.shell = ""; + Object.defineProperty(OsLoginService.prototype.getLoginProfile = function getLoginProfile(request, callback) { + return this.rpcCall(getLoginProfile, $root.google.cloud.oslogin.v1.GetLoginProfileRequest, $root.google.cloud.oslogin.v1.LoginProfile, request, callback); + }, "name", { value: "GetLoginProfile" }); /** - * PosixAccount gecos. - * @member {string} gecos - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls GetLoginProfile. + * @function getLoginProfile + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} request GetLoginProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PosixAccount.prototype.gecos = ""; /** - * PosixAccount systemId. - * @member {string} systemId - * @memberof google.cloud.oslogin.common.PosixAccount + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#getSshPublicKey}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef GetSshPublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.oslogin.common.SshPublicKey} [response] SshPublicKey + */ + + /** + * Calls GetSshPublicKey. + * @function getSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} request GetSshPublicKeyRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.GetSshPublicKeyCallback} callback Node-style callback called with the error, if any, and SshPublicKey + * @returns {undefined} + * @variation 1 */ - PosixAccount.prototype.systemId = ""; + Object.defineProperty(OsLoginService.prototype.getSshPublicKey = function getSshPublicKey(request, callback) { + return this.rpcCall(getSshPublicKey, $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest, $root.google.cloud.oslogin.common.SshPublicKey, request, callback); + }, "name", { value: "GetSshPublicKey" }); /** - * PosixAccount accountId. - * @member {string} accountId - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls GetSshPublicKey. + * @function getSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} request GetSshPublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PosixAccount.prototype.accountId = ""; /** - * PosixAccount operatingSystemType. - * @member {google.cloud.oslogin.common.OperatingSystemType} operatingSystemType - * @memberof google.cloud.oslogin.common.PosixAccount + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#importSshPublicKey}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef ImportSshPublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} [response] ImportSshPublicKeyResponse + */ + + /** + * Calls ImportSshPublicKey. + * @function importSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} request ImportSshPublicKeyRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKeyCallback} callback Node-style callback called with the error, if any, and ImportSshPublicKeyResponse + * @returns {undefined} + * @variation 1 */ - PosixAccount.prototype.operatingSystemType = 0; + Object.defineProperty(OsLoginService.prototype.importSshPublicKey = function importSshPublicKey(request, callback) { + return this.rpcCall(importSshPublicKey, $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest, $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse, request, callback); + }, "name", { value: "ImportSshPublicKey" }); /** - * PosixAccount name. - * @member {string} name - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls ImportSshPublicKey. + * @function importSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} request ImportSshPublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PosixAccount.prototype.name = ""; /** - * Creates a new PosixAccount instance using the specified properties. - * @function create - * @memberof google.cloud.oslogin.common.PosixAccount - * @static - * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount instance + * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#updateSshPublicKey}. + * @memberof google.cloud.oslogin.v1.OsLoginService + * @typedef UpdateSshPublicKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.oslogin.common.SshPublicKey} [response] SshPublicKey */ - PosixAccount.create = function create(properties) { - return new PosixAccount(properties); - }; /** - * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. - * @function encode - * @memberof google.cloud.oslogin.common.PosixAccount + * Calls UpdateSshPublicKey. + * @function updateSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService + * @instance + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} request UpdateSshPublicKeyRequest message or plain object + * @param {google.cloud.oslogin.v1.OsLoginService.UpdateSshPublicKeyCallback} callback Node-style callback called with the error, if any, and SshPublicKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(OsLoginService.prototype.updateSshPublicKey = function updateSshPublicKey(request, callback) { + return this.rpcCall(updateSshPublicKey, $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest, $root.google.cloud.oslogin.common.SshPublicKey, request, callback); + }, "name", { value: "UpdateSshPublicKey" }); + + /** + * Calls UpdateSshPublicKey. + * @function updateSshPublicKey + * @memberof google.cloud.oslogin.v1.OsLoginService + * @instance + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} request UpdateSshPublicKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return OsLoginService; + })(); + + v1.LoginProfile = (function() { + + /** + * Properties of a LoginProfile. + * @memberof google.cloud.oslogin.v1 + * @interface ILoginProfile + * @property {string|null} [name] LoginProfile name + * @property {Array.|null} [posixAccounts] LoginProfile posixAccounts + * @property {Object.|null} [sshPublicKeys] LoginProfile sshPublicKeys + */ + + /** + * Constructs a new LoginProfile. + * @memberof google.cloud.oslogin.v1 + * @classdesc Represents a LoginProfile. + * @implements ILoginProfile + * @constructor + * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set + */ + function LoginProfile(properties) { + this.posixAccounts = []; + this.sshPublicKeys = {}; + 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]]; + } + + /** + * LoginProfile name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.LoginProfile + * @instance + */ + LoginProfile.prototype.name = ""; + + /** + * LoginProfile posixAccounts. + * @member {Array.} posixAccounts + * @memberof google.cloud.oslogin.v1.LoginProfile + * @instance + */ + LoginProfile.prototype.posixAccounts = $util.emptyArray; + + /** + * LoginProfile sshPublicKeys. + * @member {Object.} sshPublicKeys + * @memberof google.cloud.oslogin.v1.LoginProfile + * @instance + */ + LoginProfile.prototype.sshPublicKeys = $util.emptyObject; + + /** + * Creates a new LoginProfile instance using the specified properties. + * @function create + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount message or plain object to encode + * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile instance + */ + LoginProfile.create = function create(properties) { + return new LoginProfile(properties); + }; + + /** + * Encodes the specified LoginProfile message. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.oslogin.v1.LoginProfile + * @static + * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PosixAccount.encode = function encode(message, writer) { + LoginProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.primary); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.uid); - if (message.gid != null && Object.hasOwnProperty.call(message, "gid")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.gid); - if (message.homeDirectory != null && Object.hasOwnProperty.call(message, "homeDirectory")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.homeDirectory); - if (message.shell != null && Object.hasOwnProperty.call(message, "shell")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.shell); - if (message.gecos != null && Object.hasOwnProperty.call(message, "gecos")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.gecos); - if (message.systemId != null && Object.hasOwnProperty.call(message, "systemId")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.systemId); - if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.accountId); - if (message.operatingSystemType != null && Object.hasOwnProperty.call(message, "operatingSystemType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.operatingSystemType); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.posixAccounts != null && message.posixAccounts.length) + for (var i = 0; i < message.posixAccounts.length; ++i) + $root.google.cloud.oslogin.common.PosixAccount.encode(message.posixAccounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sshPublicKeys != null && Object.hasOwnProperty.call(message, "sshPublicKeys")) + for (var keys = Object.keys(message.sshPublicKeys), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.oslogin.common.SshPublicKey.encode(message.sshPublicKeys[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified PosixAccount message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. + * Encodes the specified LoginProfile message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount message or plain object to encode + * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PosixAccount.encodeDelimited = function encodeDelimited(message, writer) { + LoginProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PosixAccount message from the specified reader or buffer. + * Decodes a LoginProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PosixAccount.decode = function decode(reader, length) { + LoginProfile.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.cloud.oslogin.common.PosixAccount(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.LoginProfile(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.primary = reader.bool(); + message.name = reader.string(); break; case 2: - message.username = reader.string(); + if (!(message.posixAccounts && message.posixAccounts.length)) + message.posixAccounts = []; + message.posixAccounts.push($root.google.cloud.oslogin.common.PosixAccount.decode(reader, reader.uint32())); break; case 3: - message.uid = reader.int64(); - break; - case 4: - message.gid = reader.int64(); - break; - case 5: - message.homeDirectory = reader.string(); - break; - case 6: - message.shell = reader.string(); - break; - case 7: - message.gecos = reader.string(); - break; - case 8: - message.systemId = reader.string(); - break; - case 9: - message.accountId = reader.string(); - break; - case 10: - message.operatingSystemType = reader.int32(); - break; - case 11: - message.name = reader.string(); + reader.skip().pos++; + if (message.sshPublicKeys === $util.emptyObject) + message.sshPublicKeys = {}; + key = reader.string(); + reader.pos++; + message.sshPublicKeys[key] = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -326,237 +444,161 @@ }; /** - * Decodes a PosixAccount message from the specified reader or buffer, length delimited. + * Decodes a LoginProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PosixAccount.decodeDelimited = function decodeDelimited(reader) { + LoginProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PosixAccount message. + * Verifies a LoginProfile message. * @function verify - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PosixAccount.verify = function verify(message) { + LoginProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) - if (typeof message.primary !== "boolean") - return "primary: boolean expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isInteger(message.uid) && !(message.uid && $util.isInteger(message.uid.low) && $util.isInteger(message.uid.high))) - return "uid: integer|Long expected"; - if (message.gid != null && message.hasOwnProperty("gid")) - if (!$util.isInteger(message.gid) && !(message.gid && $util.isInteger(message.gid.low) && $util.isInteger(message.gid.high))) - return "gid: integer|Long expected"; - if (message.homeDirectory != null && message.hasOwnProperty("homeDirectory")) - if (!$util.isString(message.homeDirectory)) - return "homeDirectory: string expected"; - if (message.shell != null && message.hasOwnProperty("shell")) - if (!$util.isString(message.shell)) - return "shell: string expected"; - if (message.gecos != null && message.hasOwnProperty("gecos")) - if (!$util.isString(message.gecos)) - return "gecos: string expected"; - if (message.systemId != null && message.hasOwnProperty("systemId")) - if (!$util.isString(message.systemId)) - return "systemId: string expected"; - if (message.accountId != null && message.hasOwnProperty("accountId")) - if (!$util.isString(message.accountId)) - return "accountId: string expected"; - if (message.operatingSystemType != null && message.hasOwnProperty("operatingSystemType")) - switch (message.operatingSystemType) { - default: - return "operatingSystemType: enum value expected"; - case 0: - case 1: - case 2: - break; - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.posixAccounts != null && message.hasOwnProperty("posixAccounts")) { + if (!Array.isArray(message.posixAccounts)) + return "posixAccounts: array expected"; + for (var i = 0; i < message.posixAccounts.length; ++i) { + var error = $root.google.cloud.oslogin.common.PosixAccount.verify(message.posixAccounts[i]); + if (error) + return "posixAccounts." + error; + } + } + if (message.sshPublicKeys != null && message.hasOwnProperty("sshPublicKeys")) { + if (!$util.isObject(message.sshPublicKeys)) + return "sshPublicKeys: object expected"; + var key = Object.keys(message.sshPublicKeys); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.oslogin.common.SshPublicKey.verify(message.sshPublicKeys[key[i]]); + if (error) + return "sshPublicKeys." + error; + } + } return null; }; /** - * Creates a PosixAccount message from a plain object. Also converts values to their respective internal types. + * Creates a LoginProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile */ - PosixAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.common.PosixAccount) + LoginProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.LoginProfile) return object; - var message = new $root.google.cloud.oslogin.common.PosixAccount(); - if (object.primary != null) - message.primary = Boolean(object.primary); - if (object.username != null) - message.username = String(object.username); - if (object.uid != null) - if ($util.Long) - (message.uid = $util.Long.fromValue(object.uid)).unsigned = false; - else if (typeof object.uid === "string") - message.uid = parseInt(object.uid, 10); - else if (typeof object.uid === "number") - message.uid = object.uid; - else if (typeof object.uid === "object") - message.uid = new $util.LongBits(object.uid.low >>> 0, object.uid.high >>> 0).toNumber(); - if (object.gid != null) - if ($util.Long) - (message.gid = $util.Long.fromValue(object.gid)).unsigned = false; - else if (typeof object.gid === "string") - message.gid = parseInt(object.gid, 10); - else if (typeof object.gid === "number") - message.gid = object.gid; - else if (typeof object.gid === "object") - message.gid = new $util.LongBits(object.gid.low >>> 0, object.gid.high >>> 0).toNumber(); - if (object.homeDirectory != null) - message.homeDirectory = String(object.homeDirectory); - if (object.shell != null) - message.shell = String(object.shell); - if (object.gecos != null) - message.gecos = String(object.gecos); - if (object.systemId != null) - message.systemId = String(object.systemId); - if (object.accountId != null) - message.accountId = String(object.accountId); - switch (object.operatingSystemType) { - case "OPERATING_SYSTEM_TYPE_UNSPECIFIED": - case 0: - message.operatingSystemType = 0; - break; - case "LINUX": - case 1: - message.operatingSystemType = 1; - break; - case "WINDOWS": - case 2: - message.operatingSystemType = 2; - break; - } + var message = new $root.google.cloud.oslogin.v1.LoginProfile(); if (object.name != null) message.name = String(object.name); + if (object.posixAccounts) { + if (!Array.isArray(object.posixAccounts)) + throw TypeError(".google.cloud.oslogin.v1.LoginProfile.posixAccounts: array expected"); + message.posixAccounts = []; + for (var i = 0; i < object.posixAccounts.length; ++i) { + if (typeof object.posixAccounts[i] !== "object") + throw TypeError(".google.cloud.oslogin.v1.LoginProfile.posixAccounts: object expected"); + message.posixAccounts[i] = $root.google.cloud.oslogin.common.PosixAccount.fromObject(object.posixAccounts[i]); + } + } + if (object.sshPublicKeys) { + if (typeof object.sshPublicKeys !== "object") + throw TypeError(".google.cloud.oslogin.v1.LoginProfile.sshPublicKeys: object expected"); + message.sshPublicKeys = {}; + for (var keys = Object.keys(object.sshPublicKeys), i = 0; i < keys.length; ++i) { + if (typeof object.sshPublicKeys[keys[i]] !== "object") + throw TypeError(".google.cloud.oslogin.v1.LoginProfile.sshPublicKeys: object expected"); + message.sshPublicKeys[keys[i]] = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKeys[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a PosixAccount message. Also converts values to other types if specified. + * Creates a plain object from a LoginProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.common.PosixAccount} message PosixAccount + * @param {google.cloud.oslogin.v1.LoginProfile} message LoginProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PosixAccount.toObject = function toObject(message, options) { + LoginProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.primary = false; - object.username = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.uid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.uid = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gid = options.longs === String ? "0" : 0; - object.homeDirectory = ""; - object.shell = ""; - object.gecos = ""; - object.systemId = ""; - object.accountId = ""; - object.operatingSystemType = options.enums === String ? "OPERATING_SYSTEM_TYPE_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.posixAccounts = []; + if (options.objects || options.defaults) + object.sshPublicKeys = {}; + if (options.defaults) object.name = ""; - } - if (message.primary != null && message.hasOwnProperty("primary")) - object.primary = message.primary; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.uid != null && message.hasOwnProperty("uid")) - if (typeof message.uid === "number") - object.uid = options.longs === String ? String(message.uid) : message.uid; - else - object.uid = options.longs === String ? $util.Long.prototype.toString.call(message.uid) : options.longs === Number ? new $util.LongBits(message.uid.low >>> 0, message.uid.high >>> 0).toNumber() : message.uid; - if (message.gid != null && message.hasOwnProperty("gid")) - if (typeof message.gid === "number") - object.gid = options.longs === String ? String(message.gid) : message.gid; - else - object.gid = options.longs === String ? $util.Long.prototype.toString.call(message.gid) : options.longs === Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber() : message.gid; - if (message.homeDirectory != null && message.hasOwnProperty("homeDirectory")) - object.homeDirectory = message.homeDirectory; - if (message.shell != null && message.hasOwnProperty("shell")) - object.shell = message.shell; - if (message.gecos != null && message.hasOwnProperty("gecos")) - object.gecos = message.gecos; - if (message.systemId != null && message.hasOwnProperty("systemId")) - object.systemId = message.systemId; - if (message.accountId != null && message.hasOwnProperty("accountId")) - object.accountId = message.accountId; - if (message.operatingSystemType != null && message.hasOwnProperty("operatingSystemType")) - object.operatingSystemType = options.enums === String ? $root.google.cloud.oslogin.common.OperatingSystemType[message.operatingSystemType] : message.operatingSystemType; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.posixAccounts && message.posixAccounts.length) { + object.posixAccounts = []; + for (var j = 0; j < message.posixAccounts.length; ++j) + object.posixAccounts[j] = $root.google.cloud.oslogin.common.PosixAccount.toObject(message.posixAccounts[j], options); + } + var keys2; + if (message.sshPublicKeys && (keys2 = Object.keys(message.sshPublicKeys)).length) { + object.sshPublicKeys = {}; + for (var j = 0; j < keys2.length; ++j) + object.sshPublicKeys[keys2[j]] = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKeys[keys2[j]], options); + } return object; }; /** - * Converts this PosixAccount to JSON. + * Converts this LoginProfile to JSON. * @function toJSON - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.LoginProfile * @instance * @returns {Object.} JSON object */ - PosixAccount.prototype.toJSON = function toJSON() { + LoginProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PosixAccount; + return LoginProfile; })(); - common.SshPublicKey = (function() { + v1.DeletePosixAccountRequest = (function() { /** - * Properties of a SshPublicKey. - * @memberof google.cloud.oslogin.common - * @interface ISshPublicKey - * @property {string|null} [key] SshPublicKey key - * @property {number|Long|null} [expirationTimeUsec] SshPublicKey expirationTimeUsec - * @property {string|null} [fingerprint] SshPublicKey fingerprint - * @property {string|null} [name] SshPublicKey name + * Properties of a DeletePosixAccountRequest. + * @memberof google.cloud.oslogin.v1 + * @interface IDeletePosixAccountRequest + * @property {string|null} [name] DeletePosixAccountRequest name */ /** - * Constructs a new SshPublicKey. - * @memberof google.cloud.oslogin.common - * @classdesc Represents a SshPublicKey. - * @implements ISshPublicKey + * Constructs a new DeletePosixAccountRequest. + * @memberof google.cloud.oslogin.v1 + * @classdesc Represents a DeletePosixAccountRequest. + * @implements IDeletePosixAccountRequest * @constructor - * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set */ - function SshPublicKey(properties) { + function DeletePosixAccountRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -564,114 +606,75 @@ } /** - * SshPublicKey key. - * @member {string} key - * @memberof google.cloud.oslogin.common.SshPublicKey - * @instance - */ - SshPublicKey.prototype.key = ""; - - /** - * SshPublicKey expirationTimeUsec. - * @member {number|Long} expirationTimeUsec - * @memberof google.cloud.oslogin.common.SshPublicKey - * @instance - */ - SshPublicKey.prototype.expirationTimeUsec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SshPublicKey fingerprint. - * @member {string} fingerprint - * @memberof google.cloud.oslogin.common.SshPublicKey - * @instance - */ - SshPublicKey.prototype.fingerprint = ""; - - /** - * SshPublicKey name. + * DeletePosixAccountRequest name. * @member {string} name - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @instance */ - SshPublicKey.prototype.name = ""; + DeletePosixAccountRequest.prototype.name = ""; /** - * Creates a new SshPublicKey instance using the specified properties. + * Creates a new DeletePosixAccountRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey instance + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest instance */ - SshPublicKey.create = function create(properties) { - return new SshPublicKey(properties); + DeletePosixAccountRequest.create = function create(properties) { + return new DeletePosixAccountRequest(properties); }; /** - * Encodes the specified SshPublicKey message. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. + * Encodes the specified DeletePosixAccountRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey message or plain object to encode + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SshPublicKey.encode = function encode(message, writer) { + DeletePosixAccountRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.expirationTimeUsec != null && Object.hasOwnProperty.call(message, "expirationTimeUsec")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expirationTimeUsec); - if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fingerprint); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified SshPublicKey message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. + * Encodes the specified DeletePosixAccountRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey message or plain object to encode + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SshPublicKey.encodeDelimited = function encodeDelimited(message, writer) { + DeletePosixAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SshPublicKey message from the specified reader or buffer. + * Decodes a DeletePosixAccountRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SshPublicKey.decode = function decode(reader, length) { + DeletePosixAccountRequest.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.cloud.oslogin.common.SshPublicKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.DeletePosixAccountRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.key = reader.string(); - break; - case 2: - message.expirationTimeUsec = reader.int64(); - break; - case 3: - message.fingerprint = reader.string(); - break; - case 4: - message.name = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -682,41 +685,32 @@ }; /** - * Decodes a SshPublicKey message from the specified reader or buffer, length delimited. + * Decodes a DeletePosixAccountRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SshPublicKey.decodeDelimited = function decodeDelimited(reader) { + DeletePosixAccountRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SshPublicKey message. + * Verifies a DeletePosixAccountRequest message. * @function verify - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SshPublicKey.verify = function verify(message) { + DeletePosixAccountRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.expirationTimeUsec != null && message.hasOwnProperty("expirationTimeUsec")) - if (!$util.isInteger(message.expirationTimeUsec) && !(message.expirationTimeUsec && $util.isInteger(message.expirationTimeUsec.low) && $util.isInteger(message.expirationTimeUsec.high))) - return "expirationTimeUsec: integer|Long expected"; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - if (!$util.isString(message.fingerprint)) - return "fingerprint: string expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -724,467 +718,151 @@ }; /** - * Creates a SshPublicKey message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePosixAccountRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest */ - SshPublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.common.SshPublicKey) + DeletePosixAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.DeletePosixAccountRequest) return object; - var message = new $root.google.cloud.oslogin.common.SshPublicKey(); - if (object.key != null) - message.key = String(object.key); - if (object.expirationTimeUsec != null) - if ($util.Long) - (message.expirationTimeUsec = $util.Long.fromValue(object.expirationTimeUsec)).unsigned = false; - else if (typeof object.expirationTimeUsec === "string") - message.expirationTimeUsec = parseInt(object.expirationTimeUsec, 10); - else if (typeof object.expirationTimeUsec === "number") - message.expirationTimeUsec = object.expirationTimeUsec; - else if (typeof object.expirationTimeUsec === "object") - message.expirationTimeUsec = new $util.LongBits(object.expirationTimeUsec.low >>> 0, object.expirationTimeUsec.high >>> 0).toNumber(); - if (object.fingerprint != null) - message.fingerprint = String(object.fingerprint); + var message = new $root.google.cloud.oslogin.v1.DeletePosixAccountRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a SshPublicKey message. Also converts values to other types if specified. + * Creates a plain object from a DeletePosixAccountRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.common.SshPublicKey} message SshPublicKey + * @param {google.cloud.oslogin.v1.DeletePosixAccountRequest} message DeletePosixAccountRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SshPublicKey.toObject = function toObject(message, options) { + DeletePosixAccountRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.expirationTimeUsec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expirationTimeUsec = options.longs === String ? "0" : 0; - object.fingerprint = ""; + if (options.defaults) object.name = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.expirationTimeUsec != null && message.hasOwnProperty("expirationTimeUsec")) - if (typeof message.expirationTimeUsec === "number") - object.expirationTimeUsec = options.longs === String ? String(message.expirationTimeUsec) : message.expirationTimeUsec; - else - object.expirationTimeUsec = options.longs === String ? $util.Long.prototype.toString.call(message.expirationTimeUsec) : options.longs === Number ? new $util.LongBits(message.expirationTimeUsec.low >>> 0, message.expirationTimeUsec.high >>> 0).toNumber() : message.expirationTimeUsec; - if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) - object.fingerprint = message.fingerprint; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** - * Converts this SshPublicKey to JSON. + * Converts this DeletePosixAccountRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @instance * @returns {Object.} JSON object */ - SshPublicKey.prototype.toJSON = function toJSON() { + DeletePosixAccountRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SshPublicKey; - })(); - - return common; - })(); - - oslogin.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.oslogin - * @namespace - */ - var v1 = {}; - - v1.OsLoginService = (function() { - - /** - * Constructs a new OsLoginService service. - * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an OsLoginService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function OsLoginService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (OsLoginService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsLoginService; - - /** - * Creates new OsLoginService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.oslogin.v1.OsLoginService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {OsLoginService} RPC service. Useful where requests and/or responses are streamed. - */ - OsLoginService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#deletePosixAccount}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef DeletePosixAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePosixAccount. - * @function deletePosixAccount - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} request DeletePosixAccountRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.DeletePosixAccountCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.deletePosixAccount = function deletePosixAccount(request, callback) { - return this.rpcCall(deletePosixAccount, $root.google.cloud.oslogin.v1.DeletePosixAccountRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePosixAccount" }); - - /** - * Calls DeletePosixAccount. - * @function deletePosixAccount - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} request DeletePosixAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#deleteSshPublicKey}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef DeleteSshPublicKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSshPublicKey. - * @function deleteSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} request DeleteSshPublicKeyRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.DeleteSshPublicKeyCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.deleteSshPublicKey = function deleteSshPublicKey(request, callback) { - return this.rpcCall(deleteSshPublicKey, $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSshPublicKey" }); - - /** - * Calls DeleteSshPublicKey. - * @function deleteSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} request DeleteSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#getLoginProfile}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef GetLoginProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.oslogin.v1.LoginProfile} [response] LoginProfile - */ - - /** - * Calls GetLoginProfile. - * @function getLoginProfile - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} request GetLoginProfileRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.GetLoginProfileCallback} callback Node-style callback called with the error, if any, and LoginProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.getLoginProfile = function getLoginProfile(request, callback) { - return this.rpcCall(getLoginProfile, $root.google.cloud.oslogin.v1.GetLoginProfileRequest, $root.google.cloud.oslogin.v1.LoginProfile, request, callback); - }, "name", { value: "GetLoginProfile" }); - - /** - * Calls GetLoginProfile. - * @function getLoginProfile - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} request GetLoginProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#getSshPublicKey}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef GetSshPublicKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.oslogin.common.SshPublicKey} [response] SshPublicKey - */ - - /** - * Calls GetSshPublicKey. - * @function getSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} request GetSshPublicKeyRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.GetSshPublicKeyCallback} callback Node-style callback called with the error, if any, and SshPublicKey - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.getSshPublicKey = function getSshPublicKey(request, callback) { - return this.rpcCall(getSshPublicKey, $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest, $root.google.cloud.oslogin.common.SshPublicKey, request, callback); - }, "name", { value: "GetSshPublicKey" }); - - /** - * Calls GetSshPublicKey. - * @function getSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} request GetSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#importSshPublicKey}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef ImportSshPublicKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} [response] ImportSshPublicKeyResponse - */ - - /** - * Calls ImportSshPublicKey. - * @function importSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} request ImportSshPublicKeyRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.ImportSshPublicKeyCallback} callback Node-style callback called with the error, if any, and ImportSshPublicKeyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.importSshPublicKey = function importSshPublicKey(request, callback) { - return this.rpcCall(importSshPublicKey, $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest, $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse, request, callback); - }, "name", { value: "ImportSshPublicKey" }); - - /** - * Calls ImportSshPublicKey. - * @function importSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} request ImportSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.oslogin.v1.OsLoginService#updateSshPublicKey}. - * @memberof google.cloud.oslogin.v1.OsLoginService - * @typedef UpdateSshPublicKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.oslogin.common.SshPublicKey} [response] SshPublicKey - */ - - /** - * Calls UpdateSshPublicKey. - * @function updateSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} request UpdateSshPublicKeyRequest message or plain object - * @param {google.cloud.oslogin.v1.OsLoginService.UpdateSshPublicKeyCallback} callback Node-style callback called with the error, if any, and SshPublicKey - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(OsLoginService.prototype.updateSshPublicKey = function updateSshPublicKey(request, callback) { - return this.rpcCall(updateSshPublicKey, $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest, $root.google.cloud.oslogin.common.SshPublicKey, request, callback); - }, "name", { value: "UpdateSshPublicKey" }); - - /** - * Calls UpdateSshPublicKey. - * @function updateSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService - * @instance - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} request UpdateSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return OsLoginService; + return DeletePosixAccountRequest; })(); - v1.LoginProfile = (function() { + v1.DeleteSshPublicKeyRequest = (function() { /** - * Properties of a LoginProfile. + * Properties of a DeleteSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @interface ILoginProfile - * @property {string|null} [name] LoginProfile name - * @property {Array.|null} [posixAccounts] LoginProfile posixAccounts - * @property {Object.|null} [sshPublicKeys] LoginProfile sshPublicKeys + * @interface IDeleteSshPublicKeyRequest + * @property {string|null} [name] DeleteSshPublicKeyRequest name */ /** - * Constructs a new LoginProfile. + * Constructs a new DeleteSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a LoginProfile. - * @implements ILoginProfile - * @constructor - * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set - */ - function LoginProfile(properties) { - this.posixAccounts = []; - this.sshPublicKeys = {}; - 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]]; - } - - /** - * LoginProfile name. - * @member {string} name - * @memberof google.cloud.oslogin.v1.LoginProfile - * @instance - */ - LoginProfile.prototype.name = ""; - - /** - * LoginProfile posixAccounts. - * @member {Array.} posixAccounts - * @memberof google.cloud.oslogin.v1.LoginProfile - * @instance + * @classdesc Represents a DeleteSshPublicKeyRequest. + * @implements IDeleteSshPublicKeyRequest + * @constructor + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set */ - LoginProfile.prototype.posixAccounts = $util.emptyArray; + function DeleteSshPublicKeyRequest(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]]; + } /** - * LoginProfile sshPublicKeys. - * @member {Object.} sshPublicKeys - * @memberof google.cloud.oslogin.v1.LoginProfile + * DeleteSshPublicKeyRequest name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @instance */ - LoginProfile.prototype.sshPublicKeys = $util.emptyObject; + DeleteSshPublicKeyRequest.prototype.name = ""; /** - * Creates a new LoginProfile instance using the specified properties. + * Creates a new DeleteSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile instance + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest instance */ - LoginProfile.create = function create(properties) { - return new LoginProfile(properties); + DeleteSshPublicKeyRequest.create = function create(properties) { + return new DeleteSshPublicKeyRequest(properties); }; /** - * Encodes the specified LoginProfile message. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.verify|verify} messages. + * Encodes the specified DeleteSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile message or plain object to encode + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoginProfile.encode = function encode(message, writer) { + DeleteSshPublicKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.posixAccounts != null && message.posixAccounts.length) - for (var i = 0; i < message.posixAccounts.length; ++i) - $root.google.cloud.oslogin.common.PosixAccount.encode(message.posixAccounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sshPublicKeys != null && Object.hasOwnProperty.call(message, "sshPublicKeys")) - for (var keys = Object.keys(message.sshPublicKeys), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.oslogin.common.SshPublicKey.encode(message.sshPublicKeys[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } return writer; }; /** - * Encodes the specified LoginProfile message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.verify|verify} messages. + * Encodes the specified DeleteSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile message or plain object to encode + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoginProfile.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoginProfile message from the specified reader or buffer. + * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoginProfile.decode = function decode(reader, length) { + DeleteSshPublicKeyRequest.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.cloud.oslogin.v1.LoginProfile(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; - case 2: - if (!(message.posixAccounts && message.posixAccounts.length)) - message.posixAccounts = []; - message.posixAccounts.push($root.google.cloud.oslogin.common.PosixAccount.decode(reader, reader.uint32())); - break; - case 3: - reader.skip().pos++; - if (message.sshPublicKeys === $util.emptyObject) - message.sshPublicKeys = {}; - key = reader.string(); - reader.pos++; - message.sshPublicKeys[key] = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -1194,161 +872,109 @@ }; /** - * Decodes a LoginProfile message from the specified reader or buffer, length delimited. + * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoginProfile.decodeDelimited = function decodeDelimited(reader) { + DeleteSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoginProfile message. + * Verifies a DeleteSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoginProfile.verify = function verify(message) { + DeleteSshPublicKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.posixAccounts != null && message.hasOwnProperty("posixAccounts")) { - if (!Array.isArray(message.posixAccounts)) - return "posixAccounts: array expected"; - for (var i = 0; i < message.posixAccounts.length; ++i) { - var error = $root.google.cloud.oslogin.common.PosixAccount.verify(message.posixAccounts[i]); - if (error) - return "posixAccounts." + error; - } - } - if (message.sshPublicKeys != null && message.hasOwnProperty("sshPublicKeys")) { - if (!$util.isObject(message.sshPublicKeys)) - return "sshPublicKeys: object expected"; - var key = Object.keys(message.sshPublicKeys); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.oslogin.common.SshPublicKey.verify(message.sshPublicKeys[key[i]]); - if (error) - return "sshPublicKeys." + error; - } - } return null; }; /** - * Creates a LoginProfile message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest */ - LoginProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.LoginProfile) + DeleteSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest) return object; - var message = new $root.google.cloud.oslogin.v1.LoginProfile(); + var message = new $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); if (object.name != null) message.name = String(object.name); - if (object.posixAccounts) { - if (!Array.isArray(object.posixAccounts)) - throw TypeError(".google.cloud.oslogin.v1.LoginProfile.posixAccounts: array expected"); - message.posixAccounts = []; - for (var i = 0; i < object.posixAccounts.length; ++i) { - if (typeof object.posixAccounts[i] !== "object") - throw TypeError(".google.cloud.oslogin.v1.LoginProfile.posixAccounts: object expected"); - message.posixAccounts[i] = $root.google.cloud.oslogin.common.PosixAccount.fromObject(object.posixAccounts[i]); - } - } - if (object.sshPublicKeys) { - if (typeof object.sshPublicKeys !== "object") - throw TypeError(".google.cloud.oslogin.v1.LoginProfile.sshPublicKeys: object expected"); - message.sshPublicKeys = {}; - for (var keys = Object.keys(object.sshPublicKeys), i = 0; i < keys.length; ++i) { - if (typeof object.sshPublicKeys[keys[i]] !== "object") - throw TypeError(".google.cloud.oslogin.v1.LoginProfile.sshPublicKeys: object expected"); - message.sshPublicKeys[keys[i]] = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKeys[keys[i]]); - } - } return message; }; /** - * Creates a plain object from a LoginProfile message. Also converts values to other types if specified. + * Creates a plain object from a DeleteSshPublicKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.LoginProfile} message LoginProfile + * @param {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoginProfile.toObject = function toObject(message, options) { + DeleteSshPublicKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.posixAccounts = []; - if (options.objects || options.defaults) - object.sshPublicKeys = {}; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.posixAccounts && message.posixAccounts.length) { - object.posixAccounts = []; - for (var j = 0; j < message.posixAccounts.length; ++j) - object.posixAccounts[j] = $root.google.cloud.oslogin.common.PosixAccount.toObject(message.posixAccounts[j], options); - } - var keys2; - if (message.sshPublicKeys && (keys2 = Object.keys(message.sshPublicKeys)).length) { - object.sshPublicKeys = {}; - for (var j = 0; j < keys2.length; ++j) - object.sshPublicKeys[keys2[j]] = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKeys[keys2[j]], options); - } return object; }; /** - * Converts this LoginProfile to JSON. + * Converts this DeleteSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - LoginProfile.prototype.toJSON = function toJSON() { + DeleteSshPublicKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LoginProfile; + return DeleteSshPublicKeyRequest; })(); - v1.DeletePosixAccountRequest = (function() { + v1.GetLoginProfileRequest = (function() { /** - * Properties of a DeletePosixAccountRequest. + * Properties of a GetLoginProfileRequest. * @memberof google.cloud.oslogin.v1 - * @interface IDeletePosixAccountRequest - * @property {string|null} [name] DeletePosixAccountRequest name + * @interface IGetLoginProfileRequest + * @property {string|null} [name] GetLoginProfileRequest name + * @property {string|null} [projectId] GetLoginProfileRequest projectId + * @property {string|null} [systemId] GetLoginProfileRequest systemId */ /** - * Constructs a new DeletePosixAccountRequest. + * Constructs a new GetLoginProfileRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a DeletePosixAccountRequest. - * @implements IDeletePosixAccountRequest + * @classdesc Represents a GetLoginProfileRequest. + * @implements IGetLoginProfileRequest * @constructor - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set */ - function DeletePosixAccountRequest(properties) { + function GetLoginProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1356,76 +982,102 @@ } /** - * DeletePosixAccountRequest name. + * GetLoginProfileRequest name. * @member {string} name - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @instance */ - DeletePosixAccountRequest.prototype.name = ""; + GetLoginProfileRequest.prototype.name = ""; /** - * Creates a new DeletePosixAccountRequest instance using the specified properties. + * GetLoginProfileRequest projectId. + * @member {string} projectId + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @instance + */ + GetLoginProfileRequest.prototype.projectId = ""; + + /** + * GetLoginProfileRequest systemId. + * @member {string} systemId + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @instance + */ + GetLoginProfileRequest.prototype.systemId = ""; + + /** + * Creates a new GetLoginProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest instance + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest instance */ - DeletePosixAccountRequest.create = function create(properties) { - return new DeletePosixAccountRequest(properties); + GetLoginProfileRequest.create = function create(properties) { + return new GetLoginProfileRequest(properties); }; /** - * Encodes the specified DeletePosixAccountRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.verify|verify} messages. + * Encodes the specified GetLoginProfileRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePosixAccountRequest.encode = function encode(message, writer) { + GetLoginProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.systemId != null && Object.hasOwnProperty.call(message, "systemId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.systemId); return writer; }; /** - * Encodes the specified DeletePosixAccountRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.verify|verify} messages. + * Encodes the specified GetLoginProfileRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePosixAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetLoginProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePosixAccountRequest message from the specified reader or buffer. + * Decodes a GetLoginProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePosixAccountRequest.decode = function decode(reader, length) { + GetLoginProfileRequest.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.cloud.oslogin.v1.DeletePosixAccountRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.GetLoginProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; + case 2: + message.projectId = reader.string(); + break; + case 3: + message.systemId = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -1435,107 +1087,124 @@ }; /** - * Decodes a DeletePosixAccountRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLoginProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePosixAccountRequest.decodeDelimited = function decodeDelimited(reader) { + GetLoginProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePosixAccountRequest message. + * Verifies a GetLoginProfileRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePosixAccountRequest.verify = function verify(message) { + GetLoginProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.systemId != null && message.hasOwnProperty("systemId")) + if (!$util.isString(message.systemId)) + return "systemId: string expected"; return null; }; /** - * Creates a DeletePosixAccountRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLoginProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest */ - DeletePosixAccountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.DeletePosixAccountRequest) + GetLoginProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.GetLoginProfileRequest) return object; - var message = new $root.google.cloud.oslogin.v1.DeletePosixAccountRequest(); + var message = new $root.google.cloud.oslogin.v1.GetLoginProfileRequest(); if (object.name != null) message.name = String(object.name); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.systemId != null) + message.systemId = String(object.systemId); return message; }; /** - * Creates a plain object from a DeletePosixAccountRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetLoginProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.DeletePosixAccountRequest} message DeletePosixAccountRequest + * @param {google.cloud.oslogin.v1.GetLoginProfileRequest} message GetLoginProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePosixAccountRequest.toObject = function toObject(message, options) { + GetLoginProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.projectId = ""; + object.systemId = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.systemId != null && message.hasOwnProperty("systemId")) + object.systemId = message.systemId; return object; }; /** - * Converts this DeletePosixAccountRequest to JSON. + * Converts this GetLoginProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @instance * @returns {Object.} JSON object */ - DeletePosixAccountRequest.prototype.toJSON = function toJSON() { + GetLoginProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeletePosixAccountRequest; + return GetLoginProfileRequest; })(); - v1.DeleteSshPublicKeyRequest = (function() { + v1.GetSshPublicKeyRequest = (function() { /** - * Properties of a DeleteSshPublicKeyRequest. + * Properties of a GetSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @interface IDeleteSshPublicKeyRequest - * @property {string|null} [name] DeleteSshPublicKeyRequest name + * @interface IGetSshPublicKeyRequest + * @property {string|null} [name] GetSshPublicKeyRequest name */ /** - * Constructs a new DeleteSshPublicKeyRequest. + * Constructs a new GetSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a DeleteSshPublicKeyRequest. - * @implements IDeleteSshPublicKeyRequest + * @classdesc Represents a GetSshPublicKeyRequest. + * @implements IGetSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set */ - function DeleteSshPublicKeyRequest(properties) { + function GetSshPublicKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1543,35 +1212,35 @@ } /** - * DeleteSshPublicKeyRequest name. + * GetSshPublicKeyRequest name. * @member {string} name - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @instance */ - DeleteSshPublicKeyRequest.prototype.name = ""; + GetSshPublicKeyRequest.prototype.name = ""; /** - * Creates a new DeleteSshPublicKeyRequest instance using the specified properties. + * Creates a new GetSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest instance */ - DeleteSshPublicKeyRequest.create = function create(properties) { - return new DeleteSshPublicKeyRequest(properties); + GetSshPublicKeyRequest.create = function create(properties) { + return new GetSshPublicKeyRequest(properties); }; /** - * Encodes the specified DeleteSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified GetSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSshPublicKeyRequest.encode = function encode(message, writer) { + GetSshPublicKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -1580,33 +1249,33 @@ }; /** - * Encodes the specified DeleteSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified GetSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSshPublicKeyRequest.decode = function decode(reader, length) { + GetSshPublicKeyRequest.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.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1622,30 +1291,30 @@ }; /** - * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + GetSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteSshPublicKeyRequest message. + * Verifies a GetSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteSshPublicKeyRequest.verify = function verify(message) { + GetSshPublicKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -1655,32 +1324,32 @@ }; /** - * Creates a DeleteSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest */ - DeleteSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest) + GetSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest) return object; - var message = new $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); + var message = new $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteSshPublicKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetSshPublicKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest + * @param {google.cloud.oslogin.v1.GetSshPublicKeyRequest} message GetSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteSshPublicKeyRequest.toObject = function toObject(message, options) { + GetSshPublicKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -1692,39 +1361,39 @@ }; /** - * Converts this DeleteSshPublicKeyRequest to JSON. + * Converts this GetSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - DeleteSshPublicKeyRequest.prototype.toJSON = function toJSON() { + GetSshPublicKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteSshPublicKeyRequest; + return GetSshPublicKeyRequest; })(); - v1.GetLoginProfileRequest = (function() { + v1.ImportSshPublicKeyRequest = (function() { /** - * Properties of a GetLoginProfileRequest. + * Properties of an ImportSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @interface IGetLoginProfileRequest - * @property {string|null} [name] GetLoginProfileRequest name - * @property {string|null} [projectId] GetLoginProfileRequest projectId - * @property {string|null} [systemId] GetLoginProfileRequest systemId + * @interface IImportSshPublicKeyRequest + * @property {string|null} [parent] ImportSshPublicKeyRequest parent + * @property {google.cloud.oslogin.common.ISshPublicKey|null} [sshPublicKey] ImportSshPublicKeyRequest sshPublicKey + * @property {string|null} [projectId] ImportSshPublicKeyRequest projectId */ /** - * Constructs a new GetLoginProfileRequest. + * Constructs a new ImportSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a GetLoginProfileRequest. - * @implements IGetLoginProfileRequest + * @classdesc Represents an ImportSshPublicKeyRequest. + * @implements IImportSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set */ - function GetLoginProfileRequest(properties) { + function ImportSshPublicKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1732,101 +1401,101 @@ } /** - * GetLoginProfileRequest name. - * @member {string} name - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * ImportSshPublicKeyRequest parent. + * @member {string} parent + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - GetLoginProfileRequest.prototype.name = ""; + ImportSshPublicKeyRequest.prototype.parent = ""; /** - * GetLoginProfileRequest projectId. - * @member {string} projectId - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * ImportSshPublicKeyRequest sshPublicKey. + * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - GetLoginProfileRequest.prototype.projectId = ""; + ImportSshPublicKeyRequest.prototype.sshPublicKey = null; /** - * GetLoginProfileRequest systemId. - * @member {string} systemId - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * ImportSshPublicKeyRequest projectId. + * @member {string} projectId + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - GetLoginProfileRequest.prototype.systemId = ""; + ImportSshPublicKeyRequest.prototype.projectId = ""; /** - * Creates a new GetLoginProfileRequest instance using the specified properties. + * Creates a new ImportSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest instance */ - GetLoginProfileRequest.create = function create(properties) { - return new GetLoginProfileRequest(properties); + ImportSshPublicKeyRequest.create = function create(properties) { + return new ImportSshPublicKeyRequest(properties); }; /** - * Encodes the specified GetLoginProfileRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. + * Encodes the specified ImportSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLoginProfileRequest.encode = function encode(message, writer) { + ImportSshPublicKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sshPublicKey != null && Object.hasOwnProperty.call(message, "sshPublicKey")) + $root.google.cloud.oslogin.common.SshPublicKey.encode(message.sshPublicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - if (message.systemId != null && Object.hasOwnProperty.call(message, "systemId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.systemId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectId); return writer; }; /** - * Encodes the specified GetLoginProfileRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. + * Encodes the specified ImportSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetLoginProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLoginProfileRequest message from the specified reader or buffer. + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLoginProfileRequest.decode = function decode(reader, length) { + ImportSshPublicKeyRequest.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.cloud.oslogin.v1.GetLoginProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); break; case 2: - message.projectId = reader.string(); + message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); break; case 3: - message.systemId = reader.string(); + message.projectId = reader.string(); break; default: reader.skipType(tag & 7); @@ -1837,124 +1506,129 @@ }; /** - * Decodes a GetLoginProfileRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetLoginProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ImportSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetLoginProfileRequest message. + * Verifies an ImportSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetLoginProfileRequest.verify = function verify(message) { + ImportSshPublicKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) { + var error = $root.google.cloud.oslogin.common.SshPublicKey.verify(message.sshPublicKey); + if (error) + return "sshPublicKey." + error; + } if (message.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; - if (message.systemId != null && message.hasOwnProperty("systemId")) - if (!$util.isString(message.systemId)) - return "systemId: string expected"; return null; }; /** - * Creates a GetLoginProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest */ - GetLoginProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.GetLoginProfileRequest) + ImportSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest) return object; - var message = new $root.google.cloud.oslogin.v1.GetLoginProfileRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.sshPublicKey != null) { + if (typeof object.sshPublicKey !== "object") + throw TypeError(".google.cloud.oslogin.v1.ImportSshPublicKeyRequest.sshPublicKey: object expected"); + message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKey); + } if (object.projectId != null) message.projectId = String(object.projectId); - if (object.systemId != null) - message.systemId = String(object.systemId); return message; }; /** - * Creates a plain object from a GetLoginProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportSshPublicKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.GetLoginProfileRequest} message GetLoginProfileRequest + * @param {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} message ImportSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLoginProfileRequest.toObject = function toObject(message, options) { + ImportSshPublicKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.sshPublicKey = null; object.projectId = ""; - object.systemId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) + object.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKey, options); if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.systemId != null && message.hasOwnProperty("systemId")) - object.systemId = message.systemId; return object; }; /** - * Converts this GetLoginProfileRequest to JSON. + * Converts this ImportSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - GetLoginProfileRequest.prototype.toJSON = function toJSON() { + ImportSshPublicKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetLoginProfileRequest; + return ImportSshPublicKeyRequest; })(); - v1.GetSshPublicKeyRequest = (function() { + v1.ImportSshPublicKeyResponse = (function() { /** - * Properties of a GetSshPublicKeyRequest. + * Properties of an ImportSshPublicKeyResponse. * @memberof google.cloud.oslogin.v1 - * @interface IGetSshPublicKeyRequest - * @property {string|null} [name] GetSshPublicKeyRequest name + * @interface IImportSshPublicKeyResponse + * @property {google.cloud.oslogin.v1.ILoginProfile|null} [loginProfile] ImportSshPublicKeyResponse loginProfile */ /** - * Constructs a new GetSshPublicKeyRequest. + * Constructs a new ImportSshPublicKeyResponse. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a GetSshPublicKeyRequest. - * @implements IGetSshPublicKeyRequest + * @classdesc Represents an ImportSshPublicKeyResponse. + * @implements IImportSshPublicKeyResponse * @constructor - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set */ - function GetSshPublicKeyRequest(properties) { + function ImportSshPublicKeyResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1962,75 +1636,75 @@ } /** - * GetSshPublicKeyRequest name. - * @member {string} name - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * ImportSshPublicKeyResponse loginProfile. + * @member {google.cloud.oslogin.v1.ILoginProfile|null|undefined} loginProfile + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @instance */ - GetSshPublicKeyRequest.prototype.name = ""; + ImportSshPublicKeyResponse.prototype.loginProfile = null; /** - * Creates a new GetSshPublicKeyRequest instance using the specified properties. + * Creates a new ImportSshPublicKeyResponse instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse instance */ - GetSshPublicKeyRequest.create = function create(properties) { - return new GetSshPublicKeyRequest(properties); + ImportSshPublicKeyResponse.create = function create(properties) { + return new ImportSshPublicKeyResponse(properties); }; /** - * Encodes the specified GetSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified ImportSshPublicKeyResponse message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse} message ImportSshPublicKeyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSshPublicKeyRequest.encode = function encode(message, writer) { + ImportSshPublicKeyResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.loginProfile != null && Object.hasOwnProperty.call(message, "loginProfile")) + $root.google.cloud.oslogin.v1.LoginProfile.encode(message.loginProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified ImportSshPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse} message ImportSshPublicKeyResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportSshPublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer. + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSshPublicKeyRequest.decode = function decode(reader, length) { + ImportSshPublicKeyResponse.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.cloud.oslogin.v1.GetSshPublicKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2041,211 +1715,216 @@ }; /** - * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + ImportSshPublicKeyResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSshPublicKeyRequest message. + * Verifies an ImportSshPublicKeyResponse message. * @function verify - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSshPublicKeyRequest.verify = function verify(message) { + ImportSshPublicKeyResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.loginProfile != null && message.hasOwnProperty("loginProfile")) { + var error = $root.google.cloud.oslogin.v1.LoginProfile.verify(message.loginProfile); + if (error) + return "loginProfile." + error; + } return null; }; /** - * Creates a GetSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportSshPublicKeyResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse */ - GetSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest) + ImportSshPublicKeyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse) return object; - var message = new $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse(); + if (object.loginProfile != null) { + if (typeof object.loginProfile !== "object") + throw TypeError(".google.cloud.oslogin.v1.ImportSshPublicKeyResponse.loginProfile: object expected"); + message.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.fromObject(object.loginProfile); + } return message; }; /** - * Creates a plain object from a GetSshPublicKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportSshPublicKeyResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.v1.GetSshPublicKeyRequest} message GetSshPublicKeyRequest + * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} message ImportSshPublicKeyResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSshPublicKeyRequest.toObject = function toObject(message, options) { + ImportSshPublicKeyResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.loginProfile = null; + if (message.loginProfile != null && message.hasOwnProperty("loginProfile")) + object.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.toObject(message.loginProfile, options); return object; }; /** - * Converts this GetSshPublicKeyRequest to JSON. + * Converts this ImportSshPublicKeyResponse to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @instance * @returns {Object.} JSON object */ - GetSshPublicKeyRequest.prototype.toJSON = function toJSON() { + ImportSshPublicKeyResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSshPublicKeyRequest; + return ImportSshPublicKeyResponse; })(); - v1.ImportSshPublicKeyRequest = (function() { + v1.UpdateSshPublicKeyRequest = (function() { /** - * Properties of an ImportSshPublicKeyRequest. + * Properties of an UpdateSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @interface IImportSshPublicKeyRequest - * @property {string|null} [parent] ImportSshPublicKeyRequest parent - * @property {google.cloud.oslogin.common.ISshPublicKey|null} [sshPublicKey] ImportSshPublicKeyRequest sshPublicKey - * @property {string|null} [projectId] ImportSshPublicKeyRequest projectId + * @interface IUpdateSshPublicKeyRequest + * @property {string|null} [name] UpdateSshPublicKeyRequest name + * @property {google.cloud.oslogin.common.ISshPublicKey|null} [sshPublicKey] UpdateSshPublicKeyRequest sshPublicKey + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSshPublicKeyRequest updateMask */ /** - * Constructs a new ImportSshPublicKeyRequest. + * Constructs a new UpdateSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an ImportSshPublicKeyRequest. - * @implements IImportSshPublicKeyRequest + * @classdesc Represents an UpdateSshPublicKeyRequest. + * @implements IUpdateSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set */ - function ImportSshPublicKeyRequest(properties) { + function UpdateSshPublicKeyRequest(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]]; } - - /** - * ImportSshPublicKeyRequest parent. - * @member {string} parent - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + + /** + * UpdateSshPublicKeyRequest name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @instance */ - ImportSshPublicKeyRequest.prototype.parent = ""; + UpdateSshPublicKeyRequest.prototype.name = ""; /** - * ImportSshPublicKeyRequest sshPublicKey. + * UpdateSshPublicKeyRequest sshPublicKey. * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @instance */ - ImportSshPublicKeyRequest.prototype.sshPublicKey = null; + UpdateSshPublicKeyRequest.prototype.sshPublicKey = null; /** - * ImportSshPublicKeyRequest projectId. - * @member {string} projectId - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * UpdateSshPublicKeyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @instance */ - ImportSshPublicKeyRequest.prototype.projectId = ""; + UpdateSshPublicKeyRequest.prototype.updateMask = null; /** - * Creates a new ImportSshPublicKeyRequest instance using the specified properties. + * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest instance */ - ImportSshPublicKeyRequest.create = function create(properties) { - return new ImportSshPublicKeyRequest(properties); + UpdateSshPublicKeyRequest.create = function create(properties) { + return new UpdateSshPublicKeyRequest(properties); }; /** - * Encodes the specified ImportSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSshPublicKeyRequest.encode = function encode(message, writer) { + UpdateSshPublicKeyRequest.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); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.sshPublicKey != null && Object.hasOwnProperty.call(message, "sshPublicKey")) $root.google.cloud.oslogin.common.SshPublicKey.encode(message.sshPublicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectId); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified UpdateSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSshPublicKeyRequest.decode = function decode(reader, length) { + UpdateSshPublicKeyRequest.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.cloud.oslogin.v1.ImportSshPublicKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.name = reader.string(); break; case 2: message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); break; case 3: - message.projectId = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2256,205 +1935,378 @@ }; /** - * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSshPublicKeyRequest message. + * Verifies an UpdateSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSshPublicKeyRequest.verify = function verify(message) { + UpdateSshPublicKeyRequest.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"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) { var error = $root.google.cloud.oslogin.common.SshPublicKey.verify(message.sshPublicKey); if (error) return "sshPublicKey." + error; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates an ImportSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * Creates an UpdateSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + */ + UpdateSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest) + return object; + var message = new $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.sshPublicKey != null) { + if (typeof object.sshPublicKey !== "object") + throw TypeError(".google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.sshPublicKey: object expected"); + message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKey); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @static + * @param {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSshPublicKeyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sshPublicKey = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) + object.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKey, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSshPublicKeyRequest to JSON. + * @function toJSON + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSshPublicKeyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateSshPublicKeyRequest; + })(); + + return v1; + })(); + + oslogin.common = (function() { + + /** + * Namespace common. + * @memberof google.cloud.oslogin + * @namespace + */ + var common = {}; + + /** + * OperatingSystemType enum. + * @name google.cloud.oslogin.common.OperatingSystemType + * @enum {number} + * @property {number} OPERATING_SYSTEM_TYPE_UNSPECIFIED=0 OPERATING_SYSTEM_TYPE_UNSPECIFIED value + * @property {number} LINUX=1 LINUX value + * @property {number} WINDOWS=2 WINDOWS value + */ + common.OperatingSystemType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATING_SYSTEM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINUX"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + return values; + })(); + + common.PosixAccount = (function() { + + /** + * Properties of a PosixAccount. + * @memberof google.cloud.oslogin.common + * @interface IPosixAccount + * @property {boolean|null} [primary] PosixAccount primary + * @property {string|null} [username] PosixAccount username + * @property {number|Long|null} [uid] PosixAccount uid + * @property {number|Long|null} [gid] PosixAccount gid + * @property {string|null} [homeDirectory] PosixAccount homeDirectory + * @property {string|null} [shell] PosixAccount shell + * @property {string|null} [gecos] PosixAccount gecos + * @property {string|null} [systemId] PosixAccount systemId + * @property {string|null} [accountId] PosixAccount accountId + * @property {google.cloud.oslogin.common.OperatingSystemType|null} [operatingSystemType] PosixAccount operatingSystemType + * @property {string|null} [name] PosixAccount name + */ + + /** + * Constructs a new PosixAccount. + * @memberof google.cloud.oslogin.common + * @classdesc Represents a PosixAccount. + * @implements IPosixAccount + * @constructor + * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set + */ + function PosixAccount(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]]; + } + + /** + * PosixAccount primary. + * @member {boolean} primary + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance + */ + PosixAccount.prototype.primary = false; + + /** + * PosixAccount username. + * @member {string} username + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance + */ + PosixAccount.prototype.username = ""; + + /** + * PosixAccount uid. + * @member {number|Long} uid + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance + */ + PosixAccount.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PosixAccount gid. + * @member {number|Long} gid + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance + */ + PosixAccount.prototype.gid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PosixAccount homeDirectory. + * @member {string} homeDirectory + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance */ - ImportSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest) - return object; - var message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.sshPublicKey != null) { - if (typeof object.sshPublicKey !== "object") - throw TypeError(".google.cloud.oslogin.v1.ImportSshPublicKeyRequest.sshPublicKey: object expected"); - message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKey); - } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; + PosixAccount.prototype.homeDirectory = ""; /** - * Creates a plain object from an ImportSshPublicKeyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest - * @static - * @param {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} message ImportSshPublicKeyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * PosixAccount shell. + * @member {string} shell + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance */ - ImportSshPublicKeyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.sshPublicKey = null; - object.projectId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) - object.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKey, options); - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - return object; - }; + PosixAccount.prototype.shell = ""; /** - * Converts this ImportSshPublicKeyRequest to JSON. - * @function toJSON - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * PosixAccount gecos. + * @member {string} gecos + * @memberof google.cloud.oslogin.common.PosixAccount * @instance - * @returns {Object.} JSON object */ - ImportSshPublicKeyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImportSshPublicKeyRequest; - })(); + PosixAccount.prototype.gecos = ""; - v1.ImportSshPublicKeyResponse = (function() { + /** + * PosixAccount systemId. + * @member {string} systemId + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance + */ + PosixAccount.prototype.systemId = ""; /** - * Properties of an ImportSshPublicKeyResponse. - * @memberof google.cloud.oslogin.v1 - * @interface IImportSshPublicKeyResponse - * @property {google.cloud.oslogin.v1.ILoginProfile|null} [loginProfile] ImportSshPublicKeyResponse loginProfile + * PosixAccount accountId. + * @member {string} accountId + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance */ + PosixAccount.prototype.accountId = ""; /** - * Constructs a new ImportSshPublicKeyResponse. - * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an ImportSshPublicKeyResponse. - * @implements IImportSshPublicKeyResponse - * @constructor - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set + * PosixAccount operatingSystemType. + * @member {google.cloud.oslogin.common.OperatingSystemType} operatingSystemType + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance */ - function ImportSshPublicKeyResponse(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]]; - } + PosixAccount.prototype.operatingSystemType = 0; /** - * ImportSshPublicKeyResponse loginProfile. - * @member {google.cloud.oslogin.v1.ILoginProfile|null|undefined} loginProfile - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * PosixAccount name. + * @member {string} name + * @memberof google.cloud.oslogin.common.PosixAccount * @instance */ - ImportSshPublicKeyResponse.prototype.loginProfile = null; + PosixAccount.prototype.name = ""; /** - * Creates a new ImportSshPublicKeyResponse instance using the specified properties. + * Creates a new PosixAccount instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse instance + * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set + * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount instance */ - ImportSshPublicKeyResponse.create = function create(properties) { - return new ImportSshPublicKeyResponse(properties); + PosixAccount.create = function create(properties) { + return new PosixAccount(properties); }; /** - * Encodes the specified ImportSshPublicKeyResponse message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. + * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse} message ImportSshPublicKeyResponse message or plain object to encode + * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSshPublicKeyResponse.encode = function encode(message, writer) { + PosixAccount.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.loginProfile != null && Object.hasOwnProperty.call(message, "loginProfile")) - $root.google.cloud.oslogin.v1.LoginProfile.encode(message.loginProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.primary != null && Object.hasOwnProperty.call(message, "primary")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.primary); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.uid); + if (message.gid != null && Object.hasOwnProperty.call(message, "gid")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.gid); + if (message.homeDirectory != null && Object.hasOwnProperty.call(message, "homeDirectory")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.homeDirectory); + if (message.shell != null && Object.hasOwnProperty.call(message, "shell")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.shell); + if (message.gecos != null && Object.hasOwnProperty.call(message, "gecos")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gecos); + if (message.systemId != null && Object.hasOwnProperty.call(message, "systemId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.systemId); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.accountId); + if (message.operatingSystemType != null && Object.hasOwnProperty.call(message, "operatingSystemType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.operatingSystemType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.name); return writer; }; /** - * Encodes the specified ImportSshPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. + * Encodes the specified PosixAccount message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse} message ImportSshPublicKeyResponse message or plain object to encode + * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportSshPublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { + PosixAccount.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. + * Decodes a PosixAccount message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSshPublicKeyResponse.decode = function decode(reader, length) { + PosixAccount.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.cloud.oslogin.v1.ImportSshPublicKeyResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.common.PosixAccount(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.decode(reader, reader.uint32()); + message.primary = reader.bool(); + break; + case 2: + message.username = reader.string(); + break; + case 3: + message.uid = reader.int64(); + break; + case 4: + message.gid = reader.int64(); + break; + case 5: + message.homeDirectory = reader.string(); + break; + case 6: + message.shell = reader.string(); + break; + case 7: + message.gecos = reader.string(); + break; + case 8: + message.systemId = reader.string(); + break; + case 9: + message.accountId = reader.string(); + break; + case 10: + message.operatingSystemType = reader.int32(); + break; + case 11: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -2465,114 +2317,237 @@ }; /** - * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer, length delimited. + * Decodes a PosixAccount message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportSshPublicKeyResponse.decodeDelimited = function decodeDelimited(reader) { + PosixAccount.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSshPublicKeyResponse message. + * Verifies a PosixAccount message. * @function verify - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportSshPublicKeyResponse.verify = function verify(message) { + PosixAccount.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.loginProfile != null && message.hasOwnProperty("loginProfile")) { - var error = $root.google.cloud.oslogin.v1.LoginProfile.verify(message.loginProfile); - if (error) - return "loginProfile." + error; - } + if (message.primary != null && message.hasOwnProperty("primary")) + if (typeof message.primary !== "boolean") + return "primary: boolean expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isInteger(message.uid) && !(message.uid && $util.isInteger(message.uid.low) && $util.isInteger(message.uid.high))) + return "uid: integer|Long expected"; + if (message.gid != null && message.hasOwnProperty("gid")) + if (!$util.isInteger(message.gid) && !(message.gid && $util.isInteger(message.gid.low) && $util.isInteger(message.gid.high))) + return "gid: integer|Long expected"; + if (message.homeDirectory != null && message.hasOwnProperty("homeDirectory")) + if (!$util.isString(message.homeDirectory)) + return "homeDirectory: string expected"; + if (message.shell != null && message.hasOwnProperty("shell")) + if (!$util.isString(message.shell)) + return "shell: string expected"; + if (message.gecos != null && message.hasOwnProperty("gecos")) + if (!$util.isString(message.gecos)) + return "gecos: string expected"; + if (message.systemId != null && message.hasOwnProperty("systemId")) + if (!$util.isString(message.systemId)) + return "systemId: string expected"; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isString(message.accountId)) + return "accountId: string expected"; + if (message.operatingSystemType != null && message.hasOwnProperty("operatingSystemType")) + switch (message.operatingSystemType) { + default: + return "operatingSystemType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportSshPublicKeyResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PosixAccount message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount */ - ImportSshPublicKeyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse) + PosixAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.common.PosixAccount) return object; - var message = new $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse(); - if (object.loginProfile != null) { - if (typeof object.loginProfile !== "object") - throw TypeError(".google.cloud.oslogin.v1.ImportSshPublicKeyResponse.loginProfile: object expected"); - message.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.fromObject(object.loginProfile); + var message = new $root.google.cloud.oslogin.common.PosixAccount(); + if (object.primary != null) + message.primary = Boolean(object.primary); + if (object.username != null) + message.username = String(object.username); + if (object.uid != null) + if ($util.Long) + (message.uid = $util.Long.fromValue(object.uid)).unsigned = false; + else if (typeof object.uid === "string") + message.uid = parseInt(object.uid, 10); + else if (typeof object.uid === "number") + message.uid = object.uid; + else if (typeof object.uid === "object") + message.uid = new $util.LongBits(object.uid.low >>> 0, object.uid.high >>> 0).toNumber(); + if (object.gid != null) + if ($util.Long) + (message.gid = $util.Long.fromValue(object.gid)).unsigned = false; + else if (typeof object.gid === "string") + message.gid = parseInt(object.gid, 10); + else if (typeof object.gid === "number") + message.gid = object.gid; + else if (typeof object.gid === "object") + message.gid = new $util.LongBits(object.gid.low >>> 0, object.gid.high >>> 0).toNumber(); + if (object.homeDirectory != null) + message.homeDirectory = String(object.homeDirectory); + if (object.shell != null) + message.shell = String(object.shell); + if (object.gecos != null) + message.gecos = String(object.gecos); + if (object.systemId != null) + message.systemId = String(object.systemId); + if (object.accountId != null) + message.accountId = String(object.accountId); + switch (object.operatingSystemType) { + case "OPERATING_SYSTEM_TYPE_UNSPECIFIED": + case 0: + message.operatingSystemType = 0; + break; + case "LINUX": + case 1: + message.operatingSystemType = 1; + break; + case "WINDOWS": + case 2: + message.operatingSystemType = 2; + break; } + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportSshPublicKeyResponse message. Also converts values to other types if specified. + * Creates a plain object from a PosixAccount message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} message ImportSshPublicKeyResponse + * @param {google.cloud.oslogin.common.PosixAccount} message PosixAccount * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSshPublicKeyResponse.toObject = function toObject(message, options) { + PosixAccount.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.loginProfile = null; - if (message.loginProfile != null && message.hasOwnProperty("loginProfile")) - object.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.toObject(message.loginProfile, options); + if (options.defaults) { + object.primary = false; + object.username = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.uid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.uid = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gid = options.longs === String ? "0" : 0; + object.homeDirectory = ""; + object.shell = ""; + object.gecos = ""; + object.systemId = ""; + object.accountId = ""; + object.operatingSystemType = options.enums === String ? "OPERATING_SYSTEM_TYPE_UNSPECIFIED" : 0; + object.name = ""; + } + if (message.primary != null && message.hasOwnProperty("primary")) + object.primary = message.primary; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.uid != null && message.hasOwnProperty("uid")) + if (typeof message.uid === "number") + object.uid = options.longs === String ? String(message.uid) : message.uid; + else + object.uid = options.longs === String ? $util.Long.prototype.toString.call(message.uid) : options.longs === Number ? new $util.LongBits(message.uid.low >>> 0, message.uid.high >>> 0).toNumber() : message.uid; + if (message.gid != null && message.hasOwnProperty("gid")) + if (typeof message.gid === "number") + object.gid = options.longs === String ? String(message.gid) : message.gid; + else + object.gid = options.longs === String ? $util.Long.prototype.toString.call(message.gid) : options.longs === Number ? new $util.LongBits(message.gid.low >>> 0, message.gid.high >>> 0).toNumber() : message.gid; + if (message.homeDirectory != null && message.hasOwnProperty("homeDirectory")) + object.homeDirectory = message.homeDirectory; + if (message.shell != null && message.hasOwnProperty("shell")) + object.shell = message.shell; + if (message.gecos != null && message.hasOwnProperty("gecos")) + object.gecos = message.gecos; + if (message.systemId != null && message.hasOwnProperty("systemId")) + object.systemId = message.systemId; + if (message.accountId != null && message.hasOwnProperty("accountId")) + object.accountId = message.accountId; + if (message.operatingSystemType != null && message.hasOwnProperty("operatingSystemType")) + object.operatingSystemType = options.enums === String ? $root.google.cloud.oslogin.common.OperatingSystemType[message.operatingSystemType] : message.operatingSystemType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportSshPublicKeyResponse to JSON. + * Converts this PosixAccount to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.common.PosixAccount * @instance * @returns {Object.} JSON object */ - ImportSshPublicKeyResponse.prototype.toJSON = function toJSON() { + PosixAccount.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportSshPublicKeyResponse; + return PosixAccount; })(); - v1.UpdateSshPublicKeyRequest = (function() { + common.SshPublicKey = (function() { /** - * Properties of an UpdateSshPublicKeyRequest. - * @memberof google.cloud.oslogin.v1 - * @interface IUpdateSshPublicKeyRequest - * @property {string|null} [name] UpdateSshPublicKeyRequest name - * @property {google.cloud.oslogin.common.ISshPublicKey|null} [sshPublicKey] UpdateSshPublicKeyRequest sshPublicKey - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSshPublicKeyRequest updateMask + * Properties of a SshPublicKey. + * @memberof google.cloud.oslogin.common + * @interface ISshPublicKey + * @property {string|null} [key] SshPublicKey key + * @property {number|Long|null} [expirationTimeUsec] SshPublicKey expirationTimeUsec + * @property {string|null} [fingerprint] SshPublicKey fingerprint + * @property {string|null} [name] SshPublicKey name */ /** - * Constructs a new UpdateSshPublicKeyRequest. - * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an UpdateSshPublicKeyRequest. - * @implements IUpdateSshPublicKeyRequest + * Constructs a new SshPublicKey. + * @memberof google.cloud.oslogin.common + * @classdesc Represents a SshPublicKey. + * @implements ISshPublicKey * @constructor - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set */ - function UpdateSshPublicKeyRequest(properties) { + function SshPublicKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2580,101 +2555,114 @@ } /** - * UpdateSshPublicKeyRequest name. - * @member {string} name - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * SshPublicKey key. + * @member {string} key + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance */ - UpdateSshPublicKeyRequest.prototype.name = ""; + SshPublicKey.prototype.key = ""; /** - * UpdateSshPublicKeyRequest sshPublicKey. - * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * SshPublicKey expirationTimeUsec. + * @member {number|Long} expirationTimeUsec + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance */ - UpdateSshPublicKeyRequest.prototype.sshPublicKey = null; + SshPublicKey.prototype.expirationTimeUsec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UpdateSshPublicKeyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * SshPublicKey fingerprint. + * @member {string} fingerprint + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance */ - UpdateSshPublicKeyRequest.prototype.updateMask = null; + SshPublicKey.prototype.fingerprint = ""; /** - * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * SshPublicKey name. + * @member {string} name + * @memberof google.cloud.oslogin.common.SshPublicKey + * @instance + */ + SshPublicKey.prototype.name = ""; + + /** + * Creates a new SshPublicKey instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest instance + * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey instance */ - UpdateSshPublicKeyRequest.create = function create(properties) { - return new UpdateSshPublicKeyRequest(properties); + SshPublicKey.create = function create(properties) { + return new SshPublicKey(properties); }; /** - * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified SshPublicKey message. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSshPublicKeyRequest.encode = function encode(message, writer) { + SshPublicKey.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.expirationTimeUsec != null && Object.hasOwnProperty.call(message, "expirationTimeUsec")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.expirationTimeUsec); + if (message.fingerprint != null && Object.hasOwnProperty.call(message, "fingerprint")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fingerprint); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.sshPublicKey != null && Object.hasOwnProperty.call(message, "sshPublicKey")) - $root.google.cloud.oslogin.common.SshPublicKey.encode(message.sshPublicKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified UpdateSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. + * Encodes the specified SshPublicKey message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest message or plain object to encode + * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + SshPublicKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a SshPublicKey message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSshPublicKeyRequest.decode = function decode(reader, length) { + SshPublicKey.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.cloud.oslogin.v1.UpdateSshPublicKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.common.SshPublicKey(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.key = reader.string(); break; case 2: - message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); + message.expirationTimeUsec = reader.int64(); break; case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.fingerprint = reader.string(); + break; + case 4: + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -2685,117 +2673,129 @@ }; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a SshPublicKey message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + SshPublicKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSshPublicKeyRequest message. + * Verifies a SshPublicKey message. * @function verify - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSshPublicKeyRequest.verify = function verify(message) { + SshPublicKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.expirationTimeUsec != null && message.hasOwnProperty("expirationTimeUsec")) + if (!$util.isInteger(message.expirationTimeUsec) && !(message.expirationTimeUsec && $util.isInteger(message.expirationTimeUsec.low) && $util.isInteger(message.expirationTimeUsec.high))) + return "expirationTimeUsec: integer|Long expected"; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + if (!$util.isString(message.fingerprint)) + return "fingerprint: string expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) { - var error = $root.google.cloud.oslogin.common.SshPublicKey.verify(message.sshPublicKey); - if (error) - return "sshPublicKey." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } return null; }; /** - * Creates an UpdateSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SshPublicKey message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey */ - UpdateSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest) + SshPublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.common.SshPublicKey) return object; - var message = new $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest(); + var message = new $root.google.cloud.oslogin.common.SshPublicKey(); + if (object.key != null) + message.key = String(object.key); + if (object.expirationTimeUsec != null) + if ($util.Long) + (message.expirationTimeUsec = $util.Long.fromValue(object.expirationTimeUsec)).unsigned = false; + else if (typeof object.expirationTimeUsec === "string") + message.expirationTimeUsec = parseInt(object.expirationTimeUsec, 10); + else if (typeof object.expirationTimeUsec === "number") + message.expirationTimeUsec = object.expirationTimeUsec; + else if (typeof object.expirationTimeUsec === "object") + message.expirationTimeUsec = new $util.LongBits(object.expirationTimeUsec.low >>> 0, object.expirationTimeUsec.high >>> 0).toNumber(); + if (object.fingerprint != null) + message.fingerprint = String(object.fingerprint); if (object.name != null) message.name = String(object.name); - if (object.sshPublicKey != null) { - if (typeof object.sshPublicKey !== "object") - throw TypeError(".google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.sshPublicKey: object expected"); - message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.fromObject(object.sshPublicKey); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } return message; }; /** - * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a SshPublicKey message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest + * @param {google.cloud.oslogin.common.SshPublicKey} message SshPublicKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSshPublicKeyRequest.toObject = function toObject(message, options) { + SshPublicKey.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.key = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.expirationTimeUsec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.expirationTimeUsec = options.longs === String ? "0" : 0; + object.fingerprint = ""; object.name = ""; - object.sshPublicKey = null; - object.updateMask = null; } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.expirationTimeUsec != null && message.hasOwnProperty("expirationTimeUsec")) + if (typeof message.expirationTimeUsec === "number") + object.expirationTimeUsec = options.longs === String ? String(message.expirationTimeUsec) : message.expirationTimeUsec; + else + object.expirationTimeUsec = options.longs === String ? $util.Long.prototype.toString.call(message.expirationTimeUsec) : options.longs === Number ? new $util.LongBits(message.expirationTimeUsec.low >>> 0, message.expirationTimeUsec.high >>> 0).toNumber() : message.expirationTimeUsec; + if (message.fingerprint != null && message.hasOwnProperty("fingerprint")) + object.fingerprint = message.fingerprint; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.sshPublicKey != null && message.hasOwnProperty("sshPublicKey")) - object.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.toObject(message.sshPublicKey, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateSshPublicKeyRequest to JSON. + * Converts this SshPublicKey to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance * @returns {Object.} JSON object */ - UpdateSshPublicKeyRequest.prototype.toJSON = function toJSON() { + SshPublicKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateSshPublicKeyRequest; + return SshPublicKey; })(); - return v1; + return common; })(); oslogin.v1beta = (function() { @@ -4804,52 +4804,26 @@ */ var api = {}; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - return values; - })(); - - api.ResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a Http. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4857,143 +4831,91 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.plural = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.singular = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + Http.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.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -5004,407 +4926,597 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + HttpRule.prototype.patch = ""; /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { + HttpRule.prototype.custom = null; /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - function ResourceReference(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]]; - } + HttpRule.prototype.responseBody = ""; /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.type = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.childType = ""; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + HttpRule.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.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.type = reader.string(); + message.selector = reader.string(); break; case 2: - message.childType = reader.string(); + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); break; } } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return HttpRule; })(); - api.Http = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Http. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5412,91 +5524,88 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.rules = $util.emptyArray; + CustomHttpPattern.prototype.kind = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Http.create = function create(properties) { - return new Http(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decode = function decode(reader, length) { + CustomHttpPattern.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.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.kind = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -5507,143 +5616,144 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Http.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Http.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Http} message Http + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Http to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + return CustomHttpPattern; })(); - api.HttpRule = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a HttpRule. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular */ /** - * Constructs a new HttpRule. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5651,209 +5761,143 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = ""; - - /** - * HttpRule put. - * @member {string} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = ""; - - /** - * HttpRule post. - * @member {string} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = ""; - - /** - * HttpRule delete. - * @member {string} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = ""; - - /** - * HttpRule patch. - * @member {string} patch - * @memberof google.api.HttpRule + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.patch = ""; + ResourceDescriptor.prototype.type = ""; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.custom = null; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.body = ""; + ResourceDescriptor.prototype.nameField = ""; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + ResourceDescriptor.prototype.history = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceDescriptor.prototype.plural = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceDescriptor.prototype.singular = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length) { + ResourceDescriptor.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.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.selector = reader.string(); + message.type = reader.string(); break; case 2: - message.get = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; case 3: - message.put = reader.string(); + message.nameField = reader.string(); break; case 4: - message.post = reader.string(); + message.history = reader.int32(); break; case 5: - message["delete"] = reader.string(); + message.plural = reader.string(); break; case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.singular = reader.string(); break; default: reader.skipType(tag & 7); @@ -5864,240 +5908,196 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } - } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.pattern = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; })(); - api.CustomHttpPattern = (function() { + api.ResourceReference = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceReference. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6105,88 +6105,88 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceReference.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceReference.prototype.childType = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + ResourceReference.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.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kind = reader.string(); + message.type = reader.string(); break; case 2: - message.path = reader.string(); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -6197,96 +6197,96 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; + return ResourceReference; })(); return api; diff --git a/packages/google-cloud-oslogin/protos/protos.json b/packages/google-cloud-oslogin/protos/protos.json index 98418adcd038..6109b56eb9c1 100644 --- a/packages/google-cloud-oslogin/protos/protos.json +++ b/packages/google-cloud-oslogin/protos/protos.json @@ -6,115 +6,6 @@ "nested": { "oslogin": { "nested": { - "common": { - "options": { - "csharp_namespace": "Google.Cloud.OsLogin.Common", - "go_package": "google.golang.org/genproto/googleapis/cloud/oslogin/common;common", - "java_outer_classname": "OsLoginProto", - "java_package": "com.google.cloud.oslogin.common", - "php_namespace": "Google\\Cloud\\OsLogin\\Common", - "ruby_package": "Google::Cloud::OsLogin::Common", - "(google.api.resource_definition).type": "oslogin.googleapis.com/User", - "(google.api.resource_definition).pattern": "users/{user}" - }, - "nested": { - "OperatingSystemType": { - "values": { - "OPERATING_SYSTEM_TYPE_UNSPECIFIED": 0, - "LINUX": 1, - "WINDOWS": 2 - } - }, - "PosixAccount": { - "options": { - "(google.api.resource).type": "oslogin.googleapis.com/PosixAccount", - "(google.api.resource).pattern": "users/{user}/projects/{project}" - }, - "fields": { - "primary": { - "type": "bool", - "id": 1 - }, - "username": { - "type": "string", - "id": 2 - }, - "uid": { - "type": "int64", - "id": 3 - }, - "gid": { - "type": "int64", - "id": 4 - }, - "homeDirectory": { - "type": "string", - "id": 5 - }, - "shell": { - "type": "string", - "id": 6 - }, - "gecos": { - "type": "string", - "id": 7 - }, - "systemId": { - "type": "string", - "id": 8 - }, - "accountId": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "operatingSystemType": { - "type": "OperatingSystemType", - "id": 10 - }, - "name": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SshPublicKey": { - "options": { - "(google.api.resource).type": "oslogin.googleapis.com/SshPublicKey", - "(google.api.resource).pattern": "users/{user}/sshPublicKeys/{fingerprint}" - }, - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "expirationTimeUsec": { - "type": "int64", - "id": 2 - }, - "fingerprint": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "name": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - }, "v1": { "options": { "csharp_namespace": "Google.Cloud.OsLogin.V1", @@ -317,6 +208,115 @@ } } }, + "common": { + "options": { + "csharp_namespace": "Google.Cloud.OsLogin.Common", + "go_package": "google.golang.org/genproto/googleapis/cloud/oslogin/common;common", + "java_outer_classname": "OsLoginProto", + "java_package": "com.google.cloud.oslogin.common", + "php_namespace": "Google\\Cloud\\OsLogin\\Common", + "ruby_package": "Google::Cloud::OsLogin::Common", + "(google.api.resource_definition).type": "oslogin.googleapis.com/User", + "(google.api.resource_definition).pattern": "users/{user}" + }, + "nested": { + "OperatingSystemType": { + "values": { + "OPERATING_SYSTEM_TYPE_UNSPECIFIED": 0, + "LINUX": 1, + "WINDOWS": 2 + } + }, + "PosixAccount": { + "options": { + "(google.api.resource).type": "oslogin.googleapis.com/PosixAccount", + "(google.api.resource).pattern": "users/{user}/projects/{project}" + }, + "fields": { + "primary": { + "type": "bool", + "id": 1 + }, + "username": { + "type": "string", + "id": 2 + }, + "uid": { + "type": "int64", + "id": 3 + }, + "gid": { + "type": "int64", + "id": 4 + }, + "homeDirectory": { + "type": "string", + "id": 5 + }, + "shell": { + "type": "string", + "id": 6 + }, + "gecos": { + "type": "string", + "id": 7 + }, + "systemId": { + "type": "string", + "id": 8 + }, + "accountId": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "operatingSystemType": { + "type": "OperatingSystemType", + "id": 10 + }, + "name": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "SshPublicKey": { + "options": { + "(google.api.resource).type": "oslogin.googleapis.com/SshPublicKey", + "(google.api.resource).pattern": "users/{user}/sshPublicKeys/{fingerprint}" + }, + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "expirationTimeUsec": { + "type": "int64", + "id": 2 + }, + "fingerprint": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, "v1beta": { "options": { "csharp_namespace": "Google.Cloud.OsLogin.V1Beta", @@ -526,94 +526,12 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ClientProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -716,6 +634,88 @@ "type": "string", "id": 1050, "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } } } }, diff --git a/packages/google-cloud-oslogin/src/v1/os_login_service_client_config.json b/packages/google-cloud-oslogin/src/v1/os_login_service_client_config.json index 23d75dbcd9cc..fc7cef92246d 100644 --- a/packages/google-cloud-oslogin/src/v1/os_login_service_client_config.json +++ b/packages/google-cloud-oslogin/src/v1/os_login_service_client_config.json @@ -21,27 +21,33 @@ }, "methods": { "DeletePosixAccount": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetLoginProfile": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ImportSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" } } diff --git a/packages/google-cloud-oslogin/src/v1/os_login_service_proto_list.json b/packages/google-cloud-oslogin/src/v1/os_login_service_proto_list.json index 46f125ed586f..43375494958d 100644 --- a/packages/google-cloud-oslogin/src/v1/os_login_service_proto_list.json +++ b/packages/google-cloud-oslogin/src/v1/os_login_service_proto_list.json @@ -1,4 +1,3 @@ [ - "../../protos/google/cloud/oslogin/common/common.proto", "../../protos/google/cloud/oslogin/v1/oslogin.proto" ] diff --git a/packages/google-cloud-oslogin/src/v1beta/os_login_service_client_config.json b/packages/google-cloud-oslogin/src/v1beta/os_login_service_client_config.json index 7dd85e22bf1d..6dba4859a32a 100644 --- a/packages/google-cloud-oslogin/src/v1beta/os_login_service_client_config.json +++ b/packages/google-cloud-oslogin/src/v1beta/os_login_service_client_config.json @@ -21,27 +21,33 @@ }, "methods": { "DeletePosixAccount": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetLoginProfile": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "GetSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ImportSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateSshPublicKey": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 10000, + "retry_codes_name": "idempotent", "retry_params_name": "default" } } diff --git a/packages/google-cloud-oslogin/src/v1beta/os_login_service_proto_list.json b/packages/google-cloud-oslogin/src/v1beta/os_login_service_proto_list.json index 078ed1d537d1..329c216d48eb 100644 --- a/packages/google-cloud-oslogin/src/v1beta/os_login_service_proto_list.json +++ b/packages/google-cloud-oslogin/src/v1beta/os_login_service_proto_list.json @@ -1,4 +1,3 @@ [ - "../../protos/google/cloud/oslogin/common/common.proto", "../../protos/google/cloud/oslogin/v1beta/oslogin.proto" ] diff --git a/packages/google-cloud-oslogin/synth.metadata b/packages/google-cloud-oslogin/synth.metadata index 84eda44c4150..c091fe0d4757 100644 --- a/packages/google-cloud-oslogin/synth.metadata +++ b/packages/google-cloud-oslogin/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-os-login.git", - "sha": "ca3ca7d647ce15583a925970fa2ffb07e2c601ca" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6dfd72d028a0d0a43764e060f7b15e004385c3a1", - "internalRef": "310168181" + "remote": "git@github.com:googleapis/nodejs-os-login.git", + "sha": "74d62a085a636242ff9479991ae1e2be2bf71800" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -27,19 +19,19 @@ { "client": { "source": "googleapis", - "apiName": "os-login", + "apiName": "oslogin", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } }, { "client": { "source": "googleapis", - "apiName": "os-login", + "apiName": "oslogin", "apiVersion": "v1beta", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-cloud-oslogin/synth.py b/packages/google-cloud-oslogin/synth.py index 17983c6cdb2a..3816c2424d9a 100644 --- a/packages/google-cloud-oslogin/synth.py +++ b/packages/google-cloud-oslogin/synth.py @@ -24,18 +24,10 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1', 'v1beta'] for version in versions: - library = gapic.typescript_library( - 'os-login', - generator_args={ - "grpc-service-config": f"google/cloud/oslogin/{version}/oslogin_grpc_service_config.json", - "package-name": f"@google-cloud/os-login" - }, - proto_path=f'/google/cloud/oslogin/{version}', - extra_proto_files=['google/cloud/oslogin/common/common.proto'], - version=version) + library = gapic.node_library('oslogin', version, proto_path=f'google/cloud/oslogin/{version}') # skip index, protos, package.json, and README.md s.copy(