diff --git a/packages/google-cloud-oslogin/protos/protos.d.ts b/packages/google-cloud-oslogin/protos/protos.d.ts index 671805f7497..bca76bad1b5 100644 --- a/packages/google-cloud-oslogin/protos/protos.d.ts +++ b/packages/google-cloud-oslogin/protos/protos.d.ts @@ -23,6 +23,275 @@ 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 { @@ -678,536 +947,267 @@ export namespace google { /** ImportSshPublicKeyRequest sshPublicKey. */ public sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); - /** ImportSshPublicKeyRequest projectId. */ - public projectId: string; - - /** - * Creates a new ImportSshPublicKeyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportSshPublicKeyRequest instance - */ - 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 - * @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); - + /** ImportSshPublicKeyRequest projectId. */ + public projectId: string; + /** - * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * Creates a new ImportSshPublicKeyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSshPublicKeyRequest instance + * @returns ImportSshPublicKeyRequest instance */ - public static create(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static create(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyRequest): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; /** - * 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 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.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, 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 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.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. + * 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 UpdateSshPublicKeyRequest + * @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.UpdateSshPublicKeyRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSshPublicKeyRequest + * @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.UpdateSshPublicKeyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; /** - * Verifies an UpdateSshPublicKeyRequest message. + * 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 UpdateSshPublicKeyRequest 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. * @param object Plain object - * @returns UpdateSshPublicKeyRequest + * @returns ImportSshPublicKeyRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyRequest; /** - * Creates a plain object from an UpdateSshPublicKeyRequest message. Also converts values to other types if specified. - * @param message UpdateSshPublicKeyRequest + * 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.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSshPublicKeyRequest to JSON. + * Converts this ImportSshPublicKeyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - } - - /** 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); + /** Properties of an ImportSshPublicKeyResponse. */ + interface IImportSshPublicKeyResponse { - /** PosixAccount name */ - name?: (string|null); + /** ImportSshPublicKeyResponse loginProfile */ + loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); } - /** Represents a PosixAccount. */ - class PosixAccount implements IPosixAccount { + /** Represents an ImportSshPublicKeyResponse. */ + class ImportSshPublicKeyResponse implements IImportSshPublicKeyResponse { /** - * Constructs a new PosixAccount. + * Constructs a new ImportSshPublicKeyResponse. * @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); + constructor(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse); - /** PosixAccount name. */ - public name: string; + /** ImportSshPublicKeyResponse loginProfile. */ + public loginProfile?: (google.cloud.oslogin.v1.ILoginProfile|null); /** - * Creates a new PosixAccount instance using the specified properties. + * Creates a new ImportSshPublicKeyResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PosixAccount instance + * @returns ImportSshPublicKeyResponse instance */ - public static create(properties?: google.cloud.oslogin.common.IPosixAccount): google.cloud.oslogin.common.PosixAccount; + public static create(properties?: google.cloud.oslogin.v1.IImportSshPublicKeyResponse): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; /** - * 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 + * 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.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, 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 + * 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.common.IPosixAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.v1.IImportSshPublicKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PosixAccount message from the specified reader or buffer. + * 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 PosixAccount + * @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.common.PosixAccount; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; /** - * Decodes a PosixAccount message from the specified reader or buffer, length delimited. + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PosixAccount + * @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.common.PosixAccount; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; /** - * Verifies a PosixAccount message. + * 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 a PosixAccount 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. * @param object Plain object - * @returns PosixAccount + * @returns ImportSshPublicKeyResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.PosixAccount; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.ImportSshPublicKeyResponse; /** - * Creates a plain object from a PosixAccount message. Also converts values to other types if specified. - * @param message PosixAccount + * 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.common.PosixAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.v1.ImportSshPublicKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PosixAccount to JSON. + * Converts this ImportSshPublicKeyResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SshPublicKey. */ - interface ISshPublicKey { - - /** SshPublicKey key */ - key?: (string|null); + /** Properties of an UpdateSshPublicKeyRequest. */ + interface IUpdateSshPublicKeyRequest { - /** SshPublicKey expirationTimeUsec */ - expirationTimeUsec?: (number|Long|string|null); + /** UpdateSshPublicKeyRequest name */ + name?: (string|null); - /** SshPublicKey fingerprint */ - fingerprint?: (string|null); + /** UpdateSshPublicKeyRequest sshPublicKey */ + sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); - /** SshPublicKey name */ - name?: (string|null); + /** UpdateSshPublicKeyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a SshPublicKey. */ - class SshPublicKey implements ISshPublicKey { + /** Represents an UpdateSshPublicKeyRequest. */ + class UpdateSshPublicKeyRequest implements IUpdateSshPublicKeyRequest { /** - * Constructs a new SshPublicKey. + * Constructs a new UpdateSshPublicKeyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.oslogin.common.ISshPublicKey); - - /** SshPublicKey key. */ - public key: string; + constructor(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest); - /** SshPublicKey expirationTimeUsec. */ - public expirationTimeUsec: (number|Long|string); + /** UpdateSshPublicKeyRequest name. */ + public name: string; - /** SshPublicKey fingerprint. */ - public fingerprint: string; + /** UpdateSshPublicKeyRequest sshPublicKey. */ + public sshPublicKey?: (google.cloud.oslogin.common.ISshPublicKey|null); - /** SshPublicKey name. */ - public name: string; + /** UpdateSshPublicKeyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new SshPublicKey instance using the specified properties. + * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SshPublicKey instance + * @returns UpdateSshPublicKeyRequest instance */ - public static create(properties?: google.cloud.oslogin.common.ISshPublicKey): google.cloud.oslogin.common.SshPublicKey; + public static create(properties?: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * 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 + * 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.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, 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 + * 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.common.ISshPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SshPublicKey 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 SshPublicKey + * @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.common.SshPublicKey; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Decodes a SshPublicKey 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 SshPublicKey + * @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.common.SshPublicKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Verifies a SshPublicKey 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 a SshPublicKey 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 SshPublicKey + * @returns UpdateSshPublicKeyRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.common.SshPublicKey; + public static fromObject(object: { [k: string]: any }): google.cloud.oslogin.v1.UpdateSshPublicKeyRequest; /** - * Creates a plain object from a SshPublicKey message. Also converts values to other types if specified. - * @param message SshPublicKey + * 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.common.SshPublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.oslogin.v1.UpdateSshPublicKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SshPublicKey to JSON. + * Converts this UpdateSshPublicKeyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -2128,18 +2128,254 @@ export namespace google { */ 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 }; - } - } + /** + * 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 }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - } - - /** Namespace api. */ - namespace api { /** Properties of a Http. */ interface IHttp { @@ -2479,242 +2715,6 @@ 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 f778f9c142a..6241e398cf5 100644 --- a/packages/google-cloud-oslogin/protos/protos.js +++ b/packages/google-cloud-oslogin/protos/protos.js @@ -57,397 +57,265 @@ */ var oslogin = {}; - oslogin.v1 = (function() { + oslogin.common = (function() { /** - * Namespace v1. + * Namespace common. * @memberof google.cloud.oslogin * @namespace */ - var v1 = {}; - - v1.OsLoginService = (function() { + var common = {}; - /** - * 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); - } + /** + * 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; + })(); - (OsLoginService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsLoginService; + common.PosixAccount = (function() { /** - * 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. + * 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 */ - 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 + * 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]]; + } /** - * Calls DeletePosixAccount. - * @function deletePosixAccount - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount primary. + * @member {boolean} primary + * @memberof google.cloud.oslogin.common.PosixAccount * @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" }); + PosixAccount.prototype.primary = false; /** - * Calls DeletePosixAccount. - * @function deletePosixAccount - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount username. + * @member {string} username + * @memberof google.cloud.oslogin.common.PosixAccount * @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 */ + PosixAccount.prototype.username = ""; /** - * Calls DeleteSshPublicKey. - * @function deleteSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount uid. + * @member {number|Long} uid + * @memberof google.cloud.oslogin.common.PosixAccount * @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" }); + PosixAccount.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Calls DeleteSshPublicKey. - * @function deleteSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount gid. + * @member {number|Long} gid + * @memberof google.cloud.oslogin.common.PosixAccount * @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 */ + PosixAccount.prototype.gid = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Calls GetLoginProfile. - * @function getLoginProfile - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount homeDirectory. + * @member {string} homeDirectory + * @memberof google.cloud.oslogin.common.PosixAccount * @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" }); + PosixAccount.prototype.homeDirectory = ""; /** - * Calls GetLoginProfile. - * @function getLoginProfile - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount shell. + * @member {string} shell + * @memberof google.cloud.oslogin.common.PosixAccount * @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 */ + PosixAccount.prototype.shell = ""; /** - * Calls GetSshPublicKey. - * @function getSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount gecos. + * @member {string} gecos + * @memberof google.cloud.oslogin.common.PosixAccount * @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" }); + PosixAccount.prototype.gecos = ""; /** - * Calls GetSshPublicKey. - * @function getSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount systemId. + * @member {string} systemId + * @memberof google.cloud.oslogin.common.PosixAccount * @instance - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} request GetSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + PosixAccount.prototype.systemId = ""; /** - * 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 + * PosixAccount accountId. + * @member {string} accountId + * @memberof google.cloud.oslogin.common.PosixAccount + * @instance */ + PosixAccount.prototype.accountId = ""; /** - * Calls ImportSshPublicKey. - * @function importSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount operatingSystemType. + * @member {google.cloud.oslogin.common.OperatingSystemType} operatingSystemType + * @memberof google.cloud.oslogin.common.PosixAccount * @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" }); + PosixAccount.prototype.operatingSystemType = 0; /** - * Calls ImportSshPublicKey. - * @function importSshPublicKey - * @memberof google.cloud.oslogin.v1.OsLoginService + * PosixAccount name. + * @member {string} name + * @memberof google.cloud.oslogin.common.PosixAccount * @instance - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} request ImportSshPublicKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + PosixAccount.prototype.name = ""; /** - * 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 + * 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 */ + PosixAccount.create = function create(properties) { + return new PosixAccount(properties); + }; /** - * 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.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. + * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile 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 */ - LoginProfile.encode = function encode(message, writer) { + PosixAccount.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 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(); - } + writer.uint32(/* id 11, wireType 2 =*/90).string(message.name); return writer; }; /** - * Encodes the specified LoginProfile message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.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.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.ILoginProfile} message LoginProfile 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 */ - LoginProfile.encodeDelimited = function encodeDelimited(message, writer) { + PosixAccount.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoginProfile message from the specified reader or buffer. + * Decodes a PosixAccount message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.LoginProfile + * @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.LoginProfile} LoginProfile + * @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 */ - LoginProfile.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.LoginProfile(), key, value; + 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.name = reader.string(); + message.primary = reader.bool(); break; case 2: - if (!(message.posixAccounts && message.posixAccounts.length)) - message.posixAccounts = []; - message.posixAccounts.push($root.google.cloud.oslogin.common.PosixAccount.decode(reader, reader.uint32())); + message.username = reader.string(); break; case 3: - if (message.sshPublicKeys === $util.emptyObject) - message.sshPublicKeys = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.sshPublicKeys[key] = value; + 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); @@ -458,161 +326,237 @@ }; /** - * Decodes a LoginProfile 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.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile + * @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 */ - LoginProfile.decodeDelimited = function decodeDelimited(reader) { + PosixAccount.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoginProfile message. + * Verifies a PosixAccount message. * @function verify - * @memberof google.cloud.oslogin.v1.LoginProfile + * @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 */ - LoginProfile.verify = function verify(message) { + PosixAccount.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 LoginProfile 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.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile + * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount */ - LoginProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.LoginProfile) + PosixAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.common.PosixAccount) return object; - var message = new $root.google.cloud.oslogin.v1.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); - 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 PosixAccount message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @static - * @param {google.cloud.oslogin.v1.LoginProfile} message LoginProfile + * @param {google.cloud.oslogin.common.PosixAccount} message PosixAccount * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoginProfile.toObject = function toObject(message, options) { + PosixAccount.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) + 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; - 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 PosixAccount to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.LoginProfile + * @memberof google.cloud.oslogin.common.PosixAccount * @instance * @returns {Object.} JSON object */ - LoginProfile.prototype.toJSON = function toJSON() { + PosixAccount.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LoginProfile; + return PosixAccount; })(); - v1.DeletePosixAccountRequest = (function() { + common.SshPublicKey = (function() { /** - * Properties of a DeletePosixAccountRequest. - * @memberof google.cloud.oslogin.v1 - * @interface IDeletePosixAccountRequest - * @property {string|null} [name] DeletePosixAccountRequest name + * 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 DeletePosixAccountRequest. - * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a DeletePosixAccountRequest. - * @implements IDeletePosixAccountRequest + * Constructs a new SshPublicKey. + * @memberof google.cloud.oslogin.common + * @classdesc Represents a SshPublicKey. + * @implements ISshPublicKey * @constructor - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set */ - function DeletePosixAccountRequest(properties) { + function SshPublicKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -620,74 +564,113 @@ } /** - * DeletePosixAccountRequest name. + * 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. * @member {string} name - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance */ - DeletePosixAccountRequest.prototype.name = ""; + SshPublicKey.prototype.name = ""; /** - * Creates a new DeletePosixAccountRequest instance using the specified properties. + * Creates a new SshPublicKey instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest instance + * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey instance */ - DeletePosixAccountRequest.create = function create(properties) { - return new DeletePosixAccountRequest(properties); + SshPublicKey.create = function create(properties) { + return new SshPublicKey(properties); }; /** - * Encodes the specified DeletePosixAccountRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.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.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest 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 */ - DeletePosixAccountRequest.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); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified DeletePosixAccountRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.DeletePosixAccountRequest.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.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest} message DeletePosixAccountRequest 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 */ - DeletePosixAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + SshPublicKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePosixAccountRequest message from the specified reader or buffer. + * Decodes a SshPublicKey message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @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.DeletePosixAccountRequest} DeletePosixAccountRequest + * @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 */ - DeletePosixAccountRequest.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.DeletePosixAccountRequest(); + 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.key = reader.string(); + break; + case 2: + message.expirationTimeUsec = reader.int64(); + break; + case 3: + message.fingerprint = reader.string(); + break; + case 4: message.name = reader.string(); break; default: @@ -699,32 +682,41 @@ }; /** - * Decodes a DeletePosixAccountRequest 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.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest + * @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 */ - DeletePosixAccountRequest.decodeDelimited = function decodeDelimited(reader) { + SshPublicKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePosixAccountRequest message. + * Verifies a SshPublicKey message. * @function verify - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @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 */ - DeletePosixAccountRequest.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"; @@ -732,263 +724,353 @@ }; /** - * Creates a DeletePosixAccountRequest 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.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest + * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey */ - DeletePosixAccountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.DeletePosixAccountRequest) + SshPublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.common.SshPublicKey) return object; - var message = new $root.google.cloud.oslogin.v1.DeletePosixAccountRequest(); + 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); return message; }; /** - * Creates a plain object from a DeletePosixAccountRequest 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.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @static - * @param {google.cloud.oslogin.v1.DeletePosixAccountRequest} message DeletePosixAccountRequest + * @param {google.cloud.oslogin.common.SshPublicKey} message SshPublicKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePosixAccountRequest.toObject = function toObject(message, options) { + SshPublicKey.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + 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 = ""; + } + 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 DeletePosixAccountRequest to JSON. + * Converts this SshPublicKey to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest + * @memberof google.cloud.oslogin.common.SshPublicKey * @instance * @returns {Object.} JSON object */ - DeletePosixAccountRequest.prototype.toJSON = function toJSON() { + SshPublicKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeletePosixAccountRequest; + return SshPublicKey; })(); - v1.DeleteSshPublicKeyRequest = (function() { + return common; + })(); - /** - * Properties of a DeleteSshPublicKeyRequest. - * @memberof google.cloud.oslogin.v1 - * @interface IDeleteSshPublicKeyRequest - * @property {string|null} [name] DeleteSshPublicKeyRequest name - */ + oslogin.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.oslogin + * @namespace + */ + var v1 = {}; + + v1.OsLoginService = (function() { /** - * Constructs a new DeleteSshPublicKeyRequest. + * Constructs a new OsLoginService service. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a DeleteSshPublicKeyRequest. - * @implements IDeleteSshPublicKeyRequest + * @classdesc Represents an OsLoginService + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set + * @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 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]]; + function OsLoginService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * DeleteSshPublicKeyRequest name. - * @member {string} name - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - * @instance - */ - DeleteSshPublicKeyRequest.prototype.name = ""; + (OsLoginService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsLoginService; /** - * Creates a new DeleteSshPublicKeyRequest instance using the specified properties. + * Creates new OsLoginService service using the specified rpc implementation. * @function create - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.OsLoginService * @static - * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest instance + * @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. */ - DeleteSshPublicKeyRequest.create = function create(properties) { - return new DeleteSshPublicKeyRequest(properties); + OsLoginService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified DeleteSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - * @static - * @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 + * 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 */ - 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); - return writer; - }; /** - * 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.DeleteSshPublicKeyRequest - * @static - * @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 + * 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 */ - DeleteSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + 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" }); /** - * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer. - * @function decode - * @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.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * 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 */ - 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.DeleteSshPublicKeyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 + * 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 */ - DeleteSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a DeleteSshPublicKeyRequest message. - * @function verify - * @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 + * 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 */ - 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"; - return null; - }; + 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" }); /** - * Creates a DeleteSshPublicKeyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest + * 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 */ - DeleteSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest) - return object; - var message = new $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); - 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. - * @function toObject - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - * @static - * @param {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * 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 */ - DeleteSshPublicKeyRequest.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; - return object; - }; /** - * Converts this DeleteSshPublicKeyRequest to JSON. - * @function toJSON - * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + * Calls GetLoginProfile. + * @function getLoginProfile + * @memberof google.cloud.oslogin.v1.OsLoginService * @instance - * @returns {Object.} JSON object + * @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 */ - DeleteSshPublicKeyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + 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" }); - return DeleteSshPublicKeyRequest; + /** + * 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; })(); - v1.GetLoginProfileRequest = (function() { + v1.LoginProfile = (function() { /** - * Properties of a GetLoginProfileRequest. + * Properties of a LoginProfile. * @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 ILoginProfile + * @property {string|null} [name] LoginProfile name + * @property {Array.|null} [posixAccounts] LoginProfile posixAccounts + * @property {Object.|null} [sshPublicKeys] LoginProfile sshPublicKeys */ /** - * Constructs a new GetLoginProfileRequest. + * Constructs a new LoginProfile. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a GetLoginProfileRequest. - * @implements IGetLoginProfileRequest + * @classdesc Represents a LoginProfile. + * @implements ILoginProfile * @constructor - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set */ - function GetLoginProfileRequest(properties) { + 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) @@ -996,90 +1078,94 @@ } /** - * GetLoginProfileRequest name. + * LoginProfile name. * @member {string} name - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @instance */ - GetLoginProfileRequest.prototype.name = ""; + LoginProfile.prototype.name = ""; /** - * GetLoginProfileRequest projectId. - * @member {string} projectId - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * LoginProfile posixAccounts. + * @member {Array.} posixAccounts + * @memberof google.cloud.oslogin.v1.LoginProfile * @instance */ - GetLoginProfileRequest.prototype.projectId = ""; + LoginProfile.prototype.posixAccounts = $util.emptyArray; /** - * GetLoginProfileRequest systemId. - * @member {string} systemId - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * LoginProfile sshPublicKeys. + * @member {Object.} sshPublicKeys + * @memberof google.cloud.oslogin.v1.LoginProfile * @instance */ - GetLoginProfileRequest.prototype.systemId = ""; + LoginProfile.prototype.sshPublicKeys = $util.emptyObject; /** - * Creates a new GetLoginProfileRequest instance using the specified properties. + * Creates a new LoginProfile instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest instance + * @param {google.cloud.oslogin.v1.ILoginProfile=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile instance */ - GetLoginProfileRequest.create = function create(properties) { - return new GetLoginProfileRequest(properties); + LoginProfile.create = function create(properties) { + return new LoginProfile(properties); }; /** - * Encodes the specified GetLoginProfileRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. + * Encodes the specified LoginProfile message. Does not implicitly {@link google.cloud.oslogin.v1.LoginProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest 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 */ - GetLoginProfileRequest.encode = function encode(message, writer) { + LoginProfile.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); + 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 GetLoginProfileRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.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.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest} message GetLoginProfileRequest 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 */ - GetLoginProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + LoginProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetLoginProfileRequest message from the specified reader or buffer. + * Decodes a LoginProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @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.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @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 */ - GetLoginProfileRequest.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.v1.GetLoginProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.oslogin.v1.LoginProfile(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1087,10 +1173,31 @@ message.name = reader.string(); break; case 2: - message.projectId = 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.systemId = reader.string(); + if (message.sshPublicKeys === $util.emptyObject) + message.sshPublicKeys = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.sshPublicKeys[key] = value; break; default: reader.skipType(tag & 7); @@ -1101,124 +1208,161 @@ }; /** - * Decodes a GetLoginProfileRequest 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.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @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 */ - GetLoginProfileRequest.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 GetLoginProfileRequest message. + * Verifies a LoginProfile message. * @function verify - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @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 */ - GetLoginProfileRequest.verify = function verify(message) { + LoginProfile.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"; + 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 GetLoginProfileRequest 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.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest + * @returns {google.cloud.oslogin.v1.LoginProfile} LoginProfile */ - GetLoginProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.GetLoginProfileRequest) + LoginProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.LoginProfile) return object; - var message = new $root.google.cloud.oslogin.v1.GetLoginProfileRequest(); + var message = new $root.google.cloud.oslogin.v1.LoginProfile(); 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); + 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 GetLoginProfileRequest 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.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @static - * @param {google.cloud.oslogin.v1.GetLoginProfileRequest} message GetLoginProfileRequest + * @param {google.cloud.oslogin.v1.LoginProfile} message LoginProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetLoginProfileRequest.toObject = function toObject(message, options) { + LoginProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.arrays || options.defaults) + object.posixAccounts = []; + if (options.objects || options.defaults) + object.sshPublicKeys = {}; + 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; + 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 GetLoginProfileRequest to JSON. + * Converts this LoginProfile to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @memberof google.cloud.oslogin.v1.LoginProfile * @instance * @returns {Object.} JSON object */ - GetLoginProfileRequest.prototype.toJSON = function toJSON() { + LoginProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetLoginProfileRequest; + return LoginProfile; })(); - v1.GetSshPublicKeyRequest = (function() { + v1.DeletePosixAccountRequest = (function() { /** - * Properties of a GetSshPublicKeyRequest. + * Properties of a DeletePosixAccountRequest. * @memberof google.cloud.oslogin.v1 - * @interface IGetSshPublicKeyRequest - * @property {string|null} [name] GetSshPublicKeyRequest name + * @interface IDeletePosixAccountRequest + * @property {string|null} [name] DeletePosixAccountRequest name */ /** - * Constructs a new GetSshPublicKeyRequest. + * Constructs a new DeletePosixAccountRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents a GetSshPublicKeyRequest. - * @implements IGetSshPublicKeyRequest + * @classdesc Represents a DeletePosixAccountRequest. + * @implements IDeletePosixAccountRequest * @constructor - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set */ - function GetSshPublicKeyRequest(properties) { + function DeletePosixAccountRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1226,35 +1370,35 @@ } /** - * GetSshPublicKeyRequest name. + * DeletePosixAccountRequest name. * @member {string} name - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @instance */ - GetSshPublicKeyRequest.prototype.name = ""; + DeletePosixAccountRequest.prototype.name = ""; /** - * Creates a new GetSshPublicKeyRequest instance using the specified properties. + * Creates a new DeletePosixAccountRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IDeletePosixAccountRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest instance */ - GetSshPublicKeyRequest.create = function create(properties) { - return new GetSshPublicKeyRequest(properties); + DeletePosixAccountRequest.create = function create(properties) { + return new DeletePosixAccountRequest(properties); }; /** - * Encodes the specified GetSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.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.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest 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 */ - GetSshPublicKeyRequest.encode = function encode(message, writer) { + DeletePosixAccountRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -1263,33 +1407,33 @@ }; /** - * Encodes the specified GetSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.GetSshPublicKeyRequest.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.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest} message GetSshPublicKeyRequest 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 */ - GetSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeletePosixAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a DeletePosixAccountRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @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.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @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 */ - GetSshPublicKeyRequest.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.v1.GetSshPublicKeyRequest(); + 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) { @@ -1305,30 +1449,30 @@ }; /** - * Decodes a GetSshPublicKeyRequest 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.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @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 */ - GetSshPublicKeyRequest.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 GetSshPublicKeyRequest message. + * Verifies a DeletePosixAccountRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @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 */ - GetSshPublicKeyRequest.verify = function verify(message) { + DeletePosixAccountRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -1338,32 +1482,32 @@ }; /** - * Creates a GetSshPublicKeyRequest 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.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.DeletePosixAccountRequest} DeletePosixAccountRequest */ - GetSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest) + DeletePosixAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.DeletePosixAccountRequest) return object; - var message = new $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest(); + 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 GetSshPublicKeyRequest 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.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @static - * @param {google.cloud.oslogin.v1.GetSshPublicKeyRequest} message GetSshPublicKeyRequest + * @param {google.cloud.oslogin.v1.DeletePosixAccountRequest} message DeletePosixAccountRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSshPublicKeyRequest.toObject = function toObject(message, options) { + DeletePosixAccountRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -1375,39 +1519,37 @@ }; /** - * Converts this GetSshPublicKeyRequest to JSON. + * Converts this DeletePosixAccountRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeletePosixAccountRequest * @instance * @returns {Object.} JSON object */ - GetSshPublicKeyRequest.prototype.toJSON = function toJSON() { + DeletePosixAccountRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetSshPublicKeyRequest; + return DeletePosixAccountRequest; })(); - v1.ImportSshPublicKeyRequest = (function() { + v1.DeleteSshPublicKeyRequest = (function() { /** - * Properties of an ImportSshPublicKeyRequest. + * Properties of a DeleteSshPublicKeyRequest. * @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 IDeleteSshPublicKeyRequest + * @property {string|null} [name] DeleteSshPublicKeyRequest name */ /** - * Constructs a new ImportSshPublicKeyRequest. + * Constructs a new DeleteSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an ImportSshPublicKeyRequest. - * @implements IImportSshPublicKeyRequest + * @classdesc Represents a DeleteSshPublicKeyRequest. + * @implements IDeleteSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set */ - function ImportSshPublicKeyRequest(properties) { + function DeleteSshPublicKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1415,101 +1557,75 @@ } /** - * ImportSshPublicKeyRequest parent. - * @member {string} parent - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest - * @instance - */ - ImportSshPublicKeyRequest.prototype.parent = ""; - - /** - * ImportSshPublicKeyRequest sshPublicKey. - * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest - * @instance - */ - ImportSshPublicKeyRequest.prototype.sshPublicKey = null; - - /** - * ImportSshPublicKeyRequest projectId. - * @member {string} projectId - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * DeleteSshPublicKeyRequest name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @instance */ - ImportSshPublicKeyRequest.prototype.projectId = ""; + DeleteSshPublicKeyRequest.prototype.name = ""; /** - * Creates a new ImportSshPublicKeyRequest instance using the specified properties. + * Creates a new DeleteSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IDeleteSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest instance */ - ImportSshPublicKeyRequest.create = function create(properties) { - return new ImportSshPublicKeyRequest(properties); + DeleteSshPublicKeyRequest.create = function create(properties) { + return new DeleteSshPublicKeyRequest(properties); }; /** - * Encodes the specified ImportSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.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.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest 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 */ - ImportSshPublicKeyRequest.encode = function encode(message, writer) { + DeleteSshPublicKeyRequest.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.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ImportSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyRequest.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.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest} message ImportSshPublicKeyRequest 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 */ - ImportSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a DeleteSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @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.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * @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 */ - ImportSshPublicKeyRequest.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.ImportSshPublicKeyRequest(); + 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.parent = 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.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -1520,129 +1636,109 @@ }; /** - * Decodes an ImportSshPublicKeyRequest 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.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * @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 */ - ImportSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSshPublicKeyRequest message. + * Verifies a DeleteSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @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 */ - ImportSshPublicKeyRequest.verify = function verify(message) { + DeleteSshPublicKeyRequest.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.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportSshPublicKeyRequest 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.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} DeleteSshPublicKeyRequest */ - ImportSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest) + DeleteSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest) 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); + var message = new $root.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportSshPublicKeyRequest 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.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} message ImportSshPublicKeyRequest + * @param {google.cloud.oslogin.v1.DeleteSshPublicKeyRequest} message DeleteSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSshPublicKeyRequest.toObject = function toObject(message, options) { + DeleteSshPublicKeyRequest.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; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportSshPublicKeyRequest to JSON. + * Converts this DeleteSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.DeleteSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - ImportSshPublicKeyRequest.prototype.toJSON = function toJSON() { + DeleteSshPublicKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportSshPublicKeyRequest; + return DeleteSshPublicKeyRequest; })(); - v1.ImportSshPublicKeyResponse = (function() { + v1.GetLoginProfileRequest = (function() { /** - * Properties of an ImportSshPublicKeyResponse. + * Properties of a GetLoginProfileRequest. * @memberof google.cloud.oslogin.v1 - * @interface IImportSshPublicKeyResponse - * @property {google.cloud.oslogin.v1.ILoginProfile|null} [loginProfile] ImportSshPublicKeyResponse loginProfile + * @interface IGetLoginProfileRequest + * @property {string|null} [name] GetLoginProfileRequest name + * @property {string|null} [projectId] GetLoginProfileRequest projectId + * @property {string|null} [systemId] GetLoginProfileRequest systemId */ /** - * Constructs a new ImportSshPublicKeyResponse. + * Constructs a new GetLoginProfileRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an ImportSshPublicKeyResponse. - * @implements IImportSshPublicKeyResponse + * @classdesc Represents a GetLoginProfileRequest. + * @implements IGetLoginProfileRequest * @constructor - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set */ - function ImportSshPublicKeyResponse(properties) { + function GetLoginProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1650,75 +1746,101 @@ } /** - * ImportSshPublicKeyResponse loginProfile. - * @member {google.cloud.oslogin.v1.ILoginProfile|null|undefined} loginProfile - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * GetLoginProfileRequest name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @instance */ - ImportSshPublicKeyResponse.prototype.loginProfile = null; + GetLoginProfileRequest.prototype.name = ""; /** - * Creates a new ImportSshPublicKeyResponse instance using the specified properties. - * @function create - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse - * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse instance + * GetLoginProfileRequest projectId. + * @member {string} projectId + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @instance */ - ImportSshPublicKeyResponse.create = function create(properties) { - return new ImportSshPublicKeyResponse(properties); - }; + GetLoginProfileRequest.prototype.projectId = ""; /** - * Encodes the specified ImportSshPublicKeyResponse message. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse - * @static - * @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 + * GetLoginProfileRequest systemId. + * @member {string} systemId + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @instance */ - ImportSshPublicKeyResponse.encode = function encode(message, writer) { + GetLoginProfileRequest.prototype.systemId = ""; + + /** + * Creates a new GetLoginProfileRequest instance using the specified properties. + * @function create + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @static + * @param {google.cloud.oslogin.v1.IGetLoginProfileRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest instance + */ + GetLoginProfileRequest.create = function create(properties) { + return new GetLoginProfileRequest(properties); + }; + + /** + * Encodes the specified GetLoginProfileRequest message. Does not implicitly {@link google.cloud.oslogin.v1.GetLoginProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest + * @static + * @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 + */ + GetLoginProfileRequest.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.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 ImportSshPublicKeyResponse message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.ImportSshPublicKeyResponse.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.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse} message ImportSshPublicKeyResponse 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 */ - ImportSshPublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetLoginProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. + * Decodes a GetLoginProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @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.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @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 */ - ImportSshPublicKeyResponse.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.ImportSshPublicKeyResponse(); + 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.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.projectId = reader.string(); + break; + case 3: + message.systemId = reader.string(); break; default: reader.skipType(tag & 7); @@ -1729,114 +1851,124 @@ }; /** - * Decodes an ImportSshPublicKeyResponse 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.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @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 */ - ImportSshPublicKeyResponse.decodeDelimited = function decodeDelimited(reader) { + GetLoginProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportSshPublicKeyResponse message. + * Verifies a GetLoginProfileRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @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 */ - ImportSshPublicKeyResponse.verify = function verify(message) { + GetLoginProfileRequest.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.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 an ImportSshPublicKeyResponse 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.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse + * @returns {google.cloud.oslogin.v1.GetLoginProfileRequest} GetLoginProfileRequest */ - ImportSshPublicKeyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse) + GetLoginProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.GetLoginProfileRequest) 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.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 an ImportSshPublicKeyResponse 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.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @static - * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} message ImportSshPublicKeyResponse + * @param {google.cloud.oslogin.v1.GetLoginProfileRequest} message GetLoginProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportSshPublicKeyResponse.toObject = function toObject(message, options) { + GetLoginProfileRequest.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.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 ImportSshPublicKeyResponse to JSON. + * Converts this GetLoginProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse + * @memberof google.cloud.oslogin.v1.GetLoginProfileRequest * @instance * @returns {Object.} JSON object */ - ImportSshPublicKeyResponse.prototype.toJSON = function toJSON() { + GetLoginProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImportSshPublicKeyResponse; + return GetLoginProfileRequest; })(); - v1.UpdateSshPublicKeyRequest = (function() { + v1.GetSshPublicKeyRequest = (function() { /** - * Properties of an UpdateSshPublicKeyRequest. + * Properties of a GetSshPublicKeyRequest. * @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 + * @interface IGetSshPublicKeyRequest + * @property {string|null} [name] GetSshPublicKeyRequest name */ /** - * Constructs a new UpdateSshPublicKeyRequest. + * Constructs a new GetSshPublicKeyRequest. * @memberof google.cloud.oslogin.v1 - * @classdesc Represents an UpdateSshPublicKeyRequest. - * @implements IUpdateSshPublicKeyRequest + * @classdesc Represents a GetSshPublicKeyRequest. + * @implements IGetSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set */ - function UpdateSshPublicKeyRequest(properties) { + function GetSshPublicKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1844,102 +1976,76 @@ } /** - * UpdateSshPublicKeyRequest name. + * GetSshPublicKeyRequest name. * @member {string} name - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest - * @instance - */ - UpdateSshPublicKeyRequest.prototype.name = ""; - - /** - * UpdateSshPublicKeyRequest sshPublicKey. - * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest - * @instance - */ - UpdateSshPublicKeyRequest.prototype.sshPublicKey = null; - - /** - * UpdateSshPublicKeyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @instance */ - UpdateSshPublicKeyRequest.prototype.updateMask = null; + GetSshPublicKeyRequest.prototype.name = ""; /** - * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * Creates a new GetSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest instance + * @param {google.cloud.oslogin.v1.IGetSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest instance */ - UpdateSshPublicKeyRequest.create = function create(properties) { - return new UpdateSshPublicKeyRequest(properties); + GetSshPublicKeyRequest.create = function create(properties) { + return new GetSshPublicKeyRequest(properties); }; /** - * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.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.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest 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 */ - UpdateSshPublicKeyRequest.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")) 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(); return writer; }; /** - * Encodes the specified UpdateSshPublicKeyRequest message, length delimited. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.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.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest 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 */ - UpdateSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. + * Decodes a GetSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @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.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @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 */ - UpdateSshPublicKeyRequest.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.UpdateSshPublicKeyRequest(); + 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) { case 1: message.name = reader.string(); break; - case 2: - message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -1949,172 +2055,109 @@ }; /** - * Decodes an UpdateSshPublicKeyRequest 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.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @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 */ - UpdateSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + GetSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSshPublicKeyRequest message. + * Verifies a GetSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @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 */ - UpdateSshPublicKeyRequest.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")) 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 GetSshPublicKeyRequest 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.v1.GetSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @returns {google.cloud.oslogin.v1.GetSshPublicKeyRequest} GetSshPublicKeyRequest */ - UpdateSshPublicKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest) + GetSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest) return object; - var message = new $root.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest(); + var message = new $root.google.cloud.oslogin.v1.GetSshPublicKeyRequest(); 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 GetSshPublicKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} message UpdateSshPublicKeyRequest + * @param {google.cloud.oslogin.v1.GetSshPublicKeyRequest} message GetSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSshPublicKeyRequest.toObject = function toObject(message, options) { + GetSshPublicKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + 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. + * Converts this GetSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @memberof google.cloud.oslogin.v1.GetSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - UpdateSshPublicKeyRequest.prototype.toJSON = function toJSON() { + GetSshPublicKeyRequest.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; + return GetSshPublicKeyRequest; })(); - common.PosixAccount = (function() { + v1.ImportSshPublicKeyRequest = (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 + * Properties of an ImportSshPublicKeyRequest. + * @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 */ /** - * Constructs a new PosixAccount. - * @memberof google.cloud.oslogin.common - * @classdesc Represents a PosixAccount. - * @implements IPosixAccount + * Constructs a new ImportSshPublicKeyRequest. + * @memberof google.cloud.oslogin.v1 + * @classdesc Represents an ImportSshPublicKeyRequest. + * @implements IImportSshPublicKeyRequest * @constructor - * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set */ - function PosixAccount(properties) { + function ImportSshPublicKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2122,205 +2165,101 @@ } /** - * 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 - */ - PosixAccount.prototype.homeDirectory = ""; - - /** - * PosixAccount shell. - * @member {string} shell - * @memberof google.cloud.oslogin.common.PosixAccount - * @instance - */ - PosixAccount.prototype.shell = ""; - - /** - * PosixAccount gecos. - * @member {string} gecos - * @memberof google.cloud.oslogin.common.PosixAccount - * @instance - */ - PosixAccount.prototype.gecos = ""; - - /** - * PosixAccount systemId. - * @member {string} systemId - * @memberof google.cloud.oslogin.common.PosixAccount - * @instance - */ - PosixAccount.prototype.systemId = ""; - - /** - * PosixAccount accountId. - * @member {string} accountId - * @memberof google.cloud.oslogin.common.PosixAccount + * ImportSshPublicKeyRequest parent. + * @member {string} parent + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - PosixAccount.prototype.accountId = ""; + ImportSshPublicKeyRequest.prototype.parent = ""; /** - * PosixAccount operatingSystemType. - * @member {google.cloud.oslogin.common.OperatingSystemType} operatingSystemType - * @memberof google.cloud.oslogin.common.PosixAccount + * ImportSshPublicKeyRequest sshPublicKey. + * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - PosixAccount.prototype.operatingSystemType = 0; + ImportSshPublicKeyRequest.prototype.sshPublicKey = null; /** - * PosixAccount name. - * @member {string} name - * @memberof google.cloud.oslogin.common.PosixAccount + * ImportSshPublicKeyRequest projectId. + * @member {string} projectId + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance */ - PosixAccount.prototype.name = ""; + ImportSshPublicKeyRequest.prototype.projectId = ""; /** - * Creates a new PosixAccount instance using the specified properties. + * Creates a new ImportSshPublicKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.common.IPosixAccount=} [properties] Properties to set - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest instance */ - PosixAccount.create = function create(properties) { - return new PosixAccount(properties); + ImportSshPublicKeyRequest.create = function create(properties) { + return new ImportSshPublicKeyRequest(properties); }; /** - * Encodes the specified PosixAccount message. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.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.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount 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 */ - PosixAccount.encode = function encode(message, writer) { + ImportSshPublicKeyRequest.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); + 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 3, wireType 2 =*/26).string(message.projectId); return writer; }; /** - * Encodes the specified PosixAccount message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.PosixAccount.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.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.common.IPosixAccount} message PosixAccount 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 */ - PosixAccount.encodeDelimited = function encodeDelimited(message, writer) { + ImportSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PosixAccount message from the specified reader or buffer. + * Decodes an ImportSshPublicKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.common.PosixAccount + * @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.common.PosixAccount} PosixAccount + * @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 */ - PosixAccount.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.common.PosixAccount(); + 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.primary = reader.bool(); + message.parent = reader.string(); break; case 2: - message.username = reader.string(); + message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.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(); + message.projectId = reader.string(); break; default: reader.skipType(tag & 7); @@ -2331,237 +2270,129 @@ }; /** - * Decodes a PosixAccount 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.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount + * @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 */ - PosixAccount.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 PosixAccount message. + * Verifies an ImportSshPublicKeyRequest message. * @function verify - * @memberof google.cloud.oslogin.common.PosixAccount + * @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 */ - PosixAccount.verify = function verify(message) { + ImportSshPublicKeyRequest.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.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"; return null; }; /** - * Creates a PosixAccount 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.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.common.PosixAccount} PosixAccount + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} ImportSshPublicKeyRequest */ - PosixAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.common.PosixAccount) + ImportSshPublicKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyRequest) 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.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.name != null) - message.name = String(object.name); + if (object.projectId != null) + message.projectId = String(object.projectId); return message; }; /** - * Creates a plain object from a PosixAccount 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.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @static - * @param {google.cloud.oslogin.common.PosixAccount} message PosixAccount + * @param {google.cloud.oslogin.v1.ImportSshPublicKeyRequest} message ImportSshPublicKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PosixAccount.toObject = function toObject(message, options) { + ImportSshPublicKeyRequest.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; - object.name = ""; + object.parent = ""; + object.sshPublicKey = null; + object.projectId = ""; } - 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.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; }; /** - * Converts this PosixAccount to JSON. + * Converts this ImportSshPublicKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.oslogin.common.PosixAccount + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyRequest * @instance * @returns {Object.} JSON object */ - PosixAccount.prototype.toJSON = function toJSON() { + ImportSshPublicKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PosixAccount; + return ImportSshPublicKeyRequest; })(); - common.SshPublicKey = (function() { + v1.ImportSshPublicKeyResponse = (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 an ImportSshPublicKeyResponse. + * @memberof google.cloud.oslogin.v1 + * @interface IImportSshPublicKeyResponse + * @property {google.cloud.oslogin.v1.ILoginProfile|null} [loginProfile] ImportSshPublicKeyResponse loginProfile */ /** - * Constructs a new SshPublicKey. - * @memberof google.cloud.oslogin.common - * @classdesc Represents a SshPublicKey. - * @implements ISshPublicKey - * @constructor - * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set + * 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 */ - function SshPublicKey(properties) { + function ImportSshPublicKeyResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2569,114 +2400,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. - * @member {string} name - * @memberof google.cloud.oslogin.common.SshPublicKey + * ImportSshPublicKeyResponse loginProfile. + * @member {google.cloud.oslogin.v1.ILoginProfile|null|undefined} loginProfile + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @instance */ - SshPublicKey.prototype.name = ""; + ImportSshPublicKeyResponse.prototype.loginProfile = null; /** - * Creates a new SshPublicKey instance using the specified properties. + * Creates a new ImportSshPublicKeyResponse instance using the specified properties. * @function create - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.common.ISshPublicKey=} [properties] Properties to set - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey instance + * @param {google.cloud.oslogin.v1.IImportSshPublicKeyResponse=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse instance */ - SshPublicKey.create = function create(properties) { - return new SshPublicKey(properties); + ImportSshPublicKeyResponse.create = function create(properties) { + return new ImportSshPublicKeyResponse(properties); }; /** - * Encodes the specified SshPublicKey message. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.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.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey 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 */ - SshPublicKey.encode = function encode(message, writer) { + ImportSshPublicKeyResponse.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); + 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 SshPublicKey message, length delimited. Does not implicitly {@link google.cloud.oslogin.common.SshPublicKey.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.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.common.ISshPublicKey} message SshPublicKey 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 */ - SshPublicKey.encodeDelimited = function encodeDelimited(message, writer) { + ImportSshPublicKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SshPublicKey message from the specified reader or buffer. + * Decodes an ImportSshPublicKeyResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.oslogin.common.SshPublicKey + * @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.common.SshPublicKey} SshPublicKey + * @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 */ - SshPublicKey.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.common.SshPublicKey(); + 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.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.loginProfile = $root.google.cloud.oslogin.v1.LoginProfile.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2687,163 +2479,371 @@ }; /** - * Decodes a SshPublicKey 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.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey + * @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 */ - SshPublicKey.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 SshPublicKey message. + * Verifies an ImportSshPublicKeyResponse message. * @function verify - * @memberof google.cloud.oslogin.common.SshPublicKey + * @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 */ - SshPublicKey.verify = function verify(message) { + ImportSshPublicKeyResponse.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.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 SshPublicKey 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.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.oslogin.common.SshPublicKey} SshPublicKey + * @returns {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} ImportSshPublicKeyResponse */ - SshPublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.oslogin.common.SshPublicKey) + ImportSshPublicKeyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.oslogin.v1.ImportSshPublicKeyResponse) 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); - 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 SshPublicKey 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.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @static - * @param {google.cloud.oslogin.common.SshPublicKey} message SshPublicKey + * @param {google.cloud.oslogin.v1.ImportSshPublicKeyResponse} message ImportSshPublicKeyResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SshPublicKey.toObject = function toObject(message, options) { + ImportSshPublicKeyResponse.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 = ""; - } - 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 (options.defaults) + 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 SshPublicKey to JSON. + * Converts this ImportSshPublicKeyResponse to JSON. * @function toJSON - * @memberof google.cloud.oslogin.common.SshPublicKey + * @memberof google.cloud.oslogin.v1.ImportSshPublicKeyResponse * @instance * @returns {Object.} JSON object */ - SshPublicKey.prototype.toJSON = function toJSON() { + ImportSshPublicKeyResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SshPublicKey; + return ImportSshPublicKeyResponse; })(); - return common; - })(); - - oslogin.v1beta = (function() { - - /** - * Namespace v1beta. - * @memberof google.cloud.oslogin - * @namespace - */ - var v1beta = {}; + v1.UpdateSshPublicKeyRequest = (function() { - v1beta.OsLoginService = (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 + */ /** - * Constructs a new OsLoginService service. - * @memberof google.cloud.oslogin.v1beta - * @classdesc Represents an OsLoginService - * @extends $protobuf.rpc.Service + * Constructs a new UpdateSshPublicKeyRequest. + * @memberof google.cloud.oslogin.v1 + * @classdesc Represents an UpdateSshPublicKeyRequest. + * @implements IUpdateSshPublicKeyRequest * @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 + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set */ - function OsLoginService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + 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]]; } - (OsLoginService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = OsLoginService; + /** + * UpdateSshPublicKeyRequest name. + * @member {string} name + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @instance + */ + UpdateSshPublicKeyRequest.prototype.name = ""; /** - * Creates new OsLoginService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.oslogin.v1beta.OsLoginService - * @static + * UpdateSshPublicKeyRequest sshPublicKey. + * @member {google.cloud.oslogin.common.ISshPublicKey|null|undefined} sshPublicKey + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @instance + */ + UpdateSshPublicKeyRequest.prototype.sshPublicKey = null; + + /** + * UpdateSshPublicKeyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @instance + */ + UpdateSshPublicKeyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSshPublicKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @static + * @param {google.cloud.oslogin.v1.IUpdateSshPublicKeyRequest=} [properties] Properties to set + * @returns {google.cloud.oslogin.v1.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest instance + */ + UpdateSshPublicKeyRequest.create = function create(properties) { + return new UpdateSshPublicKeyRequest(properties); + }; + + /** + * Encodes the specified UpdateSshPublicKeyRequest message. Does not implicitly {@link google.cloud.oslogin.v1.UpdateSshPublicKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @static + * @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 + */ + UpdateSshPublicKeyRequest.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.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(); + return writer; + }; + + /** + * 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.UpdateSshPublicKeyRequest + * @static + * @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 + */ + UpdateSshPublicKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer. + * @function decode + * @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.UpdateSshPublicKeyRequest} UpdateSshPublicKeyRequest + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.sshPublicKey = $root.google.cloud.oslogin.common.SshPublicKey.decode(reader, reader.uint32()); + break; + case 3: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSshPublicKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + UpdateSshPublicKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSshPublicKeyRequest message. + * @function verify + * @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 + */ + UpdateSshPublicKeyRequest.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.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. + * @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.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.cloud.oslogin + * @namespace + */ + var v1beta = {}; + + v1beta.OsLoginService = (function() { + + /** + * Constructs a new OsLoginService service. + * @memberof google.cloud.oslogin.v1beta + * @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.v1beta.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 @@ -4832,26 +4832,52 @@ */ var api = {}; - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + /** + * 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 ResourceDescriptor. + * @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 + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4859,91 +4885,143 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * 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 + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http 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 */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.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.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 Http message, length delimited. Does not implicitly {@link google.api.Http.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.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http 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 */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.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.Http(); + 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: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + 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(); break; default: reader.skipType(tag & 7); @@ -4954,143 +5032,196 @@ }; /** - * Decodes a Http 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.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.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 Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + ResourceDescriptor.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.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.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean 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.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 Http 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.Http + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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]); - } + 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.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; + 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 Http 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.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.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); + object.pattern = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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.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 Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + /** + * 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.HttpRule = (function() { + api.ResourceReference = (function() { /** - * Properties of a HttpRule. + * Properties of a ResourceReference. * @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 IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new HttpRule. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5098,453 +5229,210 @@ } /** - * 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 - */ - HttpRule.prototype.patch = ""; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule 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 */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.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.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.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.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule 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 */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - 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.selector = reader.string(); - break; - case 2: - 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 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 + * @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 */ - 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; + 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.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + 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 null; }; /** - * Creates a HttpRule 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.HttpRule + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceReference} ResourceReference */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) 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); - } - 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]); - } - } + 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 HttpRule 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.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; 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"; - } - 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); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + 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 HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5552,88 +5440,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern 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 */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.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.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.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.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern 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 */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.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.CustomHttpPattern(); + 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.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -5644,144 +5535,143 @@ }; /** - * Decodes a CustomHttpPattern 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.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.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 CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + Http.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.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"; return null; }; /** - * Creates a CustomHttpPattern 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.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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.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); return message; }; /** - * Creates a plain object from a CustomHttpPattern 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.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + 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 (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * 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; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @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 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 ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5789,143 +5679,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = ""; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = ""; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor 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 */ - ResourceDescriptor.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.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.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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.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.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor 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 */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.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.ResourceDescriptor(); + 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: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + 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); @@ -5936,196 +5892,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.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"; + 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.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.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.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.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 ResourceDescriptor 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.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) 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]); + 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.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.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.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); return message; }; /** - * Creates a plain object from a ResourceDescriptor 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.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.pattern = []; + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - 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.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.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.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 ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * 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; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6133,88 +6133,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference 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 */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.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.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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.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.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference 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 */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.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.ResourceReference(); + 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: - message.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -6225,96 +6225,96 @@ }; /** - * Decodes a ResourceReference 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.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.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 ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.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"; + 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 ResourceReference 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.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) 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.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 ResourceReference 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.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; diff --git a/packages/google-cloud-oslogin/protos/protos.json b/packages/google-cloud-oslogin/protos/protos.json index 6edf972f9c9..37e140ae4f1 100644 --- a/packages/google-cloud-oslogin/protos/protos.json +++ b/packages/google-cloud-oslogin/protos/protos.json @@ -6,6 +6,115 @@ "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", @@ -276,115 +385,6 @@ } } }, - "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", @@ -662,12 +662,94 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "ClientProto", "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, @@ -770,88 +852,6 @@ "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 fc7cef92246..23d75dbcd9c 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,33 +21,27 @@ }, "methods": { "DeletePosixAccount": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetLoginProfile": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ImportSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_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 43375494958..46f125ed586 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,3 +1,4 @@ [ + "../../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 6dba4859a32..7dd85e22bf1 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,33 +21,27 @@ }, "methods": { "DeletePosixAccount": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetLoginProfile": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ImportSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "retry_codes_name": "non_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 329c216d48e..078ed1d537d 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,3 +1,4 @@ [ + "../../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 5b50d6ff5ca..92787e4a699 100644 --- a/packages/google-cloud-oslogin/synth.metadata +++ b/packages/google-cloud-oslogin/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-os-login.git", - "sha": "e2547a90031a46a4ad044318c26c160d8fb04ff6" + "sha": "fc5bef388545dfa48efa27a3ea9620ccbf8d0d86" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", - "internalRef": "343187793" + "sha": "ff715bf31a53a32d0901564f0a277ea25ed1b628", + "internalRef": "344845744" } }, {