diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto index 2f97b4c8c17..d1f19c33888 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto @@ -19,6 +19,7 @@ package google.cloud.backupdr.v1; import "google/api/field_behavior.proto"; import "google/api/field_info.proto"; import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupvault_alloydb.proto"; import "google/cloud/backupdr/v1/backupvault_cloudsql.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -126,6 +127,11 @@ message BackupPlanAssociation { CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDB cluster's backup plan association properties. + AlloyDBClusterBackupPlanAssociationProperties + alloydb_cluster_backup_plan_association_properties = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. The user friendly revision ID of the `BackupPlanRevision`. diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_alloydb.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_alloydb.proto index b97d684d911..e6b39b933b5 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_alloydb.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_alloydb.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.backupdr.v1; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; option csharp_namespace = "Google.Cloud.BackupDR.V1"; @@ -61,3 +62,12 @@ message AlloyDbClusterBackupProperties { // backup was taken. string database_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Properties for an AlloyDB cluster backup plan association. +message AlloyDBClusterBackupPlanAssociationProperties { + // Output only. The cluster UID of the AlloyDB cluster. + string cluster_uid = 1 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} diff --git a/packages/google-cloud-backupdr/protos/protos.d.ts b/packages/google-cloud-backupdr/protos/protos.d.ts index ec5a7762b63..7adb3c46290 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -4173,6 +4173,9 @@ export namespace google { /** BackupPlanAssociation cloudSqlInstanceBackupPlanAssociationProperties */ cloudSqlInstanceBackupPlanAssociationProperties?: (google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties|null); + /** BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties */ + alloydbClusterBackupPlanAssociationProperties?: (google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties|null); + /** BackupPlanAssociation backupPlanRevisionId */ backupPlanRevisionId?: (string|null); @@ -4219,6 +4222,9 @@ export namespace google { /** BackupPlanAssociation cloudSqlInstanceBackupPlanAssociationProperties. */ public cloudSqlInstanceBackupPlanAssociationProperties?: (google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties|null); + /** BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties. */ + public alloydbClusterBackupPlanAssociationProperties?: (google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties|null); + /** BackupPlanAssociation backupPlanRevisionId. */ public backupPlanRevisionId: string; @@ -4226,7 +4232,7 @@ export namespace google { public backupPlanRevisionName: string; /** BackupPlanAssociation resourceProperties. */ - public resourceProperties?: "cloudSqlInstanceBackupPlanAssociationProperties"; + public resourceProperties?: ("cloudSqlInstanceBackupPlanAssociationProperties"|"alloydbClusterBackupPlanAssociationProperties"); /** * Creates a new BackupPlanAssociation instance using the specified properties. @@ -5433,6 +5439,315 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AlloyDBClusterDataSourceProperties. */ + interface IAlloyDBClusterDataSourceProperties { + + /** AlloyDBClusterDataSourceProperties name */ + name?: (string|null); + } + + /** Represents an AlloyDBClusterDataSourceProperties. */ + class AlloyDBClusterDataSourceProperties implements IAlloyDBClusterDataSourceProperties { + + /** + * Constructs a new AlloyDBClusterDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties); + + /** AlloyDBClusterDataSourceProperties name. */ + public name: string; + + /** + * Creates a new AlloyDBClusterDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDBClusterDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties): google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties; + + /** + * Encodes the specified AlloyDBClusterDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. + * @param message AlloyDBClusterDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDBClusterDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. + * @param message AlloyDBClusterDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDBClusterDataSourceProperties + * @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.backupdr.v1.AlloyDBClusterDataSourceProperties; + + /** + * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDBClusterDataSourceProperties + * @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.backupdr.v1.AlloyDBClusterDataSourceProperties; + + /** + * Verifies an AlloyDBClusterDataSourceProperties 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 AlloyDBClusterDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDBClusterDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties; + + /** + * Creates a plain object from an AlloyDBClusterDataSourceProperties message. Also converts values to other types if specified. + * @param message AlloyDBClusterDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDBClusterDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDBClusterDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDbClusterBackupProperties. */ + interface IAlloyDbClusterBackupProperties { + + /** AlloyDbClusterBackupProperties description */ + description?: (string|null); + + /** AlloyDbClusterBackupProperties storedBytes */ + storedBytes?: (number|Long|string|null); + + /** AlloyDbClusterBackupProperties chainId */ + chainId?: (string|null); + + /** AlloyDbClusterBackupProperties databaseVersion */ + databaseVersion?: (string|null); + } + + /** Represents an AlloyDbClusterBackupProperties. */ + class AlloyDbClusterBackupProperties implements IAlloyDbClusterBackupProperties { + + /** + * Constructs a new AlloyDbClusterBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties); + + /** AlloyDbClusterBackupProperties description. */ + public description?: (string|null); + + /** AlloyDbClusterBackupProperties storedBytes. */ + public storedBytes: (number|Long|string); + + /** AlloyDbClusterBackupProperties chainId. */ + public chainId: string; + + /** AlloyDbClusterBackupProperties databaseVersion. */ + public databaseVersion: string; + + /** + * Creates a new AlloyDbClusterBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDbClusterBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties): google.cloud.backupdr.v1.AlloyDbClusterBackupProperties; + + /** + * Encodes the specified AlloyDbClusterBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. + * @param message AlloyDbClusterBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDbClusterBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. + * @param message AlloyDbClusterBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDbClusterBackupProperties + * @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.backupdr.v1.AlloyDbClusterBackupProperties; + + /** + * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDbClusterBackupProperties + * @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.backupdr.v1.AlloyDbClusterBackupProperties; + + /** + * Verifies an AlloyDbClusterBackupProperties 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 AlloyDbClusterBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDbClusterBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AlloyDbClusterBackupProperties; + + /** + * Creates a plain object from an AlloyDbClusterBackupProperties message. Also converts values to other types if specified. + * @param message AlloyDbClusterBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AlloyDbClusterBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDbClusterBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDbClusterBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDBClusterBackupPlanAssociationProperties. */ + interface IAlloyDBClusterBackupPlanAssociationProperties { + + /** AlloyDBClusterBackupPlanAssociationProperties clusterUid */ + clusterUid?: (string|null); + } + + /** Represents an AlloyDBClusterBackupPlanAssociationProperties. */ + class AlloyDBClusterBackupPlanAssociationProperties implements IAlloyDBClusterBackupPlanAssociationProperties { + + /** + * Constructs a new AlloyDBClusterBackupPlanAssociationProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties); + + /** AlloyDBClusterBackupPlanAssociationProperties clusterUid. */ + public clusterUid: string; + + /** + * Creates a new AlloyDBClusterBackupPlanAssociationProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDBClusterBackupPlanAssociationProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties): google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties; + + /** + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.verify|verify} messages. + * @param message AlloyDBClusterBackupPlanAssociationProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.verify|verify} messages. + * @param message AlloyDBClusterBackupPlanAssociationProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDBClusterBackupPlanAssociationProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDBClusterBackupPlanAssociationProperties + * @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.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties; + + /** + * Decodes an AlloyDBClusterBackupPlanAssociationProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDBClusterBackupPlanAssociationProperties + * @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.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties; + + /** + * Verifies an AlloyDBClusterBackupPlanAssociationProperties 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 AlloyDBClusterBackupPlanAssociationProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDBClusterBackupPlanAssociationProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties; + + /** + * Creates a plain object from an AlloyDBClusterBackupPlanAssociationProperties message. Also converts values to other types if specified. + * @param message AlloyDBClusterBackupPlanAssociationProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDBClusterBackupPlanAssociationProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDBClusterBackupPlanAssociationProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CloudSqlInstanceDataSourceProperties. */ interface ICloudSqlInstanceDataSourceProperties { @@ -10653,218 +10968,6 @@ export namespace google { BACKUP_VAULT_VIEW_FULL = 2 } - /** Properties of an AlloyDBClusterDataSourceProperties. */ - interface IAlloyDBClusterDataSourceProperties { - - /** AlloyDBClusterDataSourceProperties name */ - name?: (string|null); - } - - /** Represents an AlloyDBClusterDataSourceProperties. */ - class AlloyDBClusterDataSourceProperties implements IAlloyDBClusterDataSourceProperties { - - /** - * Constructs a new AlloyDBClusterDataSourceProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties); - - /** AlloyDBClusterDataSourceProperties name. */ - public name: string; - - /** - * Creates a new AlloyDBClusterDataSourceProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns AlloyDBClusterDataSourceProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties): google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties; - - /** - * Encodes the specified AlloyDBClusterDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. - * @param message AlloyDBClusterDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AlloyDBClusterDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. - * @param message AlloyDBClusterDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AlloyDBClusterDataSourceProperties - * @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.backupdr.v1.AlloyDBClusterDataSourceProperties; - - /** - * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AlloyDBClusterDataSourceProperties - * @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.backupdr.v1.AlloyDBClusterDataSourceProperties; - - /** - * Verifies an AlloyDBClusterDataSourceProperties 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 AlloyDBClusterDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AlloyDBClusterDataSourceProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties; - - /** - * Creates a plain object from an AlloyDBClusterDataSourceProperties message. Also converts values to other types if specified. - * @param message AlloyDBClusterDataSourceProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AlloyDBClusterDataSourceProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AlloyDBClusterDataSourceProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AlloyDbClusterBackupProperties. */ - interface IAlloyDbClusterBackupProperties { - - /** AlloyDbClusterBackupProperties description */ - description?: (string|null); - - /** AlloyDbClusterBackupProperties storedBytes */ - storedBytes?: (number|Long|string|null); - - /** AlloyDbClusterBackupProperties chainId */ - chainId?: (string|null); - - /** AlloyDbClusterBackupProperties databaseVersion */ - databaseVersion?: (string|null); - } - - /** Represents an AlloyDbClusterBackupProperties. */ - class AlloyDbClusterBackupProperties implements IAlloyDbClusterBackupProperties { - - /** - * Constructs a new AlloyDbClusterBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties); - - /** AlloyDbClusterBackupProperties description. */ - public description?: (string|null); - - /** AlloyDbClusterBackupProperties storedBytes. */ - public storedBytes: (number|Long|string); - - /** AlloyDbClusterBackupProperties chainId. */ - public chainId: string; - - /** AlloyDbClusterBackupProperties databaseVersion. */ - public databaseVersion: string; - - /** - * Creates a new AlloyDbClusterBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns AlloyDbClusterBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties): google.cloud.backupdr.v1.AlloyDbClusterBackupProperties; - - /** - * Encodes the specified AlloyDbClusterBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. - * @param message AlloyDbClusterBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AlloyDbClusterBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. - * @param message AlloyDbClusterBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AlloyDbClusterBackupProperties - * @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.backupdr.v1.AlloyDbClusterBackupProperties; - - /** - * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AlloyDbClusterBackupProperties - * @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.backupdr.v1.AlloyDbClusterBackupProperties; - - /** - * Verifies an AlloyDbClusterBackupProperties 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 AlloyDbClusterBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AlloyDbClusterBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AlloyDbClusterBackupProperties; - - /** - * Creates a plain object from an AlloyDbClusterBackupProperties message. Also converts values to other types if specified. - * @param message AlloyDbClusterBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AlloyDbClusterBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AlloyDbClusterBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AlloyDbClusterBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - /** Properties of a BackupApplianceBackupProperties. */ interface IBackupApplianceBackupProperties { diff --git a/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index 5fee8a4b91d..9c2eb95f2af 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -10160,6 +10160,7 @@ * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo * @property {string|null} [dataSource] BackupPlanAssociation dataSource * @property {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties|null} [cloudSqlInstanceBackupPlanAssociationProperties] BackupPlanAssociation cloudSqlInstanceBackupPlanAssociationProperties + * @property {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties|null} [alloydbClusterBackupPlanAssociationProperties] BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties * @property {string|null} [backupPlanRevisionId] BackupPlanAssociation backupPlanRevisionId * @property {string|null} [backupPlanRevisionName] BackupPlanAssociation backupPlanRevisionName */ @@ -10260,6 +10261,14 @@ */ BackupPlanAssociation.prototype.cloudSqlInstanceBackupPlanAssociationProperties = null; + /** + * BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties. + * @member {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties|null|undefined} alloydbClusterBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.alloydbClusterBackupPlanAssociationProperties = null; + /** * BackupPlanAssociation backupPlanRevisionId. * @member {string} backupPlanRevisionId @@ -10281,12 +10290,12 @@ /** * BackupPlanAssociation resourceProperties. - * @member {"cloudSqlInstanceBackupPlanAssociationProperties"|undefined} resourceProperties + * @member {"cloudSqlInstanceBackupPlanAssociationProperties"|"alloydbClusterBackupPlanAssociationProperties"|undefined} resourceProperties * @memberof google.cloud.backupdr.v1.BackupPlanAssociation * @instance */ Object.defineProperty(BackupPlanAssociation.prototype, "resourceProperties", { - get: $util.oneOfGetter($oneOfFields = ["cloudSqlInstanceBackupPlanAssociationProperties"]), + get: $util.oneOfGetter($oneOfFields = ["cloudSqlInstanceBackupPlanAssociationProperties", "alloydbClusterBackupPlanAssociationProperties"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10339,6 +10348,8 @@ writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupPlanRevisionId); if (message.backupPlanRevisionName != null && Object.hasOwnProperty.call(message, "backupPlanRevisionName")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.backupPlanRevisionName); + if (message.alloydbClusterBackupPlanAssociationProperties != null && Object.hasOwnProperty.call(message, "alloydbClusterBackupPlanAssociationProperties")) + $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.encode(message.alloydbClusterBackupPlanAssociationProperties, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; @@ -10417,6 +10428,10 @@ message.cloudSqlInstanceBackupPlanAssociationProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.decode(reader, reader.uint32()); break; } + case 15: { + message.alloydbClusterBackupPlanAssociationProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.decode(reader, reader.uint32()); + break; + } case 11: { message.backupPlanRevisionId = reader.string(); break; @@ -10515,6 +10530,16 @@ return "cloudSqlInstanceBackupPlanAssociationProperties." + error; } } + if (message.alloydbClusterBackupPlanAssociationProperties != null && message.hasOwnProperty("alloydbClusterBackupPlanAssociationProperties")) { + if (properties.resourceProperties === 1) + return "resourceProperties: multiple values"; + properties.resourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.verify(message.alloydbClusterBackupPlanAssociationProperties); + if (error) + return "alloydbClusterBackupPlanAssociationProperties." + error; + } + } if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) if (!$util.isString(message.backupPlanRevisionId)) return "backupPlanRevisionId: string expected"; @@ -10603,6 +10628,11 @@ throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.cloudSqlInstanceBackupPlanAssociationProperties: object expected"); message.cloudSqlInstanceBackupPlanAssociationProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.fromObject(object.cloudSqlInstanceBackupPlanAssociationProperties); } + if (object.alloydbClusterBackupPlanAssociationProperties != null) { + if (typeof object.alloydbClusterBackupPlanAssociationProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.alloydbClusterBackupPlanAssociationProperties: object expected"); + message.alloydbClusterBackupPlanAssociationProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.fromObject(object.alloydbClusterBackupPlanAssociationProperties); + } if (object.backupPlanRevisionId != null) message.backupPlanRevisionId = String(object.backupPlanRevisionId); if (object.backupPlanRevisionName != null) @@ -10667,6 +10697,11 @@ object.backupPlanRevisionId = message.backupPlanRevisionId; if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) object.backupPlanRevisionName = message.backupPlanRevisionName; + if (message.alloydbClusterBackupPlanAssociationProperties != null && message.hasOwnProperty("alloydbClusterBackupPlanAssociationProperties")) { + object.alloydbClusterBackupPlanAssociationProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.toObject(message.alloydbClusterBackupPlanAssociationProperties, options); + if (options.oneofs) + object.resourceProperties = "alloydbClusterBackupPlanAssociationProperties"; + } return object; }; @@ -13424,27 +13459,24 @@ return TriggerBackupRequest; })(); - v1.CloudSqlInstanceDataSourceProperties = (function() { + v1.AlloyDBClusterDataSourceProperties = (function() { /** - * Properties of a CloudSqlInstanceDataSourceProperties. + * Properties of an AlloyDBClusterDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @interface ICloudSqlInstanceDataSourceProperties - * @property {string|null} [name] CloudSqlInstanceDataSourceProperties name - * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceDataSourceProperties databaseInstalledVersion - * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceDataSourceProperties instanceCreateTime - * @property {string|null} [instanceTier] CloudSqlInstanceDataSourceProperties instanceTier + * @interface IAlloyDBClusterDataSourceProperties + * @property {string|null} [name] AlloyDBClusterDataSourceProperties name */ /** - * Constructs a new CloudSqlInstanceDataSourceProperties. + * Constructs a new AlloyDBClusterDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CloudSqlInstanceDataSourceProperties. - * @implements ICloudSqlInstanceDataSourceProperties + * @classdesc Represents an AlloyDBClusterDataSourceProperties. + * @implements IAlloyDBClusterDataSourceProperties * @constructor - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties=} [properties] Properties to set */ - function CloudSqlInstanceDataSourceProperties(properties) { + function AlloyDBClusterDataSourceProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13452,100 +13484,70 @@ } /** - * CloudSqlInstanceDataSourceProperties name. + * AlloyDBClusterDataSourceProperties name. * @member {string} name - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties - * @instance - */ - CloudSqlInstanceDataSourceProperties.prototype.name = ""; - - /** - * CloudSqlInstanceDataSourceProperties databaseInstalledVersion. - * @member {string} databaseInstalledVersion - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties - * @instance - */ - CloudSqlInstanceDataSourceProperties.prototype.databaseInstalledVersion = ""; - - /** - * CloudSqlInstanceDataSourceProperties instanceCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties - * @instance - */ - CloudSqlInstanceDataSourceProperties.prototype.instanceCreateTime = null; - - /** - * CloudSqlInstanceDataSourceProperties instanceTier. - * @member {string} instanceTier - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @instance */ - CloudSqlInstanceDataSourceProperties.prototype.instanceTier = ""; + AlloyDBClusterDataSourceProperties.prototype.name = ""; /** - * Creates a new CloudSqlInstanceDataSourceProperties instance using the specified properties. + * Creates a new AlloyDBClusterDataSourceProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties instance + * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties instance */ - CloudSqlInstanceDataSourceProperties.create = function create(properties) { - return new CloudSqlInstanceDataSourceProperties(properties); + AlloyDBClusterDataSourceProperties.create = function create(properties) { + return new AlloyDBClusterDataSourceProperties(properties); }; /** - * Encodes the specified CloudSqlInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify|verify} messages. + * Encodes the specified AlloyDBClusterDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceDataSourceProperties.encode = function encode(message, writer) { + AlloyDBClusterDataSourceProperties.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.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); - if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) - $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceTier); return writer; }; /** - * Encodes the specified CloudSqlInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify|verify} messages. + * Encodes the specified AlloyDBClusterDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + AlloyDBClusterDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer. + * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceDataSourceProperties.decode = function decode(reader, length, error) { + AlloyDBClusterDataSourceProperties.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -13555,18 +13557,6 @@ message.name = reader.string(); break; } - case 2: { - message.databaseInstalledVersion = reader.string(); - break; - } - case 3: { - message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.instanceTier = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -13576,157 +13566,125 @@ }; /** - * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + AlloyDBClusterDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlInstanceDataSourceProperties message. + * Verifies an AlloyDBClusterDataSourceProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlInstanceDataSourceProperties.verify = function verify(message) { + AlloyDBClusterDataSourceProperties.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.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - if (!$util.isString(message.databaseInstalledVersion)) - return "databaseInstalledVersion: string expected"; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); - if (error) - return "instanceCreateTime." + error; - } - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - if (!$util.isString(message.instanceTier)) - return "instanceTier: string expected"; return null; }; /** - * Creates a CloudSqlInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * Creates an AlloyDBClusterDataSourceProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties */ - CloudSqlInstanceDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties) + AlloyDBClusterDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties) return object; - var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties(); + var message = new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties(); if (object.name != null) message.name = String(object.name); - if (object.databaseInstalledVersion != null) - message.databaseInstalledVersion = String(object.databaseInstalledVersion); - if (object.instanceCreateTime != null) { - if (typeof object.instanceCreateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.instanceCreateTime: object expected"); - message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); - } - if (object.instanceTier != null) - message.instanceTier = String(object.instanceTier); return message; }; /** - * Creates a plain object from a CloudSqlInstanceDataSourceProperties message. Also converts values to other types if specified. + * Creates a plain object from an AlloyDBClusterDataSourceProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties + * @param {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlInstanceDataSourceProperties.toObject = function toObject(message, options) { + AlloyDBClusterDataSourceProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.databaseInstalledVersion = ""; - object.instanceCreateTime = null; - object.instanceTier = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - object.databaseInstalledVersion = message.databaseInstalledVersion; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) - object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - object.instanceTier = message.instanceTier; return object; }; /** - * Converts this CloudSqlInstanceDataSourceProperties to JSON. + * Converts this AlloyDBClusterDataSourceProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @instance * @returns {Object.} JSON object */ - CloudSqlInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + AlloyDBClusterDataSourceProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlInstanceDataSourceProperties + * Gets the default type url for AlloyDBClusterDataSourceProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AlloyDBClusterDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties"; }; - return CloudSqlInstanceDataSourceProperties; + return AlloyDBClusterDataSourceProperties; })(); - v1.CloudSqlInstanceBackupProperties = (function() { + v1.AlloyDbClusterBackupProperties = (function() { /** - * Properties of a CloudSqlInstanceBackupProperties. + * Properties of an AlloyDbClusterBackupProperties. * @memberof google.cloud.backupdr.v1 - * @interface ICloudSqlInstanceBackupProperties - * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceBackupProperties databaseInstalledVersion - * @property {boolean|null} [finalBackup] CloudSqlInstanceBackupProperties finalBackup - * @property {string|null} [sourceInstance] CloudSqlInstanceBackupProperties sourceInstance - * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceBackupProperties instanceCreateTime - * @property {string|null} [instanceTier] CloudSqlInstanceBackupProperties instanceTier - * @property {google.protobuf.ITimestamp|null} [instanceDeleteTime] CloudSqlInstanceBackupProperties instanceDeleteTime + * @interface IAlloyDbClusterBackupProperties + * @property {string|null} [description] AlloyDbClusterBackupProperties description + * @property {number|Long|null} [storedBytes] AlloyDbClusterBackupProperties storedBytes + * @property {string|null} [chainId] AlloyDbClusterBackupProperties chainId + * @property {string|null} [databaseVersion] AlloyDbClusterBackupProperties databaseVersion */ /** - * Constructs a new CloudSqlInstanceBackupProperties. + * Constructs a new AlloyDbClusterBackupProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CloudSqlInstanceBackupProperties. - * @implements ICloudSqlInstanceBackupProperties + * @classdesc Represents an AlloyDbClusterBackupProperties. + * @implements IAlloyDbClusterBackupProperties * @constructor - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties=} [properties] Properties to set */ - function CloudSqlInstanceBackupProperties(properties) { + function AlloyDbClusterBackupProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13734,147 +13692,128 @@ } /** - * CloudSqlInstanceBackupProperties databaseInstalledVersion. - * @member {string} databaseInstalledVersion - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * AlloyDbClusterBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @instance */ - CloudSqlInstanceBackupProperties.prototype.databaseInstalledVersion = ""; + AlloyDbClusterBackupProperties.prototype.description = null; /** - * CloudSqlInstanceBackupProperties finalBackup. - * @member {boolean} finalBackup - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * AlloyDbClusterBackupProperties storedBytes. + * @member {number|Long} storedBytes + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @instance */ - CloudSqlInstanceBackupProperties.prototype.finalBackup = false; + AlloyDbClusterBackupProperties.prototype.storedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CloudSqlInstanceBackupProperties sourceInstance. - * @member {string} sourceInstance - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * AlloyDbClusterBackupProperties chainId. + * @member {string} chainId + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @instance */ - CloudSqlInstanceBackupProperties.prototype.sourceInstance = ""; + AlloyDbClusterBackupProperties.prototype.chainId = ""; /** - * CloudSqlInstanceBackupProperties instanceCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * AlloyDbClusterBackupProperties databaseVersion. + * @member {string} databaseVersion + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @instance */ - CloudSqlInstanceBackupProperties.prototype.instanceCreateTime = null; + AlloyDbClusterBackupProperties.prototype.databaseVersion = ""; - /** - * CloudSqlInstanceBackupProperties instanceTier. - * @member {string} instanceTier - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties - * @instance - */ - CloudSqlInstanceBackupProperties.prototype.instanceTier = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * CloudSqlInstanceBackupProperties instanceDeleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} instanceDeleteTime - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties - * @instance - */ - CloudSqlInstanceBackupProperties.prototype.instanceDeleteTime = null; + // Virtual OneOf for proto3 optional field + Object.defineProperty(AlloyDbClusterBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new CloudSqlInstanceBackupProperties instance using the specified properties. + * Creates a new AlloyDbClusterBackupProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties instance + * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties instance */ - CloudSqlInstanceBackupProperties.create = function create(properties) { - return new CloudSqlInstanceBackupProperties(properties); + AlloyDbClusterBackupProperties.create = function create(properties) { + return new AlloyDbClusterBackupProperties(properties); }; /** - * Encodes the specified CloudSqlInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify|verify} messages. + * Encodes the specified AlloyDbClusterBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceBackupProperties.encode = function encode(message, writer) { + AlloyDbClusterBackupProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); - if (message.finalBackup != null && Object.hasOwnProperty.call(message, "finalBackup")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.finalBackup); - if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceInstance); - if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) - $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.instanceTier); - if (message.instanceDeleteTime != null && Object.hasOwnProperty.call(message, "instanceDeleteTime")) - $root.google.protobuf.Timestamp.encode(message.instanceDeleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.storedBytes != null && Object.hasOwnProperty.call(message, "storedBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.storedBytes); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); + if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseVersion); return writer; }; /** - * Encodes the specified CloudSqlInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify|verify} messages. + * Encodes the specified AlloyDbClusterBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + AlloyDbClusterBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer. + * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceBackupProperties.decode = function decode(reader, length, error) { + AlloyDbClusterBackupProperties.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } case 2: { - message.databaseInstalledVersion = reader.string(); + message.storedBytes = reader.int64(); break; } case 3: { - message.finalBackup = reader.bool(); + message.chainId = reader.string(); break; } case 4: { - message.sourceInstance = reader.string(); - break; - } - case 5: { - message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.instanceTier = reader.string(); - break; - } - case 8: { - message.instanceDeleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.databaseVersion = reader.string(); break; } default: @@ -13886,176 +13825,166 @@ }; /** - * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer, length delimited. + * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + AlloyDbClusterBackupProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlInstanceBackupProperties message. + * Verifies an AlloyDbClusterBackupProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlInstanceBackupProperties.verify = function verify(message) { + AlloyDbClusterBackupProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - if (!$util.isString(message.databaseInstalledVersion)) - return "databaseInstalledVersion: string expected"; - if (message.finalBackup != null && message.hasOwnProperty("finalBackup")) - if (typeof message.finalBackup !== "boolean") - return "finalBackup: boolean expected"; - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) - if (!$util.isString(message.sourceInstance)) - return "sourceInstance: string expected"; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); - if (error) - return "instanceCreateTime." + error; - } - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - if (!$util.isString(message.instanceTier)) - return "instanceTier: string expected"; - if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.instanceDeleteTime); - if (error) - return "instanceDeleteTime." + error; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; } + if (message.storedBytes != null && message.hasOwnProperty("storedBytes")) + if (!$util.isInteger(message.storedBytes) && !(message.storedBytes && $util.isInteger(message.storedBytes.low) && $util.isInteger(message.storedBytes.high))) + return "storedBytes: integer|Long expected"; + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + if (!$util.isString(message.databaseVersion)) + return "databaseVersion: string expected"; return null; }; /** - * Creates a CloudSqlInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates an AlloyDbClusterBackupProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties */ - CloudSqlInstanceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties) + AlloyDbClusterBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties) return object; - var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties(); - if (object.databaseInstalledVersion != null) - message.databaseInstalledVersion = String(object.databaseInstalledVersion); - if (object.finalBackup != null) - message.finalBackup = Boolean(object.finalBackup); - if (object.sourceInstance != null) - message.sourceInstance = String(object.sourceInstance); - if (object.instanceCreateTime != null) { - if (typeof object.instanceCreateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceCreateTime: object expected"); - message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); - } - if (object.instanceTier != null) - message.instanceTier = String(object.instanceTier); - if (object.instanceDeleteTime != null) { - if (typeof object.instanceDeleteTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceDeleteTime: object expected"); - message.instanceDeleteTime = $root.google.protobuf.Timestamp.fromObject(object.instanceDeleteTime); - } + var message = new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.storedBytes != null) + if ($util.Long) + (message.storedBytes = $util.Long.fromValue(object.storedBytes)).unsigned = false; + else if (typeof object.storedBytes === "string") + message.storedBytes = parseInt(object.storedBytes, 10); + else if (typeof object.storedBytes === "number") + message.storedBytes = object.storedBytes; + else if (typeof object.storedBytes === "object") + message.storedBytes = new $util.LongBits(object.storedBytes.low >>> 0, object.storedBytes.high >>> 0).toNumber(); + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.databaseVersion != null) + message.databaseVersion = String(object.databaseVersion); return message; }; /** - * Creates a plain object from a CloudSqlInstanceBackupProperties message. Also converts values to other types if specified. + * Creates a plain object from an AlloyDbClusterBackupProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static - * @param {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties + * @param {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlInstanceBackupProperties.toObject = function toObject(message, options) { + AlloyDbClusterBackupProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.databaseInstalledVersion = ""; - object.finalBackup = false; - object.sourceInstance = ""; - object.instanceCreateTime = null; - object.instanceTier = ""; - object.instanceDeleteTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.storedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.storedBytes = options.longs === String ? "0" : 0; + object.chainId = ""; + object.databaseVersion = ""; } - if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - object.databaseInstalledVersion = message.databaseInstalledVersion; - if (message.finalBackup != null && message.hasOwnProperty("finalBackup")) - object.finalBackup = message.finalBackup; - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) - object.sourceInstance = message.sourceInstance; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) - object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - object.instanceTier = message.instanceTier; - if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) - object.instanceDeleteTime = $root.google.protobuf.Timestamp.toObject(message.instanceDeleteTime, options); + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.storedBytes != null && message.hasOwnProperty("storedBytes")) + if (typeof message.storedBytes === "number") + object.storedBytes = options.longs === String ? String(message.storedBytes) : message.storedBytes; + else + object.storedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.storedBytes) : options.longs === Number ? new $util.LongBits(message.storedBytes.low >>> 0, message.storedBytes.high >>> 0).toNumber() : message.storedBytes; + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + object.databaseVersion = message.databaseVersion; return object; }; /** - * Converts this CloudSqlInstanceBackupProperties to JSON. + * Converts this AlloyDbClusterBackupProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @instance * @returns {Object.} JSON object */ - CloudSqlInstanceBackupProperties.prototype.toJSON = function toJSON() { + AlloyDbClusterBackupProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlInstanceBackupProperties + * Gets the default type url for AlloyDbClusterBackupProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AlloyDbClusterBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AlloyDbClusterBackupProperties"; }; - return CloudSqlInstanceBackupProperties; + return AlloyDbClusterBackupProperties; })(); - v1.CloudSqlInstanceDataSourceReferenceProperties = (function() { + v1.AlloyDBClusterBackupPlanAssociationProperties = (function() { /** - * Properties of a CloudSqlInstanceDataSourceReferenceProperties. + * Properties of an AlloyDBClusterBackupPlanAssociationProperties. * @memberof google.cloud.backupdr.v1 - * @interface ICloudSqlInstanceDataSourceReferenceProperties - * @property {string|null} [name] CloudSqlInstanceDataSourceReferenceProperties name - * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion - * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime - * @property {string|null} [instanceTier] CloudSqlInstanceDataSourceReferenceProperties instanceTier + * @interface IAlloyDBClusterBackupPlanAssociationProperties + * @property {string|null} [clusterUid] AlloyDBClusterBackupPlanAssociationProperties clusterUid */ /** - * Constructs a new CloudSqlInstanceDataSourceReferenceProperties. + * Constructs a new AlloyDBClusterBackupPlanAssociationProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CloudSqlInstanceDataSourceReferenceProperties. - * @implements ICloudSqlInstanceDataSourceReferenceProperties + * @classdesc Represents an AlloyDBClusterBackupPlanAssociationProperties. + * @implements IAlloyDBClusterBackupPlanAssociationProperties * @constructor - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties=} [properties] Properties to set */ - function CloudSqlInstanceDataSourceReferenceProperties(properties) { + function AlloyDBClusterBackupPlanAssociationProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14063,119 +13992,77 @@ } /** - * CloudSqlInstanceDataSourceReferenceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties - * @instance - */ - CloudSqlInstanceDataSourceReferenceProperties.prototype.name = ""; - - /** - * CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion. - * @member {string} databaseInstalledVersion - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties - * @instance - */ - CloudSqlInstanceDataSourceReferenceProperties.prototype.databaseInstalledVersion = ""; - - /** - * CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties - * @instance - */ - CloudSqlInstanceDataSourceReferenceProperties.prototype.instanceCreateTime = null; - - /** - * CloudSqlInstanceDataSourceReferenceProperties instanceTier. - * @member {string} instanceTier - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * AlloyDBClusterBackupPlanAssociationProperties clusterUid. + * @member {string} clusterUid + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @instance */ - CloudSqlInstanceDataSourceReferenceProperties.prototype.instanceTier = ""; + AlloyDBClusterBackupPlanAssociationProperties.prototype.clusterUid = ""; /** - * Creates a new CloudSqlInstanceDataSourceReferenceProperties instance using the specified properties. + * Creates a new AlloyDBClusterBackupPlanAssociationProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties instance + * @param {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties} AlloyDBClusterBackupPlanAssociationProperties instance */ - CloudSqlInstanceDataSourceReferenceProperties.create = function create(properties) { - return new CloudSqlInstanceDataSourceReferenceProperties(properties); + AlloyDBClusterBackupPlanAssociationProperties.create = function create(properties) { + return new AlloyDBClusterBackupPlanAssociationProperties(properties); }; /** - * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties} message AlloyDBClusterBackupPlanAssociationProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceDataSourceReferenceProperties.encode = function encode(message, writer) { + AlloyDBClusterBackupPlanAssociationProperties.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.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); - if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) - $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceTier); + if (message.clusterUid != null && Object.hasOwnProperty.call(message, "clusterUid")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterUid); return writer; }; /** - * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAlloyDBClusterBackupPlanAssociationProperties} message AlloyDBClusterBackupPlanAssociationProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceDataSourceReferenceProperties.encodeDelimited = function encodeDelimited(message, writer) { + AlloyDBClusterBackupPlanAssociationProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer. + * Decodes an AlloyDBClusterBackupPlanAssociationProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties} AlloyDBClusterBackupPlanAssociationProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceDataSourceReferenceProperties.decode = function decode(reader, length, error) { + AlloyDBClusterBackupPlanAssociationProperties.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.databaseInstalledVersion = reader.string(); - break; - } - case 3: { - message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.instanceTier = reader.string(); + message.clusterUid = reader.string(); break; } default: @@ -14187,152 +14074,125 @@ }; /** - * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer, length delimited. + * Decodes an AlloyDBClusterBackupPlanAssociationProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties} AlloyDBClusterBackupPlanAssociationProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceDataSourceReferenceProperties.decodeDelimited = function decodeDelimited(reader) { + AlloyDBClusterBackupPlanAssociationProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlInstanceDataSourceReferenceProperties message. + * Verifies an AlloyDBClusterBackupPlanAssociationProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlInstanceDataSourceReferenceProperties.verify = function verify(message) { + AlloyDBClusterBackupPlanAssociationProperties.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.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - if (!$util.isString(message.databaseInstalledVersion)) - return "databaseInstalledVersion: string expected"; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); - if (error) - return "instanceCreateTime." + error; - } - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - if (!$util.isString(message.instanceTier)) - return "instanceTier: string expected"; + if (message.clusterUid != null && message.hasOwnProperty("clusterUid")) + if (!$util.isString(message.clusterUid)) + return "clusterUid: string expected"; return null; }; /** - * Creates a CloudSqlInstanceDataSourceReferenceProperties message from a plain object. Also converts values to their respective internal types. + * Creates an AlloyDBClusterBackupPlanAssociationProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties + * @returns {google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties} AlloyDBClusterBackupPlanAssociationProperties */ - CloudSqlInstanceDataSourceReferenceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties) + AlloyDBClusterBackupPlanAssociationProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties) return object; - var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.databaseInstalledVersion != null) - message.databaseInstalledVersion = String(object.databaseInstalledVersion); - if (object.instanceCreateTime != null) { - if (typeof object.instanceCreateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.instanceCreateTime: object expected"); - message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); - } - if (object.instanceTier != null) - message.instanceTier = String(object.instanceTier); + var message = new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties(); + if (object.clusterUid != null) + message.clusterUid = String(object.clusterUid); return message; }; /** - * Creates a plain object from a CloudSqlInstanceDataSourceReferenceProperties message. Also converts values to other types if specified. + * Creates a plain object from an AlloyDBClusterBackupPlanAssociationProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static - * @param {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties + * @param {google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties} message AlloyDBClusterBackupPlanAssociationProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlInstanceDataSourceReferenceProperties.toObject = function toObject(message, options) { + AlloyDBClusterBackupPlanAssociationProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.databaseInstalledVersion = ""; - object.instanceCreateTime = null; - object.instanceTier = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) - object.databaseInstalledVersion = message.databaseInstalledVersion; - if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) - object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); - if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) - object.instanceTier = message.instanceTier; + if (options.defaults) + object.clusterUid = ""; + if (message.clusterUid != null && message.hasOwnProperty("clusterUid")) + object.clusterUid = message.clusterUid; return object; }; /** - * Converts this CloudSqlInstanceDataSourceReferenceProperties to JSON. + * Converts this AlloyDBClusterBackupPlanAssociationProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @instance * @returns {Object.} JSON object */ - CloudSqlInstanceDataSourceReferenceProperties.prototype.toJSON = function toJSON() { + AlloyDBClusterBackupPlanAssociationProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlInstanceDataSourceReferenceProperties + * Gets the default type url for AlloyDBClusterBackupPlanAssociationProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @memberof google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlInstanceDataSourceReferenceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AlloyDBClusterBackupPlanAssociationProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties"; }; - return CloudSqlInstanceDataSourceReferenceProperties; + return AlloyDBClusterBackupPlanAssociationProperties; })(); - v1.CloudSqlInstanceInitializationConfig = (function() { + v1.CloudSqlInstanceDataSourceProperties = (function() { /** - * Properties of a CloudSqlInstanceInitializationConfig. + * Properties of a CloudSqlInstanceDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @interface ICloudSqlInstanceInitializationConfig - * @property {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition|null} [edition] CloudSqlInstanceInitializationConfig edition + * @interface ICloudSqlInstanceDataSourceProperties + * @property {string|null} [name] CloudSqlInstanceDataSourceProperties name + * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceDataSourceProperties databaseInstalledVersion + * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceDataSourceProperties instanceCreateTime + * @property {string|null} [instanceTier] CloudSqlInstanceDataSourceProperties instanceTier */ /** - * Constructs a new CloudSqlInstanceInitializationConfig. + * Constructs a new CloudSqlInstanceDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CloudSqlInstanceInitializationConfig. - * @implements ICloudSqlInstanceInitializationConfig + * @classdesc Represents a CloudSqlInstanceDataSourceProperties. + * @implements ICloudSqlInstanceDataSourceProperties * @constructor - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties=} [properties] Properties to set */ - function CloudSqlInstanceInitializationConfig(properties) { + function CloudSqlInstanceDataSourceProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14340,77 +14200,119 @@ } /** - * CloudSqlInstanceInitializationConfig edition. - * @member {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition} edition - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * CloudSqlInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @instance */ - CloudSqlInstanceInitializationConfig.prototype.edition = 0; + CloudSqlInstanceDataSourceProperties.prototype.name = ""; /** - * Creates a new CloudSqlInstanceInitializationConfig instance using the specified properties. + * CloudSqlInstanceDataSourceProperties databaseInstalledVersion. + * @member {string} databaseInstalledVersion + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @instance + */ + CloudSqlInstanceDataSourceProperties.prototype.databaseInstalledVersion = ""; + + /** + * CloudSqlInstanceDataSourceProperties instanceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @instance + */ + CloudSqlInstanceDataSourceProperties.prototype.instanceCreateTime = null; + + /** + * CloudSqlInstanceDataSourceProperties instanceTier. + * @member {string} instanceTier + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties + * @instance + */ + CloudSqlInstanceDataSourceProperties.prototype.instanceTier = ""; + + /** + * Creates a new CloudSqlInstanceDataSourceProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig instance + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties instance */ - CloudSqlInstanceInitializationConfig.create = function create(properties) { - return new CloudSqlInstanceInitializationConfig(properties); + CloudSqlInstanceDataSourceProperties.create = function create(properties) { + return new CloudSqlInstanceDataSourceProperties(properties); }; /** - * Encodes the specified CloudSqlInstanceInitializationConfig message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify|verify} messages. + * Encodes the specified CloudSqlInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceInitializationConfig.encode = function encode(message, writer) { + CloudSqlInstanceDataSourceProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.edition); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); + if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceTier); return writer; }; /** - * Encodes the specified CloudSqlInstanceInitializationConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify|verify} messages. + * Encodes the specified CloudSqlInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceInitializationConfig.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer. + * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceInitializationConfig.decode = function decode(reader, length, error) { + CloudSqlInstanceDataSourceProperties.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.edition = reader.int32(); + message.name = reader.string(); + break; + } + case 2: { + message.databaseInstalledVersion = reader.string(); + break; + } + case 3: { + message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.instanceTier = reader.string(); break; } default: @@ -14422,162 +14324,157 @@ }; /** - * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceInitializationConfig.decodeDelimited = function decodeDelimited(reader) { + CloudSqlInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlInstanceInitializationConfig message. + * Verifies a CloudSqlInstanceDataSourceProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlInstanceInitializationConfig.verify = function verify(message) { + CloudSqlInstanceDataSourceProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: 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.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + if (!$util.isString(message.databaseInstalledVersion)) + return "databaseInstalledVersion: string expected"; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); + if (error) + return "instanceCreateTime." + error; + } + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + if (!$util.isString(message.instanceTier)) + return "instanceTier: string expected"; return null; }; /** - * Creates a CloudSqlInstanceInitializationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} CloudSqlInstanceDataSourceProperties */ - CloudSqlInstanceInitializationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig) + CloudSqlInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties) return object; - var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNSPECIFIED": - case 0: - message.edition = 0; - break; - case "ENTERPRISE": - case 1: - message.edition = 1; - break; - case "ENTERPRISE_PLUS": - case 2: - message.edition = 2; - break; + var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.databaseInstalledVersion != null) + message.databaseInstalledVersion = String(object.databaseInstalledVersion); + if (object.instanceCreateTime != null) { + if (typeof object.instanceCreateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.instanceCreateTime: object expected"); + message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); } + if (object.instanceTier != null) + message.instanceTier = String(object.instanceTier); return message; }; /** - * Creates a plain object from a CloudSqlInstanceInitializationConfig message. Also converts values to other types if specified. + * Creates a plain object from a CloudSqlInstanceDataSourceProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig + * @param {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties} message CloudSqlInstanceDataSourceProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlInstanceInitializationConfig.toObject = function toObject(message, options) { + CloudSqlInstanceDataSourceProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition[message.edition] === undefined ? message.edition : $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition[message.edition] : message.edition; + if (options.defaults) { + object.name = ""; + object.databaseInstalledVersion = ""; + object.instanceCreateTime = null; + object.instanceTier = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + object.databaseInstalledVersion = message.databaseInstalledVersion; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) + object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + object.instanceTier = message.instanceTier; return object; }; /** - * Converts this CloudSqlInstanceInitializationConfig to JSON. + * Converts this CloudSqlInstanceDataSourceProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @instance * @returns {Object.} JSON object */ - CloudSqlInstanceInitializationConfig.prototype.toJSON = function toJSON() { + CloudSqlInstanceDataSourceProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlInstanceInitializationConfig + * Gets the default type url for CloudSqlInstanceDataSourceProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlInstanceInitializationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudSqlInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties"; }; - /** - * Edition enum. - * @name google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition - * @enum {number} - * @property {number} EDITION_UNSPECIFIED=0 EDITION_UNSPECIFIED value - * @property {number} ENTERPRISE=1 ENTERPRISE value - * @property {number} ENTERPRISE_PLUS=2 ENTERPRISE_PLUS value - */ - CloudSqlInstanceInitializationConfig.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTERPRISE"] = 1; - values[valuesById[2] = "ENTERPRISE_PLUS"] = 2; - return values; - })(); - - return CloudSqlInstanceInitializationConfig; + return CloudSqlInstanceDataSourceProperties; })(); - v1.CloudSqlInstanceBackupPlanAssociationProperties = (function() { + v1.CloudSqlInstanceBackupProperties = (function() { /** - * Properties of a CloudSqlInstanceBackupPlanAssociationProperties. + * Properties of a CloudSqlInstanceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @interface ICloudSqlInstanceBackupPlanAssociationProperties - * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime + * @interface ICloudSqlInstanceBackupProperties + * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceBackupProperties databaseInstalledVersion + * @property {boolean|null} [finalBackup] CloudSqlInstanceBackupProperties finalBackup + * @property {string|null} [sourceInstance] CloudSqlInstanceBackupProperties sourceInstance + * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceBackupProperties instanceCreateTime + * @property {string|null} [instanceTier] CloudSqlInstanceBackupProperties instanceTier + * @property {google.protobuf.ITimestamp|null} [instanceDeleteTime] CloudSqlInstanceBackupProperties instanceDeleteTime */ /** - * Constructs a new CloudSqlInstanceBackupPlanAssociationProperties. + * Constructs a new CloudSqlInstanceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CloudSqlInstanceBackupPlanAssociationProperties. - * @implements ICloudSqlInstanceBackupPlanAssociationProperties + * @classdesc Represents a CloudSqlInstanceBackupProperties. + * @implements ICloudSqlInstanceBackupProperties * @constructor - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties=} [properties] Properties to set */ - function CloudSqlInstanceBackupPlanAssociationProperties(properties) { + function CloudSqlInstanceBackupProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14585,79 +14482,149 @@ } /** - * CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime. + * CloudSqlInstanceBackupProperties databaseInstalledVersion. + * @member {string} databaseInstalledVersion + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.databaseInstalledVersion = ""; + + /** + * CloudSqlInstanceBackupProperties finalBackup. + * @member {boolean} finalBackup + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.finalBackup = false; + + /** + * CloudSqlInstanceBackupProperties sourceInstance. + * @member {string} sourceInstance + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.sourceInstance = ""; + + /** + * CloudSqlInstanceBackupProperties instanceCreateTime. * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @instance */ - CloudSqlInstanceBackupPlanAssociationProperties.prototype.instanceCreateTime = null; + CloudSqlInstanceBackupProperties.prototype.instanceCreateTime = null; /** - * Creates a new CloudSqlInstanceBackupPlanAssociationProperties instance using the specified properties. + * CloudSqlInstanceBackupProperties instanceTier. + * @member {string} instanceTier + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.instanceTier = ""; + + /** + * CloudSqlInstanceBackupProperties instanceDeleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceDeleteTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties + * @instance + */ + CloudSqlInstanceBackupProperties.prototype.instanceDeleteTime = null; + + /** + * Creates a new CloudSqlInstanceBackupProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties instance + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties instance */ - CloudSqlInstanceBackupPlanAssociationProperties.create = function create(properties) { - return new CloudSqlInstanceBackupPlanAssociationProperties(properties); + CloudSqlInstanceBackupProperties.create = function create(properties) { + return new CloudSqlInstanceBackupProperties(properties); }; /** - * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * Encodes the specified CloudSqlInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceBackupPlanAssociationProperties.encode = function encode(message, writer) { + CloudSqlInstanceBackupProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); + if (message.finalBackup != null && Object.hasOwnProperty.call(message, "finalBackup")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.finalBackup); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceInstance); if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) - $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.instanceTier); + if (message.instanceDeleteTime != null && Object.hasOwnProperty.call(message, "instanceDeleteTime")) + $root.google.protobuf.Timestamp.encode(message.instanceDeleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * Encodes the specified CloudSqlInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlInstanceBackupPlanAssociationProperties.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer. + * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceBackupPlanAssociationProperties.decode = function decode(reader, length, error) { + CloudSqlInstanceBackupProperties.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { + case 2: { + message.databaseInstalledVersion = reader.string(); + break; + } + case 3: { + message.finalBackup = reader.bool(); + break; + } + case 4: { + message.sourceInstance = reader.string(); + break; + } + case 5: { message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + message.instanceTier = reader.string(); + break; + } + case 8: { + message.instanceDeleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14667,146 +14634,176 @@ }; /** - * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlInstanceBackupPlanAssociationProperties.decodeDelimited = function decodeDelimited(reader) { + CloudSqlInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlInstanceBackupPlanAssociationProperties message. + * Verifies a CloudSqlInstanceBackupProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlInstanceBackupPlanAssociationProperties.verify = function verify(message) { + CloudSqlInstanceBackupProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + if (!$util.isString(message.databaseInstalledVersion)) + return "databaseInstalledVersion: string expected"; + if (message.finalBackup != null && message.hasOwnProperty("finalBackup")) + if (typeof message.finalBackup !== "boolean") + return "finalBackup: boolean expected"; + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); if (error) return "instanceCreateTime." + error; } + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + if (!$util.isString(message.instanceTier)) + return "instanceTier: string expected"; + if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceDeleteTime); + if (error) + return "instanceDeleteTime." + error; + } return null; }; /** - * Creates a CloudSqlInstanceBackupPlanAssociationProperties message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} CloudSqlInstanceBackupProperties */ - CloudSqlInstanceBackupPlanAssociationProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties) + CloudSqlInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties) return object; - var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties(); + var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties(); + if (object.databaseInstalledVersion != null) + message.databaseInstalledVersion = String(object.databaseInstalledVersion); + if (object.finalBackup != null) + message.finalBackup = Boolean(object.finalBackup); + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); if (object.instanceCreateTime != null) { if (typeof object.instanceCreateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.instanceCreateTime: object expected"); + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceCreateTime: object expected"); message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); } + if (object.instanceTier != null) + message.instanceTier = String(object.instanceTier); + if (object.instanceDeleteTime != null) { + if (typeof object.instanceDeleteTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.instanceDeleteTime: object expected"); + message.instanceDeleteTime = $root.google.protobuf.Timestamp.fromObject(object.instanceDeleteTime); + } return message; }; /** - * Creates a plain object from a CloudSqlInstanceBackupPlanAssociationProperties message. Also converts values to other types if specified. + * Creates a plain object from a CloudSqlInstanceBackupProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties + * @param {google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties} message CloudSqlInstanceBackupProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlInstanceBackupPlanAssociationProperties.toObject = function toObject(message, options) { + CloudSqlInstanceBackupProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + object.databaseInstalledVersion = ""; + object.finalBackup = false; + object.sourceInstance = ""; object.instanceCreateTime = null; + object.instanceTier = ""; + object.instanceDeleteTime = null; + } + if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + object.databaseInstalledVersion = message.databaseInstalledVersion; + if (message.finalBackup != null && message.hasOwnProperty("finalBackup")) + object.finalBackup = message.finalBackup; + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) + object.sourceInstance = message.sourceInstance; if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + object.instanceTier = message.instanceTier; + if (message.instanceDeleteTime != null && message.hasOwnProperty("instanceDeleteTime")) + object.instanceDeleteTime = $root.google.protobuf.Timestamp.toObject(message.instanceDeleteTime, options); return object; }; /** - * Converts this CloudSqlInstanceBackupPlanAssociationProperties to JSON. + * Converts this CloudSqlInstanceBackupProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @instance * @returns {Object.} JSON object */ - CloudSqlInstanceBackupPlanAssociationProperties.prototype.toJSON = function toJSON() { + CloudSqlInstanceBackupProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlInstanceBackupPlanAssociationProperties + * Gets the default type url for CloudSqlInstanceBackupProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlInstanceBackupPlanAssociationProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudSqlInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties"; }; - return CloudSqlInstanceBackupPlanAssociationProperties; + return CloudSqlInstanceBackupProperties; })(); - v1.BackupVault = (function() { + v1.CloudSqlInstanceDataSourceReferenceProperties = (function() { /** - * Properties of a BackupVault. + * Properties of a CloudSqlInstanceDataSourceReferenceProperties. * @memberof google.cloud.backupdr.v1 - * @interface IBackupVault - * @property {string|null} [name] BackupVault name - * @property {string|null} [description] BackupVault description - * @property {Object.|null} [labels] BackupVault labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime - * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration - * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] BackupVault backupRetentionInheritance - * @property {boolean|null} [deletable] BackupVault deletable - * @property {string|null} [etag] BackupVault etag - * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state - * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime - * @property {number|Long|null} [backupCount] BackupVault backupCount - * @property {string|null} [serviceAccount] BackupVault serviceAccount - * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes - * @property {string|null} [uid] BackupVault uid - * @property {Object.|null} [annotations] BackupVault annotations - * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction - * @property {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null} [encryptionConfig] BackupVault encryptionConfig + * @interface ICloudSqlInstanceDataSourceReferenceProperties + * @property {string|null} [name] CloudSqlInstanceDataSourceReferenceProperties name + * @property {string|null} [databaseInstalledVersion] CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion + * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime + * @property {string|null} [instanceTier] CloudSqlInstanceDataSourceReferenceProperties instanceTier */ /** - * Constructs a new BackupVault. + * Constructs a new CloudSqlInstanceDataSourceReferenceProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupVault. - * @implements IBackupVault + * @classdesc Represents a CloudSqlInstanceDataSourceReferenceProperties. + * @implements ICloudSqlInstanceDataSourceReferenceProperties * @constructor - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties=} [properties] Properties to set */ - function BackupVault(properties) { - this.labels = {}; - this.annotations = {}; + function CloudSqlInstanceDataSourceReferenceProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14814,412 +14811,354 @@ } /** - * BackupVault name. + * CloudSqlInstanceDataSourceReferenceProperties name. * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties * @instance */ - BackupVault.prototype.name = ""; + CloudSqlInstanceDataSourceReferenceProperties.prototype.name = ""; /** - * BackupVault description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.BackupVault + * CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion. + * @member {string} databaseInstalledVersion + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties * @instance */ - BackupVault.prototype.description = null; + CloudSqlInstanceDataSourceReferenceProperties.prototype.databaseInstalledVersion = ""; /** - * BackupVault labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupVault + * CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties * @instance */ - BackupVault.prototype.labels = $util.emptyObject; + CloudSqlInstanceDataSourceReferenceProperties.prototype.instanceCreateTime = null; /** - * BackupVault createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupVault + * CloudSqlInstanceDataSourceReferenceProperties instanceTier. + * @member {string} instanceTier + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties * @instance */ - BackupVault.prototype.createTime = null; + CloudSqlInstanceDataSourceReferenceProperties.prototype.instanceTier = ""; /** - * BackupVault updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Creates a new CloudSqlInstanceDataSourceReferenceProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties instance */ - BackupVault.prototype.updateTime = null; + CloudSqlInstanceDataSourceReferenceProperties.create = function create(properties) { + return new CloudSqlInstanceDataSourceReferenceProperties(properties); + }; /** - * BackupVault backupMinimumEnforcedRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + CloudSqlInstanceDataSourceReferenceProperties.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.databaseInstalledVersion != null && Object.hasOwnProperty.call(message, "databaseInstalledVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.databaseInstalledVersion); + if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.instanceTier != null && Object.hasOwnProperty.call(message, "instanceTier")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instanceTier); + return writer; + }; /** - * BackupVault backupRetentionInheritance. - * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BackupVault.prototype.backupRetentionInheritance = null; - + CloudSqlInstanceDataSourceReferenceProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + /** - * BackupVault deletable. - * @member {boolean|null|undefined} deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupVault.prototype.deletable = null; + CloudSqlInstanceDataSourceReferenceProperties.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.databaseInstalledVersion = reader.string(); + break; + } + case 3: { + message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.instanceTier = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * BackupVault etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupVault.prototype.etag = null; + CloudSqlInstanceDataSourceReferenceProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * BackupVault state. - * @member {google.cloud.backupdr.v1.BackupVault.State} state - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Verifies a CloudSqlInstanceDataSourceReferenceProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupVault.prototype.state = 0; + CloudSqlInstanceDataSourceReferenceProperties.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.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + if (!$util.isString(message.databaseInstalledVersion)) + return "databaseInstalledVersion: string expected"; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); + if (error) + return "instanceCreateTime." + error; + } + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + if (!$util.isString(message.instanceTier)) + return "instanceTier: string expected"; + return null; + }; /** - * BackupVault effectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Creates a CloudSqlInstanceDataSourceReferenceProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} CloudSqlInstanceDataSourceReferenceProperties */ - BackupVault.prototype.effectiveTime = null; + CloudSqlInstanceDataSourceReferenceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.databaseInstalledVersion != null) + message.databaseInstalledVersion = String(object.databaseInstalledVersion); + if (object.instanceCreateTime != null) { + if (typeof object.instanceCreateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.instanceCreateTime: object expected"); + message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); + } + if (object.instanceTier != null) + message.instanceTier = String(object.instanceTier); + return message; + }; /** - * BackupVault backupCount. - * @member {number|Long} backupCount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Creates a plain object from a CloudSqlInstanceDataSourceReferenceProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties} message CloudSqlInstanceDataSourceReferenceProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CloudSqlInstanceDataSourceReferenceProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.databaseInstalledVersion = ""; + object.instanceCreateTime = null; + object.instanceTier = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.databaseInstalledVersion != null && message.hasOwnProperty("databaseInstalledVersion")) + object.databaseInstalledVersion = message.databaseInstalledVersion; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) + object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); + if (message.instanceTier != null && message.hasOwnProperty("instanceTier")) + object.instanceTier = message.instanceTier; + return object; + }; /** - * BackupVault serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.backupdr.v1.BackupVault + * Converts this CloudSqlInstanceDataSourceReferenceProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties * @instance + * @returns {Object.} JSON object */ - BackupVault.prototype.serviceAccount = ""; + CloudSqlInstanceDataSourceReferenceProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * BackupVault totalStoredBytes. - * @member {number|Long} totalStoredBytes - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Gets the default type url for CloudSqlInstanceDataSourceReferenceProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CloudSqlInstanceDataSourceReferenceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties"; + }; + + return CloudSqlInstanceDataSourceReferenceProperties; + })(); + + v1.CloudSqlInstanceInitializationConfig = (function() { /** - * BackupVault uid. - * @member {string} uid - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Properties of a CloudSqlInstanceInitializationConfig. + * @memberof google.cloud.backupdr.v1 + * @interface ICloudSqlInstanceInitializationConfig + * @property {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition|null} [edition] CloudSqlInstanceInitializationConfig edition */ - BackupVault.prototype.uid = ""; /** - * BackupVault annotations. - * @member {Object.} annotations - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Constructs a new CloudSqlInstanceInitializationConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CloudSqlInstanceInitializationConfig. + * @implements ICloudSqlInstanceInitializationConfig + * @constructor + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig=} [properties] Properties to set */ - BackupVault.prototype.annotations = $util.emptyObject; + function CloudSqlInstanceInitializationConfig(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]]; + } /** - * BackupVault accessRestriction. - * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction - * @memberof google.cloud.backupdr.v1.BackupVault + * CloudSqlInstanceInitializationConfig edition. + * @member {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition} edition + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @instance */ - BackupVault.prototype.accessRestriction = 0; + CloudSqlInstanceInitializationConfig.prototype.edition = 0; /** - * BackupVault encryptionConfig. - * @member {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null|undefined} encryptionConfig - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance + * Creates a new CloudSqlInstanceInitializationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig instance */ - BackupVault.prototype.encryptionConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_backupRetentionInheritance", { - get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_deletable", { - get: $util.oneOfGetter($oneOfFields = ["deletable"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_effectiveTime", { - get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(BackupVault.prototype, "_encryptionConfig", { - get: $util.oneOfGetter($oneOfFields = ["encryptionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupVault instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance - */ - BackupVault.create = function create(properties) { - return new BackupVault(properties); - }; + CloudSqlInstanceInitializationConfig.create = function create(properties) { + return new CloudSqlInstanceInitializationConfig(properties); + }; /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * Encodes the specified CloudSqlInstanceInitializationConfig message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupVault.encode = function encode(message, writer) { + CloudSqlInstanceInitializationConfig.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) - $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); - if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) - $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); - if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) - writer.uint32(/* id 27, wireType 0 =*/216).int32(message.backupRetentionInheritance); - if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.edition); return writer; }; /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * Encodes the specified CloudSqlInstanceInitializationConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlInstanceInitializationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupVault message from the specified reader or buffer. + * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupVault.decode = function decode(reader, length, error) { + CloudSqlInstanceInitializationConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupVault(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 27: { - message.backupRetentionInheritance = reader.int32(); - break; - } - case 8: { - message.deletable = reader.bool(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.state = reader.int32(); - break; - } - case 12: { - message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.backupCount = reader.int64(); - break; - } - case 18: { - message.serviceAccount = reader.string(); - break; - } - case 19: { - message.totalStoredBytes = reader.int64(); - break; - } - case 21: { - message.uid = reader.string(); - break; - } - case 22: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.annotations[key] = value; - break; - } - case 24: { - message.accessRestriction = reader.int32(); - break; - } - case 29: { - message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.decode(reader, reader.uint32()); + message.edition = reader.int32(); break; } default: @@ -15231,769 +15170,391 @@ }; /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupVault.decodeDelimited = function decodeDelimited(reader) { + CloudSqlInstanceInitializationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupVault message. + * Verifies a CloudSqlInstanceInitializationConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupVault.verify = function verify(message) { + CloudSqlInstanceInitializationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - properties._backupMinimumEnforcedRetentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); - if (error) - return "backupMinimumEnforcedRetentionDuration." + error; - } - } - if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { - properties._backupRetentionInheritance = 1; - switch (message.backupRetentionInheritance) { - default: - return "backupRetentionInheritance: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - properties._deletable = 1; - if (typeof message.deletable !== "boolean") - return "deletable: boolean expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: string expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - properties._effectiveTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); - if (error) - return "effectiveTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - switch (message.accessRestriction) { + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { default: - return "accessRestriction: enum value expected"; + return "edition: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - properties._encryptionConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify(message.encryptionConfig); - if (error) - return "encryptionConfig." + error; - } - } return null; }; /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlInstanceInitializationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupVault + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} CloudSqlInstanceInitializationConfig */ - BackupVault.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) + CloudSqlInstanceInitializationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig) return object; - var message = new $root.google.cloud.backupdr.v1.BackupVault(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupMinimumEnforcedRetentionDuration != null) { - if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); - } - switch (object.backupRetentionInheritance) { - default: - if (typeof object.backupRetentionInheritance === "number") { - message.backupRetentionInheritance = object.backupRetentionInheritance; - break; - } - break; - case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": - case 0: - message.backupRetentionInheritance = 0; - break; - case "INHERIT_VAULT_RETENTION": - case 1: - message.backupRetentionInheritance = 1; - break; - case "MATCH_BACKUP_EXPIRE_TIME": - case 2: - message.backupRetentionInheritance = 2; - break; - } - if (object.deletable != null) - message.deletable = Boolean(object.deletable); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.state) { + var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig(); + switch (object.edition) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.edition === "number") { + message.edition = object.edition; break; } break; - case "STATE_UNSPECIFIED": + case "EDITION_UNSPECIFIED": case 0: - message.state = 0; + message.edition = 0; break; - case "CREATING": + case "ENTERPRISE": case 1: - message.state = 1; + message.edition = 1; break; - case "ACTIVE": + case "ENTERPRISE_PLUS": case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "UPDATING": - case 5: - message.state = 5; + message.edition = 2; break; } - if (object.effectiveTime != null) { - if (typeof object.effectiveTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); - message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); + return message; + }; + + /** + * Creates a plain object from a CloudSqlInstanceInitializationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @static + * @param {google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig} message CloudSqlInstanceInitializationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlInstanceInitializationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition[message.edition] === undefined ? message.edition : $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this CloudSqlInstanceInitializationConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @instance + * @returns {Object.} JSON object + */ + CloudSqlInstanceInitializationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlInstanceInitializationConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlInstanceInitializationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - if (object.uid != null) - message.uid = String(object.uid); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - switch (object.accessRestriction) { - default: - if (typeof object.accessRestriction === "number") { - message.accessRestriction = object.accessRestriction; - break; - } - break; - case "ACCESS_RESTRICTION_UNSPECIFIED": - case 0: - message.accessRestriction = 0; - break; - case "WITHIN_PROJECT": - case 1: - message.accessRestriction = 1; - break; - case "WITHIN_ORGANIZATION": - case 2: - message.accessRestriction = 2; - break; - case "UNRESTRICTED": - case 3: - message.accessRestriction = 3; - break; - case "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA": - case 4: - message.accessRestriction = 4; - break; - } - if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.fromObject(object.encryptionConfig); - } - return message; + return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig"; }; /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Edition enum. + * @name google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.Edition + * @enum {number} + * @property {number} EDITION_UNSPECIFIED=0 EDITION_UNSPECIFIED value + * @property {number} ENTERPRISE=1 ENTERPRISE value + * @property {number} ENTERPRISE_PLUS=2 ENTERPRISE_PLUS value */ - BackupVault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupCount = options.longs === String ? "0" : 0; - object.serviceAccount = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalStoredBytes = options.longs === String ? "0" : 0; - object.uid = ""; - object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - object.deletable = message.deletable; - if (options.oneofs) - object._deletable = "deletable"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; - if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); - if (options.oneofs) - object._effectiveTime = "effectiveTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); - if (options.oneofs) - object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; - } - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; - if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { - object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; - if (options.oneofs) - object._backupRetentionInheritance = "backupRetentionInheritance"; - } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - object.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.toObject(message.encryptionConfig, options); - if (options.oneofs) - object._encryptionConfig = "encryptionConfig"; - } - return object; - }; + CloudSqlInstanceInitializationConfig.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTERPRISE"] = 1; + values[valuesById[2] = "ENTERPRISE_PLUS"] = 2; + return values; + })(); + + return CloudSqlInstanceInitializationConfig; + })(); + + v1.CloudSqlInstanceBackupPlanAssociationProperties = (function() { /** - * Converts this BackupVault to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupVault + * Properties of a CloudSqlInstanceBackupPlanAssociationProperties. + * @memberof google.cloud.backupdr.v1 + * @interface ICloudSqlInstanceBackupPlanAssociationProperties + * @property {google.protobuf.ITimestamp|null} [instanceCreateTime] CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime + */ + + /** + * Constructs a new CloudSqlInstanceBackupPlanAssociationProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CloudSqlInstanceBackupPlanAssociationProperties. + * @implements ICloudSqlInstanceBackupPlanAssociationProperties + * @constructor + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties=} [properties] Properties to set + */ + function CloudSqlInstanceBackupPlanAssociationProperties(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]]; + } + + /** + * CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} instanceCreateTime + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties * @instance - * @returns {Object.} JSON object */ - BackupVault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + CloudSqlInstanceBackupPlanAssociationProperties.prototype.instanceCreateTime = null; /** - * Gets the default type url for BackupVault - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupVault + * Creates a new CloudSqlInstanceBackupPlanAssociationProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties instance */ - BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; + CloudSqlInstanceBackupPlanAssociationProperties.create = function create(properties) { + return new CloudSqlInstanceBackupPlanAssociationProperties(properties); }; /** - * BackupRetentionInheritance enum. - * @name google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance - * @enum {number} - * @property {number} BACKUP_RETENTION_INHERITANCE_UNSPECIFIED=0 BACKUP_RETENTION_INHERITANCE_UNSPECIFIED value - * @property {number} INHERIT_VAULT_RETENTION=1 INHERIT_VAULT_RETENTION value - * @property {number} MATCH_BACKUP_EXPIRE_TIME=2 MATCH_BACKUP_EXPIRE_TIME value + * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BackupVault.BackupRetentionInheritance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERIT_VAULT_RETENTION"] = 1; - values[valuesById[2] = "MATCH_BACKUP_EXPIRE_TIME"] = 2; - return values; - })(); + CloudSqlInstanceBackupPlanAssociationProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceCreateTime != null && Object.hasOwnProperty.call(message, "instanceCreateTime")) + $root.google.protobuf.Timestamp.encode(message.instanceCreateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * State enum. - * @name google.cloud.backupdr.v1.BackupVault.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - * @property {number} UPDATING=5 UPDATING value + * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {google.cloud.backupdr.v1.ICloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BackupVault.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "UPDATING"] = 5; - return values; - })(); + CloudSqlInstanceBackupPlanAssociationProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * AccessRestriction enum. - * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction - * @enum {number} - * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value - * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value - * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value - * @property {number} UNRESTRICTED=3 UNRESTRICTED value - * @property {number} WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA=4 WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA value + * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupVault.AccessRestriction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "WITHIN_PROJECT"] = 1; - values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; - values[valuesById[3] = "UNRESTRICTED"] = 3; - values[valuesById[4] = "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA"] = 4; - return values; - })(); - - BackupVault.EncryptionConfig = (function() { + CloudSqlInstanceBackupPlanAssociationProperties.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.instanceCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of an EncryptionConfig. - * @memberof google.cloud.backupdr.v1.BackupVault - * @interface IEncryptionConfig - * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName - */ + /** + * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlInstanceBackupPlanAssociationProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new EncryptionConfig. - * @memberof google.cloud.backupdr.v1.BackupVault - * @classdesc Represents an EncryptionConfig. - * @implements IEncryptionConfig - * @constructor - * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set - */ - function EncryptionConfig(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]]; + /** + * Verifies a CloudSqlInstanceBackupPlanAssociationProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlInstanceBackupPlanAssociationProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.instanceCreateTime); + if (error) + return "instanceCreateTime." + error; } + return null; + }; - /** - * EncryptionConfig kmsKeyName. - * @member {string|null|undefined} kmsKeyName - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @instance - */ - EncryptionConfig.prototype.kmsKeyName = null; + /** + * Creates a CloudSqlInstanceBackupPlanAssociationProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} CloudSqlInstanceBackupPlanAssociationProperties + */ + CloudSqlInstanceBackupPlanAssociationProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties(); + if (object.instanceCreateTime != null) { + if (typeof object.instanceCreateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.instanceCreateTime: object expected"); + message.instanceCreateTime = $root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime); + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a CloudSqlInstanceBackupPlanAssociationProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties} message CloudSqlInstanceBackupPlanAssociationProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlInstanceBackupPlanAssociationProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.instanceCreateTime = null; + if (message.instanceCreateTime != null && message.hasOwnProperty("instanceCreateTime")) + object.instanceCreateTime = $root.google.protobuf.Timestamp.toObject(message.instanceCreateTime, options); + return object; + }; - // Virtual OneOf for proto3 optional field - Object.defineProperty(EncryptionConfig.prototype, "_kmsKeyName", { - get: $util.oneOfGetter($oneOfFields = ["kmsKeyName"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this CloudSqlInstanceBackupPlanAssociationProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @instance + * @returns {Object.} JSON object + */ + CloudSqlInstanceBackupPlanAssociationProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new EncryptionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig instance - */ - EncryptionConfig.create = function create(properties) { - return new EncryptionConfig(properties); - }; + /** + * Gets the default type url for CloudSqlInstanceBackupPlanAssociationProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlInstanceBackupPlanAssociationProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties"; + }; - /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - return writer; - }; + return CloudSqlInstanceBackupPlanAssociationProperties; + })(); - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EncryptionConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EncryptionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - properties._kmsKeyName = 1; - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - } - return null; - }; - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig - */ - EncryptionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - return message; - }; - - /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} message EncryptionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EncryptionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - object.kmsKeyName = message.kmsKeyName; - if (options.oneofs) - object._kmsKeyName = "kmsKeyName"; - } - return object; - }; - - /** - * Converts this EncryptionConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @instance - * @returns {Object.} JSON object - */ - EncryptionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EncryptionConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault.EncryptionConfig"; - }; - - return EncryptionConfig; - })(); - - return BackupVault; - })(); - - v1.DataSource = (function() { + v1.BackupVault = (function() { /** - * Properties of a DataSource. + * Properties of a BackupVault. * @memberof google.cloud.backupdr.v1 - * @interface IDataSource - * @property {string|null} [name] DataSource name - * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state - * @property {Object.|null} [labels] DataSource labels - * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime - * @property {number|Long|null} [backupCount] DataSource backupCount - * @property {string|null} [etag] DataSource etag - * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState - * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo - * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource - * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication - * @property {boolean|null} [backupBlockedByVaultAccessRestriction] DataSource backupBlockedByVaultAccessRestriction + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime + * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] BackupVault backupRetentionInheritance + * @property {boolean|null} [deletable] BackupVault deletable + * @property {string|null} [etag] BackupVault etag + * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime + * @property {number|Long|null} [backupCount] BackupVault backupCount + * @property {string|null} [serviceAccount] BackupVault serviceAccount + * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes + * @property {string|null} [uid] BackupVault uid + * @property {Object.|null} [annotations] BackupVault annotations + * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + * @property {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null} [encryptionConfig] BackupVault encryptionConfig */ /** - * Constructs a new DataSource. + * Constructs a new BackupVault. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource + * @classdesc Represents a BackupVault. + * @implements IBackupVault * @constructor - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set */ - function DataSource(properties) { + function BackupVault(properties) { this.labels = {}; + this.annotations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16001,235 +15562,299 @@ } /** - * DataSource name. + * BackupVault name. * @member {string} name - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.name = ""; + BackupVault.prototype.name = ""; /** - * DataSource state. - * @member {google.cloud.backupdr.v1.DataSource.State} state - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.state = 0; + BackupVault.prototype.description = null; /** - * DataSource labels. + * BackupVault labels. * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.labels = $util.emptyObject; + BackupVault.prototype.labels = $util.emptyObject; /** - * DataSource createTime. + * BackupVault createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.createTime = null; + BackupVault.prototype.createTime = null; /** - * DataSource updateTime. + * BackupVault updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.updateTime = null; + BackupVault.prototype.updateTime = null; /** - * DataSource backupCount. - * @member {number|Long|null|undefined} backupCount - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault backupMinimumEnforcedRetentionDuration. + * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.backupCount = null; + BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; /** - * DataSource etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault backupRetentionInheritance. + * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.etag = null; + BackupVault.prototype.backupRetentionInheritance = null; /** - * DataSource totalStoredBytes. - * @member {number|Long|null|undefined} totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault deletable. + * @member {boolean|null|undefined} deletable + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.totalStoredBytes = null; + BackupVault.prototype.deletable = null; /** - * DataSource configState. - * @member {google.cloud.backupdr.v1.BackupConfigState} configState - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.configState = 0; + BackupVault.prototype.etag = null; /** - * DataSource backupConfigInfo. - * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault state. + * @member {google.cloud.backupdr.v1.BackupVault.State} state + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.backupConfigInfo = null; + BackupVault.prototype.state = 0; /** - * DataSource dataSourceGcpResource. - * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault effectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.dataSourceGcpResource = null; + BackupVault.prototype.effectiveTime = null; /** - * DataSource dataSourceBackupApplianceApplication. - * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault backupCount. + * @member {number|Long} backupCount + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.dataSourceBackupApplianceApplication = null; + BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DataSource backupBlockedByVaultAccessRestriction. - * @member {boolean} backupBlockedByVaultAccessRestriction - * @memberof google.cloud.backupdr.v1.DataSource + * BackupVault serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.backupdr.v1.BackupVault * @instance */ - DataSource.prototype.backupBlockedByVaultAccessRestriction = false; + BackupVault.prototype.serviceAccount = ""; + + /** + * BackupVault totalStoredBytes. + * @member {number|Long} totalStoredBytes + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault uid. + * @member {string} uid + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.uid = ""; + + /** + * BackupVault annotations. + * @member {Object.} annotations + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.annotations = $util.emptyObject; + + /** + * BackupVault accessRestriction. + * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.accessRestriction = 0; + + /** + * BackupVault encryptionConfig. + * @member {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.encryptionConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; // Virtual OneOf for proto3 optional field - Object.defineProperty(DataSource.prototype, "_createTime", { + Object.defineProperty(BackupVault.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_createTime", { get: $util.oneOfGetter($oneOfFields = ["createTime"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(DataSource.prototype, "_updateTime", { + Object.defineProperty(BackupVault.prototype, "_updateTime", { get: $util.oneOfGetter($oneOfFields = ["updateTime"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(DataSource.prototype, "_backupCount", { - get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(DataSource.prototype, "_etag", { + Object.defineProperty(BackupVault.prototype, "_backupRetentionInheritance", { + get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_deletable", { + get: $util.oneOfGetter($oneOfFields = ["deletable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_etag", { get: $util.oneOfGetter($oneOfFields = ["etag"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { - get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + Object.defineProperty(BackupVault.prototype, "_effectiveTime", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), set: $util.oneOfSetter($oneOfFields) }); - /** - * DataSource sourceResource. - * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "sourceResource", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + // Virtual OneOf for proto3 optional field + Object.defineProperty(BackupVault.prototype, "_encryptionConfig", { + get: $util.oneOfGetter($oneOfFields = ["encryptionConfig"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DataSource instance using the specified properties. + * Creates a new BackupVault instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance */ - DataSource.create = function create(properties) { - return new DataSource(properties); + BackupVault.create = function create(properties) { + return new BackupVault(properties); }; /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSource.encode = function encode(message, writer) { + BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) + $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); - if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); - if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) - $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) - $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) - $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.backupBlockedByVaultAccessRestriction != null && Object.hasOwnProperty.call(message, "backupBlockedByVaultAccessRestriction")) - writer.uint32(/* id 28, wireType 0 =*/224).bool(message.backupBlockedByVaultAccessRestriction); + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); + if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) + $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) + writer.uint32(/* id 27, wireType 0 =*/216).int32(message.backupRetentionInheritance); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSource.encodeDelimited = function encodeDelimited(message, writer) { + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataSource message from the specified reader or buffer. + * Decodes a BackupVault message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSource.decode = function decode(reader, length, error) { + BackupVault.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSource(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupVault(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16239,11 +15864,11 @@ message.name = reader.string(); break; } - case 21: { - message.state = reader.int32(); + case 2: { + message.description = reader.string(); break; } - case 4: { + case 3: { if (message.labels === $util.emptyObject) message.labels = {}; var end2 = reader.uint32() + reader.pos; @@ -16266,96 +15891,129 @@ message.labels[key] = value; break; } - case 5: { + case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 6: { + case 5: { message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 7: { - message.backupCount = reader.int64(); + case 20: { + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - case 14: { + case 27: { + message.backupRetentionInheritance = reader.int32(); + break; + } + case 8: { + message.deletable = reader.bool(); + break; + } + case 9: { message.etag = reader.string(); break; } - case 23: { - message.totalStoredBytes = reader.int64(); + case 10: { + message.state = reader.int32(); break; } - case 24: { - message.configState = reader.int32(); + case 12: { + message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 25: { - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + case 17: { + message.backupCount = reader.int64(); break; } - case 26: { - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + case 18: { + message.serviceAccount = reader.string(); break; } - case 27: { - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + case 19: { + message.totalStoredBytes = reader.int64(); break; } - case 28: { - message.backupBlockedByVaultAccessRestriction = reader.bool(); + case 21: { + message.uid = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - + case 22: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; + break; + } + case 24: { + message.accessRestriction = reader.int32(); + break; + } + case 29: { + message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + /** - * Verifies a DataSource message. + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. * @function verify - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataSource.verify = function verify(message) { + BackupVault.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } if (message.labels != null && message.hasOwnProperty("labels")) { if (!$util.isObject(message.labels)) return "labels: object expected"; @@ -16380,73 +16038,159 @@ return "updateTime." + error; } } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - properties._backupCount = 1; - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + properties._backupMinimumEnforcedRetentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); + if (error) + return "backupMinimumEnforcedRetentionDuration." + error; + } + } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + properties._backupRetentionInheritance = 1; + switch (message.backupRetentionInheritance) { + default: + return "backupRetentionInheritance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + properties._deletable = 1; + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; } if (message.etag != null && message.hasOwnProperty("etag")) { properties._etag = 1; if (!$util.isString(message.etag)) return "etag: string expected"; } - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - properties._totalStoredBytes = 1; - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - switch (message.configState) { + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "configState: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: + case 5: break; } - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { - var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); - if (error) - return "backupConfigInfo." + error; - } - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - properties.sourceResource = 1; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + properties._effectiveTime = 1; { - var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); if (error) - return "dataSourceGcpResource." + error; + return "effectiveTime." + error; } } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - if (properties.sourceResource === 1) - return "sourceResource: multiple values"; - properties.sourceResource = 1; + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + switch (message.accessRestriction) { + default: + return "accessRestriction: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + properties._encryptionConfig = 1; { - var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + var error = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify(message.encryptionConfig); if (error) - return "dataSourceBackupApplianceApplication." + error; + return "encryptionConfig." + error; } } - if (message.backupBlockedByVaultAccessRestriction != null && message.hasOwnProperty("backupBlockedByVaultAccessRestriction")) - if (typeof message.backupBlockedByVaultAccessRestriction !== "boolean") - return "backupBlockedByVaultAccessRestriction: boolean expected"; return null; }; /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSource) + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) return object; - var message = new $root.google.cloud.backupdr.v1.DataSource(); + var message = new $root.google.cloud.backupdr.v1.BackupVault(); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupMinimumEnforcedRetentionDuration != null) { + if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); + } + switch (object.backupRetentionInheritance) { + default: + if (typeof object.backupRetentionInheritance === "number") { + message.backupRetentionInheritance = object.backupRetentionInheritance; + break; + } + break; + case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": + case 0: + message.backupRetentionInheritance = 0; + break; + case "INHERIT_VAULT_RETENTION": + case 1: + message.backupRetentionInheritance = 1; + break; + case "MATCH_BACKUP_EXPIRE_TIME": + case 2: + message.backupRetentionInheritance = 2; + break; + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.etag != null) + message.etag = String(object.etag); switch (object.state) { default: if (typeof object.state === "number") { @@ -16474,23 +16218,15 @@ case 4: message.state = 4; break; + case "UPDATING": + case 5: + message.state = 5; + break; } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.effectiveTime != null) { + if (typeof object.effectiveTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); + message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); } if (object.backupCount != null) if ($util.Long) @@ -16501,8 +16237,8 @@ message.backupCount = object.backupCount; else if (typeof object.backupCount === "object") message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.etag != null) - message.etag = String(object.etag); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); if (object.totalStoredBytes != null) if ($util.Long) (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; @@ -16512,70 +16248,92 @@ message.totalStoredBytes = object.totalStoredBytes; else if (typeof object.totalStoredBytes === "object") message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - switch (object.configState) { + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + switch (object.accessRestriction) { default: - if (typeof object.configState === "number") { - message.configState = object.configState; + if (typeof object.accessRestriction === "number") { + message.accessRestriction = object.accessRestriction; break; } break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case "ACCESS_RESTRICTION_UNSPECIFIED": case 0: - message.configState = 0; + message.accessRestriction = 0; break; - case "ACTIVE": + case "WITHIN_PROJECT": case 1: - message.configState = 1; + message.accessRestriction = 1; break; - case "PASSIVE": + case "WITHIN_ORGANIZATION": case 2: - message.configState = 2; + message.accessRestriction = 2; + break; + case "UNRESTRICTED": + case 3: + message.accessRestriction = 3; + break; + case "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA": + case 4: + message.accessRestriction = 4; break; } - if (object.backupConfigInfo != null) { - if (typeof object.backupConfigInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); - } - if (object.dataSourceGcpResource != null) { - if (typeof object.dataSourceGcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); - } - if (object.dataSourceBackupApplianceApplication != null) { - if (typeof object.dataSourceBackupApplianceApplication !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.fromObject(object.encryptionConfig); } - if (object.backupBlockedByVaultAccessRestriction != null) - message.backupBlockedByVaultAccessRestriction = Boolean(object.backupBlockedByVaultAccessRestriction); return message; }; /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static - * @param {google.cloud.backupdr.v1.DataSource} message DataSource + * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataSource.toObject = function toObject(message, options) { + BackupVault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) + if (options.objects || options.defaults) { object.labels = {}; + object.annotations = {}; + } if (options.defaults) { object.name = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.backupConfigInfo = null; - object.backupBlockedByVaultAccessRestriction = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupCount = options.longs === String ? "0" : 0; + object.serviceAccount = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStoredBytes = options.longs === String ? "0" : 0; + object.uid = ""; + object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } var keys2; if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; @@ -16592,13 +16350,10 @@ if (options.oneofs) object._updateTime = "updateTime"; } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.deletable != null && message.hasOwnProperty("deletable")) { + object.deletable = message.deletable; if (options.oneofs) - object._backupCount = "backupCount"; + object._deletable = "deletable"; } if (message.etag != null && message.hasOwnProperty("etag")) { object.etag = message.etag; @@ -16606,657 +16361,697 @@ object._etag = "etag"; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); + if (options.oneofs) + object._effectiveTime = "effectiveTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) if (typeof message.totalStoredBytes === "number") object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; else object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); if (options.oneofs) - object._totalStoredBytes = "totalStoredBytes"; + object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; } - if (message.configState != null && message.hasOwnProperty("configState")) - object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) - object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; if (options.oneofs) - object.sourceResource = "dataSourceGcpResource"; + object._backupRetentionInheritance = "backupRetentionInheritance"; } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + object.encryptionConfig = $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig.toObject(message.encryptionConfig, options); if (options.oneofs) - object.sourceResource = "dataSourceBackupApplianceApplication"; + object._encryptionConfig = "encryptionConfig"; } - if (message.backupBlockedByVaultAccessRestriction != null && message.hasOwnProperty("backupBlockedByVaultAccessRestriction")) - object.backupBlockedByVaultAccessRestriction = message.backupBlockedByVaultAccessRestriction; return object; }; /** - * Converts this DataSource to JSON. + * Converts this BackupVault to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @instance * @returns {Object.} JSON object */ - DataSource.prototype.toJSON = function toJSON() { + BackupVault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataSource + * Gets the default type url for BackupVault * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSource + * @memberof google.cloud.backupdr.v1.BackupVault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; }; + /** + * BackupRetentionInheritance enum. + * @name google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance + * @enum {number} + * @property {number} BACKUP_RETENTION_INHERITANCE_UNSPECIFIED=0 BACKUP_RETENTION_INHERITANCE_UNSPECIFIED value + * @property {number} INHERIT_VAULT_RETENTION=1 INHERIT_VAULT_RETENTION value + * @property {number} MATCH_BACKUP_EXPIRE_TIME=2 MATCH_BACKUP_EXPIRE_TIME value + */ + BackupVault.BackupRetentionInheritance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_VAULT_RETENTION"] = 1; + values[valuesById[2] = "MATCH_BACKUP_EXPIRE_TIME"] = 2; + return values; + })(); + /** * State enum. - * @name google.cloud.backupdr.v1.DataSource.State + * @name google.cloud.backupdr.v1.BackupVault.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} ACTIVE=2 ACTIVE value * @property {number} DELETING=3 DELETING value * @property {number} ERROR=4 ERROR value + * @property {number} UPDATING=5 UPDATING value */ - DataSource.State = (function() { + BackupVault.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "CREATING"] = 1; values[valuesById[2] = "ACTIVE"] = 2; values[valuesById[3] = "DELETING"] = 3; values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "UPDATING"] = 5; return values; })(); - return DataSource; - })(); - - v1.BackupConfigInfo = (function() { - /** - * Properties of a BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupConfigInfo - * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime - * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError - * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig - */ - - /** - * Constructs a new BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupConfigInfo. - * @implements IBackupConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * AccessRestriction enum. + * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction + * @enum {number} + * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value + * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value + * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value + * @property {number} UNRESTRICTED=3 UNRESTRICTED value + * @property {number} WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA=4 WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA value */ - function BackupConfigInfo(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]]; - } + BackupVault.AccessRestriction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WITHIN_PROJECT"] = 1; + values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; + values[valuesById[3] = "UNRESTRICTED"] = 3; + values[valuesById[4] = "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA"] = 4; + return values; + })(); - /** - * BackupConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupState = 0; + BackupVault.EncryptionConfig = (function() { - /** - * BackupConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.backupdr.v1.BackupVault + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ - /** - * BackupConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupError = null; - - /** - * BackupConfigInfo gcpBackupConfig. - * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.gcpBackupConfig = null; + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.backupdr.v1.BackupVault + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(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]]; + } - /** - * BackupConfigInfo backupApplianceBackupConfig. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.backupApplianceBackupConfig = null; + /** + * EncryptionConfig kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * BackupConfigInfo backupConfig. - * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncryptionConfig.prototype, "_kmsKeyName", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance - */ - BackupConfigInfo.create = function create(properties) { - return new BackupConfigInfo(properties); - }; + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) - $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.lastBackupState = reader.int32(); - break; - } - case 2: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 5: { - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a BackupConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + properties._kmsKeyName = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); - if (error) - return "gcpBackupConfig." + error; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {google.cloud.backupdr.v1.BackupVault.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object._kmsKeyName = "kmsKeyName"; } - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - if (properties.backupConfig === 1) - return "backupConfig: multiple values"; - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); - if (error) - return "backupApplianceBackupConfig." + error; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return null; - }; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + return BackupVault; + })(); + + v1.DataSource = (function() { /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * Properties of a DataSource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state + * @property {Object.|null} [labels] DataSource labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime + * @property {number|Long|null} [backupCount] DataSource backupCount + * @property {string|null} [etag] DataSource etag + * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState + * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo + * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource + * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication + * @property {boolean|null} [backupBlockedByVaultAccessRestriction] DataSource backupBlockedByVaultAccessRestriction */ - BackupConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "SUCCEEDED": - case 2: - message.lastBackupState = 2; - break; - case "FAILED": - case 3: - message.lastBackupState = 3; - break; - case "PERMISSION_DENIED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.gcpBackupConfig != null) { - if (typeof object.gcpBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); - } - if (object.backupApplianceBackupConfig != null) { - if (typeof object.backupApplianceBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); - } - return message; - }; /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Constructs a new DataSource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set */ - BackupConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastSuccessfulBackupConsistencyTime = null; - object.lastBackupError = null; - } - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); - if (options.oneofs) - object.backupConfig = "gcpBackupConfig"; - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); - if (options.oneofs) - object.backupConfig = "backupApplianceBackupConfig"; - } - return object; - }; + function DataSource(properties) { + this.labels = {}; + 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]]; + } /** - * Converts this BackupConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * DataSource name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DataSource * @instance - * @returns {Object.} JSON object */ - BackupConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + DataSource.prototype.name = ""; /** - * Gets the default type url for BackupConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * DataSource state. + * @member {google.cloud.backupdr.v1.DataSource.State} state + * @memberof google.cloud.backupdr.v1.DataSource + * @instance */ - BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; - }; + DataSource.prototype.state = 0; /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + * DataSource labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.DataSource + * @instance */ - BackupConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - return values; - })(); + DataSource.prototype.labels = $util.emptyObject; - return BackupConfigInfo; - })(); + /** + * DataSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.createTime = null; - v1.GcpBackupConfig = (function() { + /** + * DataSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.updateTime = null; /** - * Properties of a GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpBackupConfig - * @property {string|null} [backupPlan] GcpBackupConfig backupPlan - * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription - * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation - * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules - * @property {string|null} [backupPlanRevisionName] GcpBackupConfig backupPlanRevisionName - * @property {string|null} [backupPlanRevisionId] GcpBackupConfig backupPlanRevisionId + * DataSource backupCount. + * @member {number|Long|null|undefined} backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance */ + DataSource.prototype.backupCount = null; /** - * Constructs a new GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpBackupConfig. - * @implements IGcpBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * DataSource etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance */ - function GcpBackupConfig(properties) { - this.backupPlanRules = []; - 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]]; - } + DataSource.prototype.etag = null; /** - * GcpBackupConfig backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlan = ""; + DataSource.prototype.totalStoredBytes = null; /** - * GcpBackupConfig backupPlanDescription. - * @member {string} backupPlanDescription - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource configState. + * @member {google.cloud.backupdr.v1.BackupConfigState} configState + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlanDescription = ""; + DataSource.prototype.configState = 0; /** - * GcpBackupConfig backupPlanAssociation. - * @member {string} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource backupConfigInfo. + * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlanAssociation = ""; + DataSource.prototype.backupConfigInfo = null; /** - * GcpBackupConfig backupPlanRules. - * @member {Array.} backupPlanRules - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource dataSourceGcpResource. + * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; + DataSource.prototype.dataSourceGcpResource = null; /** - * GcpBackupConfig backupPlanRevisionName. - * @member {string} backupPlanRevisionName - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource dataSourceBackupApplianceApplication. + * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlanRevisionName = ""; + DataSource.prototype.dataSourceBackupApplianceApplication = null; /** - * GcpBackupConfig backupPlanRevisionId. - * @member {string} backupPlanRevisionId - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * DataSource backupBlockedByVaultAccessRestriction. + * @member {boolean} backupBlockedByVaultAccessRestriction + * @memberof google.cloud.backupdr.v1.DataSource * @instance */ - GcpBackupConfig.prototype.backupPlanRevisionId = ""; + DataSource.prototype.backupBlockedByVaultAccessRestriction = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSource.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSource.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSource.prototype, "_backupCount", { + get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSource.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GcpBackupConfig instance using the specified properties. + * DataSource sourceResource. + * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance */ - GcpBackupConfig.create = function create(properties) { - return new GcpBackupConfig(properties); + DataSource.create = function create(properties) { + return new DataSource(properties); }; /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcpBackupConfig.encode = function encode(message, writer) { + DataSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); - if (message.backupPlanRules != null && message.backupPlanRules.length) - for (var i = 0; i < message.backupPlanRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); - if (message.backupPlanRevisionName != null && Object.hasOwnProperty.call(message, "backupPlanRevisionName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupPlanRevisionName); - if (message.backupPlanRevisionId != null && Object.hasOwnProperty.call(message, "backupPlanRevisionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.backupPlanRevisionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); + if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); + if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) + $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) + $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) + $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.backupBlockedByVaultAccessRestriction != null && Object.hasOwnProperty.call(message, "backupBlockedByVaultAccessRestriction")) + writer.uint32(/* id 28, wireType 0 =*/224).bool(message.backupBlockedByVaultAccessRestriction); return writer; }; /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + DataSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. + * Decodes a DataSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @returns {google.cloud.backupdr.v1.DataSource} DataSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpBackupConfig.decode = function decode(reader, length, error) { + DataSource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanDescription = reader.string(); + message.name = reader.string(); break; } - case 3: { - message.backupPlanAssociation = reader.string(); + case 21: { + message.state = reader.int32(); break; } case 4: { - if (!(message.backupPlanRules && message.backupPlanRules.length)) - message.backupPlanRules = []; - message.backupPlanRules.push(reader.string()); + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } case 5: { - message.backupPlanRevisionName = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 6: { - message.backupPlanRevisionId = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.backupCount = reader.int64(); + break; + } + case 14: { + message.etag = reader.string(); + break; + } + case 23: { + message.totalStoredBytes = reader.int64(); + break; + } + case 24: { + message.configState = reader.int32(); + break; + } + case 25: { + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + break; + } + case 27: { + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + break; + } + case 28: { + message.backupBlockedByVaultAccessRestriction = reader.bool(); break; } default: @@ -17268,182 +17063,396 @@ }; /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * Decodes a DataSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @returns {google.cloud.backupdr.v1.DataSource} DataSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { + DataSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcpBackupConfig message. + * Verifies a DataSource message. * @function verify - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcpBackupConfig.verify = function verify(message) { + DataSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - if (!$util.isString(message.backupPlanDescription)) - return "backupPlanDescription: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - if (!$util.isString(message.backupPlanAssociation)) - return "backupPlanAssociation: string expected"; - if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { - if (!Array.isArray(message.backupPlanRules)) - return "backupPlanRules: array expected"; - for (var i = 0; i < message.backupPlanRules.length; ++i) - if (!$util.isString(message.backupPlanRules[i])) - return "backupPlanRules: string[] expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) - if (!$util.isString(message.backupPlanRevisionName)) - return "backupPlanRevisionName: string expected"; - if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) - if (!$util.isString(message.backupPlanRevisionId)) - return "backupPlanRevisionId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + properties._backupCount = 1; + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + switch (message.configState) { + default: + return "configState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { + var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); + if (error) + return "backupConfigInfo." + error; + } + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + if (error) + return "dataSourceGcpResource." + error; + } + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + if (properties.sourceResource === 1) + return "sourceResource: multiple values"; + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + if (error) + return "dataSourceBackupApplianceApplication." + error; + } + } + if (message.backupBlockedByVaultAccessRestriction != null && message.hasOwnProperty("backupBlockedByVaultAccessRestriction")) + if (typeof message.backupBlockedByVaultAccessRestriction !== "boolean") + return "backupBlockedByVaultAccessRestriction: boolean expected"; return null; }; /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @returns {google.cloud.backupdr.v1.DataSource} DataSource */ - GcpBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSource) return object; - var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanDescription != null) - message.backupPlanDescription = String(object.backupPlanDescription); - if (object.backupPlanAssociation != null) - message.backupPlanAssociation = String(object.backupPlanAssociation); - if (object.backupPlanRules) { - if (!Array.isArray(object.backupPlanRules)) - throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); - message.backupPlanRules = []; - for (var i = 0; i < object.backupPlanRules.length; ++i) - message.backupPlanRules[i] = String(object.backupPlanRules[i]); + var message = new $root.google.cloud.backupdr.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; } - if (object.backupPlanRevisionName != null) - message.backupPlanRevisionName = String(object.backupPlanRevisionName); - if (object.backupPlanRevisionId != null) - message.backupPlanRevisionId = String(object.backupPlanRevisionId); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.etag != null) + message.etag = String(object.etag); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + switch (object.configState) { + default: + if (typeof object.configState === "number") { + message.configState = object.configState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.configState = 0; + break; + case "ACTIVE": + case 1: + message.configState = 1; + break; + case "PASSIVE": + case 2: + message.configState = 2; + break; + } + if (object.backupConfigInfo != null) { + if (typeof object.backupConfigInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); + } + if (object.dataSourceGcpResource != null) { + if (typeof object.dataSourceGcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); + } + if (object.dataSourceBackupApplianceApplication != null) { + if (typeof object.dataSourceBackupApplianceApplication !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + } + if (object.backupBlockedByVaultAccessRestriction != null) + message.backupBlockedByVaultAccessRestriction = Boolean(object.backupBlockedByVaultAccessRestriction); return message; }; /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * Creates a plain object from a DataSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static - * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig + * @param {google.cloud.backupdr.v1.DataSource} message DataSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcpBackupConfig.toObject = function toObject(message, options) { + DataSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.backupPlanRules = []; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.backupPlan = ""; - object.backupPlanDescription = ""; - object.backupPlanAssociation = ""; - object.backupPlanRevisionName = ""; - object.backupPlanRevisionId = ""; + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.backupConfigInfo = null; + object.backupBlockedByVaultAccessRestriction = false; } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - object.backupPlanDescription = message.backupPlanDescription; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = message.backupPlanAssociation; - if (message.backupPlanRules && message.backupPlanRules.length) { - object.backupPlanRules = []; - for (var j = 0; j < message.backupPlanRules.length; ++j) - object.backupPlanRules[j] = message.backupPlanRules[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) - object.backupPlanRevisionName = message.backupPlanRevisionName; - if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) - object.backupPlanRevisionId = message.backupPlanRevisionId; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (options.oneofs) + object._backupCount = "backupCount"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) + object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (options.oneofs) + object.sourceResource = "dataSourceGcpResource"; + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (options.oneofs) + object.sourceResource = "dataSourceBackupApplianceApplication"; + } + if (message.backupBlockedByVaultAccessRestriction != null && message.hasOwnProperty("backupBlockedByVaultAccessRestriction")) + object.backupBlockedByVaultAccessRestriction = message.backupBlockedByVaultAccessRestriction; return object; }; /** - * Converts this GcpBackupConfig to JSON. + * Converts this DataSource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @instance * @returns {Object.} JSON object */ - GcpBackupConfig.prototype.toJSON = function toJSON() { + DataSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcpBackupConfig + * Gets the default type url for DataSource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @memberof google.cloud.backupdr.v1.DataSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; }; - return GcpBackupConfig; + /** + * State enum. + * @name google.cloud.backupdr.v1.DataSource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + DataSource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return DataSource; })(); - v1.BackupApplianceBackupConfig = (function() { + v1.BackupConfigInfo = (function() { /** - * Properties of a BackupApplianceBackupConfig. + * Properties of a BackupConfigInfo. * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupConfig - * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName - * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId - * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId - * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName - * @property {string|null} [hostName] BackupApplianceBackupConfig hostName - * @property {string|null} [sltName] BackupApplianceBackupConfig sltName - * @property {string|null} [slpName] BackupApplianceBackupConfig slpName + * @interface IBackupConfigInfo + * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime + * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError + * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig */ /** - * Constructs a new BackupApplianceBackupConfig. + * Constructs a new BackupConfigInfo. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupConfig. - * @implements IBackupApplianceBackupConfig + * @classdesc Represents a BackupConfigInfo. + * @implements IBackupConfigInfo * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set */ - function BackupApplianceBackupConfig(properties) { + function BackupConfigInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17451,161 +17460,147 @@ } /** - * BackupApplianceBackupConfig backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.backupApplianceName = ""; + BackupConfigInfo.prototype.lastBackupState = 0; /** - * BackupApplianceBackupConfig backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; /** - * BackupApplianceBackupConfig slaId. - * @member {number|Long} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupConfigInfo.prototype.lastBackupError = null; /** - * BackupApplianceBackupConfig applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo gcpBackupConfig. + * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.applicationName = ""; + BackupConfigInfo.prototype.gcpBackupConfig = null; /** - * BackupApplianceBackupConfig hostName. - * @member {string} hostName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo backupApplianceBackupConfig. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.hostName = ""; + BackupConfigInfo.prototype.backupApplianceBackupConfig = null; - /** - * BackupApplianceBackupConfig sltName. - * @member {string} sltName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.sltName = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BackupApplianceBackupConfig slpName. - * @member {string} slpName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * BackupConfigInfo backupConfig. + * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance */ - BackupApplianceBackupConfig.prototype.slpName = ""; + Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * Creates a new BackupConfigInfo instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance */ - BackupApplianceBackupConfig.create = function create(properties) { - return new BackupApplianceBackupConfig(properties); + BackupConfigInfo.create = function create(properties) { + return new BackupConfigInfo(properties); }; /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceBackupConfig.encode = function encode(message, writer) { + BackupConfigInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); - if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); - if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); - if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) + $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * Decodes a BackupConfigInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceBackupConfig.decode = function decode(reader, length, error) { + BackupConfigInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.backupApplianceName = reader.string(); + message.lastBackupState = reader.int32(); break; } case 2: { - message.backupApplianceId = reader.int64(); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.slaId = reader.int64(); + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } case 4: { - message.applicationName = reader.string(); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); break; } case 5: { - message.hostName = reader.string(); - break; - } - case 6: { - message.sltName = reader.string(); - break; - } - case 7: { - message.slpName = reader.string(); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); break; } default: @@ -17617,205 +17612,248 @@ }; /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { + BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupApplianceBackupConfig message. + * Verifies a BackupConfigInfo message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupApplianceBackupConfig.verify = function verify(message) { + BackupConfigInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.hostName != null && message.hasOwnProperty("hostName")) - if (!$util.isString(message.hostName)) - return "hostName: string expected"; - if (message.sltName != null && message.hasOwnProperty("sltName")) - if (!$util.isString(message.sltName)) - return "sltName: string expected"; - if (message.slpName != null && message.hasOwnProperty("slpName")) - if (!$util.isString(message.slpName)) - return "slpName: string expected"; + var properties = {}; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); + if (error) + return "gcpBackupConfig." + error; + } + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + if (properties.backupConfig === 1) + return "backupConfig: multiple values"; + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); + if (error) + return "backupApplianceBackupConfig." + error; + } + } return null; }; /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo */ - BackupApplianceBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) + BackupConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.hostName != null) - message.hostName = String(object.hostName); - if (object.sltName != null) - message.sltName = String(object.sltName); - if (object.slpName != null) - message.slpName = String(object.slpName); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupApplianceName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.slaId = options.longs === String ? "0" : 0; - object.applicationName = ""; - object.hostName = ""; - object.sltName = ""; - object.slpName = ""; + var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "SUCCEEDED": + case 2: + message.lastBackupState = 2; + break; + case "FAILED": + case 3: + message.lastBackupState = 3; + break; + case "PERMISSION_DENIED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.gcpBackupConfig != null) { + if (typeof object.gcpBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); + } + if (object.backupApplianceBackupConfig != null) { + if (typeof object.backupApplianceBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); + } + return message; + }; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastSuccessfulBackupConsistencyTime = null; + object.lastBackupError = null; + } + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); + if (options.oneofs) + object.backupConfig = "gcpBackupConfig"; + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); + if (options.oneofs) + object.backupConfig = "backupApplianceBackupConfig"; } - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.hostName != null && message.hasOwnProperty("hostName")) - object.hostName = message.hostName; - if (message.sltName != null && message.hasOwnProperty("sltName")) - object.sltName = message.sltName; - if (message.slpName != null && message.hasOwnProperty("slpName")) - object.slpName = message.slpName; return object; }; /** - * Converts this BackupApplianceBackupConfig to JSON. + * Converts this BackupConfigInfo to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @instance * @returns {Object.} JSON object */ - BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { + BackupConfigInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupApplianceBackupConfig + * Gets the default type url for BackupConfigInfo * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; }; - return BackupApplianceBackupConfig; + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + */ + BackupConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + return values; + })(); + + return BackupConfigInfo; })(); - v1.DataSourceGcpResource = (function() { + v1.GcpBackupConfig = (function() { /** - * Properties of a DataSourceGcpResource. + * Properties of a GcpBackupConfig. * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceGcpResource - * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename - * @property {string|null} [location] DataSourceGcpResource location - * @property {string|null} [type] DataSourceGcpResource type - * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties - * @property {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties|null} [cloudSqlInstanceDatasourceProperties] DataSourceGcpResource cloudSqlInstanceDatasourceProperties - * @property {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties|null} [alloyDbClusterDatasourceProperties] DataSourceGcpResource alloyDbClusterDatasourceProperties - * @property {google.cloud.backupdr.v1.IDiskDataSourceProperties|null} [diskDatasourceProperties] DataSourceGcpResource diskDatasourceProperties + * @interface IGcpBackupConfig + * @property {string|null} [backupPlan] GcpBackupConfig backupPlan + * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription + * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation + * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules + * @property {string|null} [backupPlanRevisionName] GcpBackupConfig backupPlanRevisionName + * @property {string|null} [backupPlanRevisionId] GcpBackupConfig backupPlanRevisionId */ /** - * Constructs a new DataSourceGcpResource. + * Constructs a new GcpBackupConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceGcpResource. - * @implements IDataSourceGcpResource + * @classdesc Represents a GcpBackupConfig. + * @implements IGcpBackupConfig * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set */ - function DataSourceGcpResource(properties) { + function GcpBackupConfig(properties) { + this.backupPlanRules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17823,175 +17861,150 @@ } /** - * DataSourceGcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.gcpResourcename = ""; + GcpBackupConfig.prototype.backupPlan = ""; /** - * DataSourceGcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlanDescription. + * @member {string} backupPlanDescription + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.location = ""; + GcpBackupConfig.prototype.backupPlanDescription = ""; /** - * DataSourceGcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlanAssociation. + * @member {string} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.type = ""; + GcpBackupConfig.prototype.backupPlanAssociation = ""; /** - * DataSourceGcpResource computeInstanceDatasourceProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlanRules. + * @member {Array.} backupPlanRules + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; + GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; /** - * DataSourceGcpResource cloudSqlInstanceDatasourceProperties. - * @member {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties|null|undefined} cloudSqlInstanceDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlanRevisionName. + * @member {string} backupPlanRevisionName + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.cloudSqlInstanceDatasourceProperties = null; + GcpBackupConfig.prototype.backupPlanRevisionName = ""; /** - * DataSourceGcpResource alloyDbClusterDatasourceProperties. - * @member {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties|null|undefined} alloyDbClusterDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * GcpBackupConfig backupPlanRevisionId. + * @member {string} backupPlanRevisionId + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance */ - DataSourceGcpResource.prototype.alloyDbClusterDatasourceProperties = null; + GcpBackupConfig.prototype.backupPlanRevisionId = ""; /** - * DataSourceGcpResource diskDatasourceProperties. - * @member {google.cloud.backupdr.v1.IDiskDataSourceProperties|null|undefined} diskDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance + * Creates a new GcpBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance */ - DataSourceGcpResource.prototype.diskDatasourceProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GcpBackupConfig.create = function create(properties) { + return new GcpBackupConfig(properties); + }; /** - * DataSourceGcpResource gcpResourceProperties. - * @member {"computeInstanceDatasourceProperties"|"cloudSqlInstanceDatasourceProperties"|"alloyDbClusterDatasourceProperties"|"diskDatasourceProperties"|undefined} gcpResourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties", "cloudSqlInstanceDatasourceProperties", "alloyDbClusterDatasourceProperties", "diskDatasourceProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance - */ - DataSourceGcpResource.create = function create(properties) { - return new DataSourceGcpResource(properties); - }; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encode = function encode(message, writer) { + GcpBackupConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.cloudSqlInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "cloudSqlInstanceDatasourceProperties")) - $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.encode(message.cloudSqlInstanceDatasourceProperties, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.alloyDbClusterDatasourceProperties != null && Object.hasOwnProperty.call(message, "alloyDbClusterDatasourceProperties")) - $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.encode(message.alloyDbClusterDatasourceProperties, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.diskDatasourceProperties != null && Object.hasOwnProperty.call(message, "diskDatasourceProperties")) - $root.google.cloud.backupdr.v1.DiskDataSourceProperties.encode(message.diskDatasourceProperties, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); + if (message.backupPlanRules != null && message.backupPlanRules.length) + for (var i = 0; i < message.backupPlanRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); + if (message.backupPlanRevisionName != null && Object.hasOwnProperty.call(message, "backupPlanRevisionName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupPlanRevisionName); + if (message.backupPlanRevisionId != null && Object.hasOwnProperty.call(message, "backupPlanRevisionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.backupPlanRevisionId); return writer; }; /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * Decodes a GcpBackupConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSourceGcpResource.decode = function decode(reader, length, error) { + GcpBackupConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.gcpResourcename = reader.string(); + message.backupPlan = reader.string(); break; } case 2: { - message.location = reader.string(); + message.backupPlanDescription = reader.string(); break; } case 3: { - message.type = reader.string(); + message.backupPlanAssociation = reader.string(); break; } case 4: { - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + if (!(message.backupPlanRules && message.backupPlanRules.length)) + message.backupPlanRules = []; + message.backupPlanRules.push(reader.string()); break; } case 5: { - message.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.decode(reader, reader.uint32()); + message.backupPlanRevisionName = reader.string(); break; } case 6: { - message.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.decode(reader, reader.uint32()); - break; - } - case 7: { - message.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.decode(reader, reader.uint32()); + message.backupPlanRevisionId = reader.string(); break; } default: @@ -18003,224 +18016,182 @@ }; /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { + GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataSourceGcpResource message. + * Verifies a GcpBackupConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataSourceGcpResource.verify = function verify(message) { + GcpBackupConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); - if (error) - return "computeInstanceDatasourceProperties." + error; - } - } - if (message.cloudSqlInstanceDatasourceProperties != null && message.hasOwnProperty("cloudSqlInstanceDatasourceProperties")) { - if (properties.gcpResourceProperties === 1) - return "gcpResourceProperties: multiple values"; - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify(message.cloudSqlInstanceDatasourceProperties); - if (error) - return "cloudSqlInstanceDatasourceProperties." + error; - } - } - if (message.alloyDbClusterDatasourceProperties != null && message.hasOwnProperty("alloyDbClusterDatasourceProperties")) { - if (properties.gcpResourceProperties === 1) - return "gcpResourceProperties: multiple values"; - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify(message.alloyDbClusterDatasourceProperties); - if (error) - return "alloyDbClusterDatasourceProperties." + error; - } - } - if (message.diskDatasourceProperties != null && message.hasOwnProperty("diskDatasourceProperties")) { - if (properties.gcpResourceProperties === 1) - return "gcpResourceProperties: multiple values"; - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.verify(message.diskDatasourceProperties); - if (error) - return "diskDatasourceProperties." + error; - } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + if (!$util.isString(message.backupPlanDescription)) + return "backupPlanDescription: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + if (!$util.isString(message.backupPlanAssociation)) + return "backupPlanAssociation: string expected"; + if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { + if (!Array.isArray(message.backupPlanRules)) + return "backupPlanRules: array expected"; + for (var i = 0; i < message.backupPlanRules.length; ++i) + if (!$util.isString(message.backupPlanRules[i])) + return "backupPlanRules: string[] expected"; } + if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) + if (!$util.isString(message.backupPlanRevisionName)) + return "backupPlanRevisionName: string expected"; + if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) + if (!$util.isString(message.backupPlanRevisionId)) + return "backupPlanRevisionId: string expected"; return null; }; /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig */ - DataSourceGcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) + GcpBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - if (object.computeInstanceDatasourceProperties != null) { - if (typeof object.computeInstanceDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); - } - if (object.cloudSqlInstanceDatasourceProperties != null) { - if (typeof object.cloudSqlInstanceDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.cloudSqlInstanceDatasourceProperties: object expected"); - message.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.fromObject(object.cloudSqlInstanceDatasourceProperties); - } - if (object.alloyDbClusterDatasourceProperties != null) { - if (typeof object.alloyDbClusterDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.alloyDbClusterDatasourceProperties: object expected"); - message.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.fromObject(object.alloyDbClusterDatasourceProperties); - } - if (object.diskDatasourceProperties != null) { - if (typeof object.diskDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.diskDatasourceProperties: object expected"); - message.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.fromObject(object.diskDatasourceProperties); + var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanDescription != null) + message.backupPlanDescription = String(object.backupPlanDescription); + if (object.backupPlanAssociation != null) + message.backupPlanAssociation = String(object.backupPlanAssociation); + if (object.backupPlanRules) { + if (!Array.isArray(object.backupPlanRules)) + throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); + message.backupPlanRules = []; + for (var i = 0; i < object.backupPlanRules.length; ++i) + message.backupPlanRules[i] = String(object.backupPlanRules[i]); } + if (object.backupPlanRevisionName != null) + message.backupPlanRevisionName = String(object.backupPlanRevisionName); + if (object.backupPlanRevisionId != null) + message.backupPlanRevisionId = String(object.backupPlanRevisionId); return message; }; /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static - * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource + * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataSourceGcpResource.toObject = function toObject(message, options) { + GcpBackupConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.backupPlanRules = []; if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "computeInstanceDatasourceProperties"; - } - if (message.cloudSqlInstanceDatasourceProperties != null && message.hasOwnProperty("cloudSqlInstanceDatasourceProperties")) { - object.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.toObject(message.cloudSqlInstanceDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "cloudSqlInstanceDatasourceProperties"; + object.backupPlan = ""; + object.backupPlanDescription = ""; + object.backupPlanAssociation = ""; + object.backupPlanRevisionName = ""; + object.backupPlanRevisionId = ""; } - if (message.alloyDbClusterDatasourceProperties != null && message.hasOwnProperty("alloyDbClusterDatasourceProperties")) { - object.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.toObject(message.alloyDbClusterDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "alloyDbClusterDatasourceProperties"; - } - if (message.diskDatasourceProperties != null && message.hasOwnProperty("diskDatasourceProperties")) { - object.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.toObject(message.diskDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "diskDatasourceProperties"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + object.backupPlanDescription = message.backupPlanDescription; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = message.backupPlanAssociation; + if (message.backupPlanRules && message.backupPlanRules.length) { + object.backupPlanRules = []; + for (var j = 0; j < message.backupPlanRules.length; ++j) + object.backupPlanRules[j] = message.backupPlanRules[j]; } + if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) + object.backupPlanRevisionName = message.backupPlanRevisionName; + if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) + object.backupPlanRevisionId = message.backupPlanRevisionId; return object; }; /** - * Converts this DataSourceGcpResource to JSON. + * Converts this GcpBackupConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @instance * @returns {Object.} JSON object */ - DataSourceGcpResource.prototype.toJSON = function toJSON() { + GcpBackupConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataSourceGcpResource + * Gets the default type url for GcpBackupConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @memberof google.cloud.backupdr.v1.GcpBackupConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; }; - return DataSourceGcpResource; + return GcpBackupConfig; })(); - v1.DataSourceBackupApplianceApplication = (function() { + v1.BackupApplianceBackupConfig = (function() { /** - * Properties of a DataSourceBackupApplianceApplication. + * Properties of a BackupApplianceBackupConfig. * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceBackupApplianceApplication - * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName - * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance - * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId - * @property {string|null} [type] DataSourceBackupApplianceApplication type - * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId - * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname - * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId + * @interface IBackupApplianceBackupConfig + * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName + * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId + * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId + * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName + * @property {string|null} [hostName] BackupApplianceBackupConfig hostName + * @property {string|null} [sltName] BackupApplianceBackupConfig sltName + * @property {string|null} [slpName] BackupApplianceBackupConfig slpName */ /** - * Constructs a new DataSourceBackupApplianceApplication. + * Constructs a new BackupApplianceBackupConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceBackupApplianceApplication. - * @implements IDataSourceBackupApplianceApplication + * @classdesc Represents a BackupApplianceBackupConfig. + * @implements IBackupApplianceBackupConfig * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set */ - function DataSourceBackupApplianceApplication(properties) { + function BackupApplianceBackupConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18228,161 +18199,161 @@ } /** - * DataSourceBackupApplianceApplication applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.applicationName = ""; + BackupApplianceBackupConfig.prototype.backupApplianceName = ""; /** - * DataSourceBackupApplianceApplication backupAppliance. - * @member {string} backupAppliance - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; + BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DataSourceBackupApplianceApplication applianceId. - * @member {number|Long} applianceId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig slaId. + * @member {number|Long} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DataSourceBackupApplianceApplication type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.type = ""; + BackupApplianceBackupConfig.prototype.applicationName = ""; /** - * DataSourceBackupApplianceApplication applicationId. - * @member {number|Long} applicationId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig hostName. + * @member {string} hostName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupApplianceBackupConfig.prototype.hostName = ""; /** - * DataSourceBackupApplianceApplication hostname. - * @member {string} hostname - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig sltName. + * @member {string} sltName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.hostname = ""; + BackupApplianceBackupConfig.prototype.sltName = ""; /** - * DataSourceBackupApplianceApplication hostId. - * @member {number|Long} hostId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * BackupApplianceBackupConfig slpName. + * @member {string} slpName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance */ - DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupApplianceBackupConfig.prototype.slpName = ""; /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * Creates a new BackupApplianceBackupConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance */ - DataSourceBackupApplianceApplication.create = function create(properties) { - return new DataSourceBackupApplianceApplication(properties); + BackupApplianceBackupConfig.create = function create(properties) { + return new BackupApplianceBackupConfig(properties); }; /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSourceBackupApplianceApplication.encode = function encode(message, writer) { + BackupApplianceBackupConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); - if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); - if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); - if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); - if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); + if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); + if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); + if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); return writer; }; /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { + BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSourceBackupApplianceApplication.decode = function decode(reader, length, error) { + BackupApplianceBackupConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.applicationName = reader.string(); + message.backupApplianceName = reader.string(); break; } case 2: { - message.backupAppliance = reader.string(); + message.backupApplianceId = reader.int64(); break; } case 3: { - message.applianceId = reader.int64(); + message.slaId = reader.int64(); break; } case 4: { - message.type = reader.string(); + message.applicationName = reader.string(); break; } - case 8: { - message.applicationId = reader.int64(); + case 5: { + message.hostName = reader.string(); break; } case 6: { - message.hostname = reader.string(); + message.sltName = reader.string(); break; } case 7: { - message.hostId = reader.int64(); + message.slpName = reader.string(); break; } default: @@ -18394,213 +18365,205 @@ }; /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { + BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataSourceBackupApplianceApplication message. + * Verifies a BackupApplianceBackupConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataSourceBackupApplianceApplication.verify = function verify(message) { + BackupApplianceBackupConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; if (message.applicationName != null && message.hasOwnProperty("applicationName")) if (!$util.isString(message.applicationName)) return "applicationName: string expected"; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - if (!$util.isString(message.backupAppliance)) - return "backupAppliance: string expected"; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) - return "applianceId: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) - return "applicationId: integer|Long expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) - return "hostId: integer|Long expected"; + if (message.hostName != null && message.hasOwnProperty("hostName")) + if (!$util.isString(message.hostName)) + return "hostName: string expected"; + if (message.sltName != null && message.hasOwnProperty("sltName")) + if (!$util.isString(message.sltName)) + return "sltName: string expected"; + if (message.slpName != null && message.hasOwnProperty("slpName")) + if (!$util.isString(message.slpName)) + return "slpName: string expected"; return null; }; /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig */ - DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) + BackupApplianceBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.backupAppliance != null) - message.backupAppliance = String(object.backupAppliance); - if (object.applianceId != null) - if ($util.Long) - (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; - else if (typeof object.applianceId === "string") - message.applianceId = parseInt(object.applianceId, 10); - else if (typeof object.applianceId === "number") - message.applianceId = object.applianceId; - else if (typeof object.applianceId === "object") - message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); - if (object.type != null) - message.type = String(object.type); - if (object.applicationId != null) + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.backupApplianceId != null) if ($util.Long) - (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; - else if (typeof object.applicationId === "string") - message.applicationId = parseInt(object.applicationId, 10); - else if (typeof object.applicationId === "number") - message.applicationId = object.applicationId; - else if (typeof object.applicationId === "object") - message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.hostId != null) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.slaId != null) if ($util.Long) - (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; - else if (typeof object.hostId === "string") - message.hostId = parseInt(object.hostId, 10); - else if (typeof object.hostId === "number") - message.hostId = object.hostId; - else if (typeof object.hostId === "object") - message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.hostName != null) + message.hostName = String(object.hostName); + if (object.sltName != null) + message.sltName = String(object.sltName); + if (object.slpName != null) + message.slpName = String(object.slpName); return message; }; /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static - * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication + * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { + BackupApplianceBackupConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.applicationName = ""; - object.backupAppliance = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applianceId = options.longs === String ? "0" : 0; - object.type = ""; - object.hostname = ""; + object.backupApplianceName = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.hostId = options.longs === String ? "0" : 0; + object.backupApplianceId = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.applicationId = options.longs === String ? "0" : 0; + object.slaId = options.longs === String ? "0" : 0; + object.applicationName = ""; + object.hostName = ""; + object.sltName = ""; + object.slpName = ""; } - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - object.backupAppliance = message.backupAppliance; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (typeof message.applianceId === "number") - object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; - else - object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (typeof message.hostId === "number") - object.hostId = options.longs === String ? String(message.hostId) : message.hostId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; else - object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (typeof message.applicationId === "number") - object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; else - object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.hostName != null && message.hasOwnProperty("hostName")) + object.hostName = message.hostName; + if (message.sltName != null && message.hasOwnProperty("sltName")) + object.sltName = message.sltName; + if (message.slpName != null && message.hasOwnProperty("slpName")) + object.slpName = message.slpName; return object; }; /** - * Converts this DataSourceBackupApplianceApplication to JSON. + * Converts this BackupApplianceBackupConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @instance * @returns {Object.} JSON object */ - DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { + BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataSourceBackupApplianceApplication + * Gets the default type url for BackupApplianceBackupConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; }; - return DataSourceBackupApplianceApplication; + return BackupApplianceBackupConfig; })(); - v1.ServiceLockInfo = (function() { + v1.DataSourceGcpResource = (function() { /** - * Properties of a ServiceLockInfo. + * Properties of a DataSourceGcpResource. * @memberof google.cloud.backupdr.v1 - * @interface IServiceLockInfo - * @property {string|null} [operation] ServiceLockInfo operation + * @interface IDataSourceGcpResource + * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename + * @property {string|null} [location] DataSourceGcpResource location + * @property {string|null} [type] DataSourceGcpResource type + * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties + * @property {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties|null} [cloudSqlInstanceDatasourceProperties] DataSourceGcpResource cloudSqlInstanceDatasourceProperties + * @property {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties|null} [alloyDbClusterDatasourceProperties] DataSourceGcpResource alloyDbClusterDatasourceProperties + * @property {google.cloud.backupdr.v1.IDiskDataSourceProperties|null} [diskDatasourceProperties] DataSourceGcpResource diskDatasourceProperties */ /** - * Constructs a new ServiceLockInfo. + * Constructs a new DataSourceGcpResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceLockInfo. - * @implements IServiceLockInfo + * @classdesc Represents a DataSourceGcpResource. + * @implements IDataSourceGcpResource * @constructor - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set */ - function ServiceLockInfo(properties) { + function DataSourceGcpResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18608,77 +18571,175 @@ } /** - * ServiceLockInfo operation. - * @member {string} operation - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * DataSourceGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @instance */ - ServiceLockInfo.prototype.operation = ""; + DataSourceGcpResource.prototype.gcpResourcename = ""; /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance + * DataSourceGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance */ - ServiceLockInfo.create = function create(properties) { - return new ServiceLockInfo(properties); - }; + DataSourceGcpResource.prototype.location = ""; /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * DataSourceGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance */ - ServiceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); - return writer; - }; + DataSourceGcpResource.prototype.type = ""; /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * DataSourceGcpResource computeInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance */ - ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * DataSourceGcpResource cloudSqlInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.ICloudSqlInstanceDataSourceProperties|null|undefined} cloudSqlInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance */ - ServiceLockInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { + DataSourceGcpResource.prototype.cloudSqlInstanceDatasourceProperties = null; + + /** + * DataSourceGcpResource alloyDbClusterDatasourceProperties. + * @member {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties|null|undefined} alloyDbClusterDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.alloyDbClusterDatasourceProperties = null; + + /** + * DataSourceGcpResource diskDatasourceProperties. + * @member {google.cloud.backupdr.v1.IDiskDataSourceProperties|null|undefined} diskDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.diskDatasourceProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSourceGcpResource gcpResourceProperties. + * @member {"computeInstanceDatasourceProperties"|"cloudSqlInstanceDatasourceProperties"|"alloyDbClusterDatasourceProperties"|"diskDatasourceProperties"|undefined} gcpResourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties", "cloudSqlInstanceDatasourceProperties", "alloyDbClusterDatasourceProperties", "diskDatasourceProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance + */ + DataSourceGcpResource.create = function create(properties) { + return new DataSourceGcpResource(properties); + }; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.cloudSqlInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "cloudSqlInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.encode(message.cloudSqlInstanceDatasourceProperties, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.alloyDbClusterDatasourceProperties != null && Object.hasOwnProperty.call(message, "alloyDbClusterDatasourceProperties")) + $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.encode(message.alloyDbClusterDatasourceProperties, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.diskDatasourceProperties != null && Object.hasOwnProperty.call(message, "diskDatasourceProperties")) + $root.google.cloud.backupdr.v1.DiskDataSourceProperties.encode(message.diskDatasourceProperties, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { case 1: { - message.operation = reader.string(); + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + case 5: { + message.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + case 6: { + message.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.decode(reader, reader.uint32()); + break; + } + case 7: { + message.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.decode(reader, reader.uint32()); break; } default: @@ -18690,127 +18751,224 @@ }; /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { + DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceLockInfo message. + * Verifies a DataSourceGcpResource message. * @function verify - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceLockInfo.verify = function verify(message) { + DataSourceGcpResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; + var properties = {}; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); + if (error) + return "computeInstanceDatasourceProperties." + error; + } + } + if (message.cloudSqlInstanceDatasourceProperties != null && message.hasOwnProperty("cloudSqlInstanceDatasourceProperties")) { + if (properties.gcpResourceProperties === 1) + return "gcpResourceProperties: multiple values"; + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.verify(message.cloudSqlInstanceDatasourceProperties); + if (error) + return "cloudSqlInstanceDatasourceProperties." + error; + } + } + if (message.alloyDbClusterDatasourceProperties != null && message.hasOwnProperty("alloyDbClusterDatasourceProperties")) { + if (properties.gcpResourceProperties === 1) + return "gcpResourceProperties: multiple values"; + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify(message.alloyDbClusterDatasourceProperties); + if (error) + return "alloyDbClusterDatasourceProperties." + error; + } + } + if (message.diskDatasourceProperties != null && message.hasOwnProperty("diskDatasourceProperties")) { + if (properties.gcpResourceProperties === 1) + return "gcpResourceProperties: multiple values"; + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.verify(message.diskDatasourceProperties); + if (error) + return "diskDatasourceProperties." + error; + } + } return null; }; /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource */ - ServiceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) + DataSourceGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) return object; - var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); - if (object.operation != null) - message.operation = String(object.operation); + var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.computeInstanceDatasourceProperties != null) { + if (typeof object.computeInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); + } + if (object.cloudSqlInstanceDatasourceProperties != null) { + if (typeof object.cloudSqlInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.cloudSqlInstanceDatasourceProperties: object expected"); + message.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.fromObject(object.cloudSqlInstanceDatasourceProperties); + } + if (object.alloyDbClusterDatasourceProperties != null) { + if (typeof object.alloyDbClusterDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.alloyDbClusterDatasourceProperties: object expected"); + message.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.fromObject(object.alloyDbClusterDatasourceProperties); + } + if (object.diskDatasourceProperties != null) { + if (typeof object.diskDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.diskDatasourceProperties: object expected"); + message.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.fromObject(object.diskDatasourceProperties); + } return message; }; /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @static - * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo + * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceLockInfo.toObject = function toObject(message, options) { + DataSourceGcpResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.operation = ""; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - return object; - }; - - /** - * Converts this ServiceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "computeInstanceDatasourceProperties"; + } + if (message.cloudSqlInstanceDatasourceProperties != null && message.hasOwnProperty("cloudSqlInstanceDatasourceProperties")) { + object.cloudSqlInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.toObject(message.cloudSqlInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "cloudSqlInstanceDatasourceProperties"; + } + if (message.alloyDbClusterDatasourceProperties != null && message.hasOwnProperty("alloyDbClusterDatasourceProperties")) { + object.alloyDbClusterDatasourceProperties = $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.toObject(message.alloyDbClusterDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "alloyDbClusterDatasourceProperties"; + } + if (message.diskDatasourceProperties != null && message.hasOwnProperty("diskDatasourceProperties")) { + object.diskDatasourceProperties = $root.google.cloud.backupdr.v1.DiskDataSourceProperties.toObject(message.diskDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "diskDatasourceProperties"; + } + return object; + }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @instance * @returns {Object.} JSON object */ - ServiceLockInfo.prototype.toJSON = function toJSON() { + DataSourceGcpResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceLockInfo + * Gets the default type url for DataSourceGcpResource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; }; - return ServiceLockInfo; + return DataSourceGcpResource; })(); - v1.BackupApplianceLockInfo = (function() { + v1.DataSourceBackupApplianceApplication = (function() { /** - * Properties of a BackupApplianceLockInfo. + * Properties of a DataSourceBackupApplianceApplication. * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceLockInfo - * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId - * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName - * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason - * @property {string|null} [jobName] BackupApplianceLockInfo jobName - * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage - * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId + * @interface IDataSourceBackupApplianceApplication + * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName + * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance + * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId + * @property {string|null} [type] DataSourceBackupApplianceApplication type + * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId + * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname + * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId */ /** - * Constructs a new BackupApplianceLockInfo. + * Constructs a new DataSourceBackupApplianceApplication. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceLockInfo. - * @implements IBackupApplianceLockInfo + * @classdesc Represents a DataSourceBackupApplianceApplication. + * @implements IDataSourceBackupApplianceApplication * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set */ - function BackupApplianceLockInfo(properties) { + function DataSourceBackupApplianceApplication(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18818,161 +18976,161 @@ } /** - * BackupApplianceLockInfo backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DataSourceBackupApplianceApplication.prototype.applicationName = ""; /** - * BackupApplianceLockInfo backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication backupAppliance. + * @member {string} backupAppliance + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.backupApplianceName = ""; + DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; /** - * BackupApplianceLockInfo lockReason. - * @member {string} lockReason - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication applianceId. + * @member {number|Long} applianceId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.lockReason = ""; + DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BackupApplianceLockInfo jobName. - * @member {string|null|undefined} jobName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.jobName = null; + DataSourceBackupApplianceApplication.prototype.type = ""; /** - * BackupApplianceLockInfo backupImage. - * @member {string|null|undefined} backupImage - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication applicationId. + * @member {number|Long} applicationId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.backupImage = null; + DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * BackupApplianceLockInfo slaId. - * @member {number|Long|null|undefined} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication hostname. + * @member {string} hostname + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - BackupApplianceLockInfo.prototype.slaId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DataSourceBackupApplianceApplication.prototype.hostname = ""; /** - * BackupApplianceLockInfo lockSource. - * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * DataSourceBackupApplianceApplication hostId. + * @member {number|Long} hostId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance */ - Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { - get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), - set: $util.oneOfSetter($oneOfFields) - }); + DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance */ - BackupApplianceLockInfo.create = function create(properties) { - return new BackupApplianceLockInfo(properties); + DataSourceBackupApplianceApplication.create = function create(properties) { + return new DataSourceBackupApplianceApplication(properties); }; /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceLockInfo.encode = function encode(message, writer) { + DataSourceBackupApplianceApplication.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); - if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); - if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); - if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); + if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); + if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); + if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); return writer; }; /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceLockInfo.decode = function decode(reader, length, error) { + DataSourceBackupApplianceApplication.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.backupApplianceId = reader.int64(); + message.applicationName = reader.string(); break; } case 2: { - message.backupApplianceName = reader.string(); + message.backupAppliance = reader.string(); break; } - case 5: { - message.lockReason = reader.string(); + case 3: { + message.applianceId = reader.int64(); break; } - case 6: { - message.jobName = reader.string(); + case 4: { + message.type = reader.string(); break; } - case 7: { - message.backupImage = reader.string(); + case 8: { + message.applicationId = reader.int64(); break; } - case 8: { - message.slaId = reader.int64(); + case 6: { + message.hostname = reader.string(); + break; + } + case 7: { + message.hostId = reader.int64(); break; } default: @@ -18984,206 +19142,213 @@ }; /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupApplianceLockInfo message. + * Verifies a DataSourceBackupApplianceApplication message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupApplianceLockInfo.verify = function verify(message) { + DataSourceBackupApplianceApplication.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - if (!$util.isString(message.lockReason)) - return "lockReason: string expected"; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - properties.lockSource = 1; - if (!$util.isString(message.jobName)) - return "jobName: string expected"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isString(message.backupImage)) - return "backupImage: string expected"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - } + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + if (!$util.isString(message.backupAppliance)) + return "backupAppliance: string expected"; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) + return "applianceId: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) + return "applicationId: integer|Long expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) + return "hostId: integer|Long expected"; return null; }; /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication */ - BackupApplianceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); - if (object.backupApplianceId != null) + var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.backupAppliance != null) + message.backupAppliance = String(object.backupAppliance); + if (object.applianceId != null) if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.lockReason != null) - message.lockReason = String(object.lockReason); - if (object.jobName != null) - message.jobName = String(object.jobName); - if (object.backupImage != null) - message.backupImage = String(object.backupImage); - if (object.slaId != null) + (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; + else if (typeof object.applianceId === "string") + message.applianceId = parseInt(object.applianceId, 10); + else if (typeof object.applianceId === "number") + message.applianceId = object.applianceId; + else if (typeof object.applianceId === "object") + message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.applicationId != null) if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; + else if (typeof object.applicationId === "string") + message.applicationId = parseInt(object.applicationId, 10); + else if (typeof object.applicationId === "number") + message.applicationId = object.applicationId; + else if (typeof object.applicationId === "object") + message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.hostId != null) + if ($util.Long) + (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; + else if (typeof object.hostId === "string") + message.hostId = parseInt(object.hostId, 10); + else if (typeof object.hostId === "number") + message.hostId = object.hostId; + else if (typeof object.hostId === "object") + message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static - * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupApplianceLockInfo.toObject = function toObject(message, options) { + DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.applicationName = ""; + object.backupAppliance = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.backupApplianceId = options.longs === String ? "0" : 0; - object.backupApplianceName = ""; - object.lockReason = ""; + object.applianceId = options.longs === String ? "0" : 0; + object.type = ""; + object.hostname = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hostId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationId = options.longs === String ? "0" : 0; } - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + object.backupAppliance = message.backupAppliance; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (typeof message.applianceId === "number") + object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - object.lockReason = message.lockReason; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - object.jobName = message.jobName; - if (options.oneofs) - object.lockSource = "jobName"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - object.backupImage = message.backupImage; - if (options.oneofs) - object.lockSource = "backupImage"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (typeof message.hostId === "number") + object.hostId = options.longs === String ? String(message.hostId) : message.hostId; else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (options.oneofs) - object.lockSource = "slaId"; - } + object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (typeof message.applicationId === "number") + object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + else + object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; return object; }; /** - * Converts this BackupApplianceLockInfo to JSON. + * Converts this DataSourceBackupApplianceApplication to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @instance * @returns {Object.} JSON object */ - BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupApplianceLockInfo + * Gets the default type url for DataSourceBackupApplianceApplication * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; }; - return BackupApplianceLockInfo; + return DataSourceBackupApplianceApplication; })(); - v1.BackupLock = (function() { + v1.ServiceLockInfo = (function() { /** - * Properties of a BackupLock. + * Properties of a ServiceLockInfo. * @memberof google.cloud.backupdr.v1 - * @interface IBackupLock - * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime - * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo - * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo + * @interface IServiceLockInfo + * @property {string|null} [operation] ServiceLockInfo operation */ /** - * Constructs a new BackupLock. + * Constructs a new ServiceLockInfo. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupLock. - * @implements IBackupLock + * @classdesc Represents a ServiceLockInfo. + * @implements IServiceLockInfo * @constructor - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set */ - function BackupLock(properties) { + function ServiceLockInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19191,119 +19356,77 @@ } /** - * BackupLock lockUntilTime. - * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime - * @memberof google.cloud.backupdr.v1.BackupLock + * ServiceLockInfo operation. + * @member {string} operation + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @instance */ - BackupLock.prototype.lockUntilTime = null; + ServiceLockInfo.prototype.operation = ""; /** - * BackupLock backupApplianceLockInfo. - * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance + * Creates a new ServiceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance */ - BackupLock.prototype.backupApplianceLockInfo = null; + ServiceLockInfo.create = function create(properties) { + return new ServiceLockInfo(properties); + }; /** - * BackupLock serviceLockInfo. - * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BackupLock.prototype.serviceLockInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupLock ClientLockInfo. - * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { - get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupLock instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance - */ - BackupLock.create = function create(properties) { - return new BackupLock(properties); - }; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encode = function encode(message, writer) { + ServiceLockInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) - $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) - $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) - $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); return writer; }; /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupLock.encodeDelimited = function encodeDelimited(message, writer) { + ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupLock message from the specified reader or buffer. + * Decodes a ServiceLockInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupLock.decode = function decode(reader, length, error) { + ServiceLockInfo.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupLock(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); + message.operation = reader.string(); break; } default: @@ -19315,194 +19438,127 @@ }; /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupLock.decodeDelimited = function decodeDelimited(reader) { + ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupLock message. + * Verifies a ServiceLockInfo message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupLock.verify = function verify(message) { + ServiceLockInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); - if (error) - return "lockUntilTime." + error; - } - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); - if (error) - return "backupApplianceLockInfo." + error; - } - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - if (properties.ClientLockInfo === 1) - return "ClientLockInfo: multiple values"; - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); - if (error) - return "serviceLockInfo." + error; - } - } + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; return null; }; /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo */ - BackupLock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) + ServiceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) return object; - var message = new $root.google.cloud.backupdr.v1.BackupLock(); - if (object.lockUntilTime != null) { - if (typeof object.lockUntilTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); - message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); - } - if (object.backupApplianceLockInfo != null) { - if (typeof object.backupApplianceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); - } - if (object.serviceLockInfo != null) { - if (typeof object.serviceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); - } + var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); + if (object.operation != null) + message.operation = String(object.operation); return message; }; /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static - * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupLock.toObject = function toObject(message, options) { + ServiceLockInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.lockUntilTime = null; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) - object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "backupApplianceLockInfo"; - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "serviceLockInfo"; - } + object.operation = ""; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; return object; }; /** - * Converts this BackupLock to JSON. + * Converts this ServiceLockInfo to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @instance * @returns {Object.} JSON object */ - BackupLock.prototype.toJSON = function toJSON() { + ServiceLockInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupLock + * Gets the default type url for ServiceLockInfo * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupLock + * @memberof google.cloud.backupdr.v1.ServiceLockInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; }; - return BackupLock; + return ServiceLockInfo; })(); - v1.Backup = (function() { + v1.BackupApplianceLockInfo = (function() { /** - * Properties of a Backup. + * Properties of a BackupApplianceLockInfo. * @memberof google.cloud.backupdr.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {string|null} [description] Backup description - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime - * @property {Object.|null} [labels] Backup labels - * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime - * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] Backup backupRetentionInheritance - * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime - * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime - * @property {string|null} [etag] Backup etag - * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state - * @property {Array.|null} [serviceLocks] Backup serviceLocks - * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks - * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties - * @property {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties|null} [cloudSqlInstanceBackupProperties] Backup cloudSqlInstanceBackupProperties - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties - * @property {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties|null} [alloyDbBackupProperties] Backup alloyDbBackupProperties - * @property {google.cloud.backupdr.v1.IDiskBackupProperties|null} [diskBackupProperties] Backup diskBackupProperties - * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType - * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo - * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes - * @property {boolean|null} [satisfiesPzs] Backup satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Backup satisfiesPzi - * @property {google.cloud.backupdr.v1.IBackupGcpResource|null} [gcpResource] Backup gcpResource - * @property {Array.|null} [kmsKeyVersions] Backup kmsKeyVersions + * @interface IBackupApplianceLockInfo + * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId + * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName + * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason + * @property {string|null} [jobName] BackupApplianceLockInfo jobName + * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage + * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId */ /** - * Constructs a new Backup. + * Constructs a new BackupApplianceLockInfo. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Backup. - * @implements IBackup + * @classdesc Represents a BackupApplianceLockInfo. + * @implements IBackupApplianceLockInfo * @constructor - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set */ - function Backup(properties) { - this.labels = {}; - this.serviceLocks = []; - this.backupApplianceLocks = []; - this.kmsKeyVersions = []; + function BackupApplianceLockInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19510,538 +19566,492 @@ } /** - * Backup name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.name = ""; + BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Backup description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.description = null; + BackupApplianceLockInfo.prototype.backupApplianceName = ""; /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo lockReason. + * @member {string} lockReason + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.createTime = null; + BackupApplianceLockInfo.prototype.lockReason = ""; /** - * Backup updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo jobName. + * @member {string|null|undefined} jobName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.updateTime = null; + BackupApplianceLockInfo.prototype.jobName = null; /** - * Backup labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo backupImage. + * @member {string|null|undefined} backupImage + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.labels = $util.emptyObject; + BackupApplianceLockInfo.prototype.backupImage = null; /** - * Backup enforcedRetentionEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo slaId. + * @member {number|Long|null|undefined} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.enforcedRetentionEndTime = null; + BackupApplianceLockInfo.prototype.slaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Backup backupRetentionInheritance. - * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance - * @memberof google.cloud.backupdr.v1.Backup + * BackupApplianceLockInfo lockSource. + * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance */ - Backup.prototype.backupRetentionInheritance = null; + Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { + get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Backup expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance */ - Backup.prototype.expireTime = null; + BackupApplianceLockInfo.create = function create(properties) { + return new BackupApplianceLockInfo(properties); + }; /** - * Backup consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Backup.prototype.consistencyTime = null; + BackupApplianceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); + if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); + if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + return writer; + }; /** - * Backup etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Backup.prototype.etag = null; + BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Backup state. - * @member {google.cloud.backupdr.v1.Backup.State} state - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.prototype.state = 0; + BackupApplianceLockInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.backupApplianceId = reader.int64(); + break; + } + case 2: { + message.backupApplianceName = reader.string(); + break; + } + case 5: { + message.lockReason = reader.string(); + break; + } + case 6: { + message.jobName = reader.string(); + break; + } + case 7: { + message.backupImage = reader.string(); + break; + } + case 8: { + message.slaId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Backup serviceLocks. - * @member {Array.} serviceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.prototype.serviceLocks = $util.emptyArray; + BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Backup backupApplianceLocks. - * @member {Array.} backupApplianceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Verifies a BackupApplianceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.prototype.backupApplianceLocks = $util.emptyArray; + BackupApplianceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + if (!$util.isString(message.lockReason)) + return "lockReason: string expected"; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + properties.lockSource = 1; + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isString(message.backupImage)) + return "backupImage: string expected"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + } + return null; + }; /** - * Backup computeInstanceBackupProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo */ - Backup.prototype.computeInstanceBackupProperties = null; + BackupApplianceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.lockReason != null) + message.lockReason = String(object.lockReason); + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.backupImage != null) + message.backupImage = String(object.backupImage); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + return message; + }; /** - * Backup cloudSqlInstanceBackupProperties. - * @member {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties|null|undefined} cloudSqlInstanceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.cloudSqlInstanceBackupProperties = null; - - /** - * Backup backupApplianceBackupProperties. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Backup.prototype.backupApplianceBackupProperties = null; + BackupApplianceLockInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + object.backupApplianceName = ""; + object.lockReason = ""; + } + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + object.lockReason = message.lockReason; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + object.jobName = message.jobName; + if (options.oneofs) + object.lockSource = "jobName"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + object.backupImage = message.backupImage; + if (options.oneofs) + object.lockSource = "backupImage"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (options.oneofs) + object.lockSource = "slaId"; + } + return object; + }; /** - * Backup alloyDbBackupProperties. - * @member {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties|null|undefined} alloyDbBackupProperties - * @memberof google.cloud.backupdr.v1.Backup + * Converts this BackupApplianceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo * @instance + * @returns {Object.} JSON object */ - Backup.prototype.alloyDbBackupProperties = null; + BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Backup diskBackupProperties. - * @member {google.cloud.backupdr.v1.IDiskBackupProperties|null|undefined} diskBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Gets the default type url for BackupApplianceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Backup.prototype.diskBackupProperties = null; + BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + }; - /** - * Backup backupType. - * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupType = 0; + return BackupApplianceLockInfo; + })(); - /** - * Backup gcpBackupPlanInfo. - * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.gcpBackupPlanInfo = null; + v1.BackupLock = (function() { /** - * Backup resourceSizeBytes. - * @member {number|Long} resourceSizeBytes - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Properties of a BackupLock. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupLock + * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime + * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo + * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo */ - Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Backup satisfiesPzs. - * @member {boolean|null|undefined} satisfiesPzs - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Constructs a new BackupLock. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupLock. + * @implements IBackupLock + * @constructor + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set */ - Backup.prototype.satisfiesPzs = null; + function BackupLock(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]]; + } /** - * Backup satisfiesPzi. - * @member {boolean|null|undefined} satisfiesPzi - * @memberof google.cloud.backupdr.v1.Backup + * BackupLock lockUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime + * @memberof google.cloud.backupdr.v1.BackupLock * @instance */ - Backup.prototype.satisfiesPzi = null; + BackupLock.prototype.lockUntilTime = null; /** - * Backup gcpResource. - * @member {google.cloud.backupdr.v1.IBackupGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.Backup + * BackupLock backupApplianceLockInfo. + * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock * @instance */ - Backup.prototype.gcpResource = null; + BackupLock.prototype.backupApplianceLockInfo = null; /** - * Backup kmsKeyVersions. - * @member {Array.} kmsKeyVersions - * @memberof google.cloud.backupdr.v1.Backup + * BackupLock serviceLockInfo. + * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock * @instance */ - Backup.prototype.kmsKeyVersions = $util.emptyArray; + BackupLock.prototype.serviceLockInfo = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { - get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_backupRetentionInheritance", { - get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_expireTime", { - get: $util.oneOfGetter($oneOfFields = ["expireTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Backup backupProperties. - * @member {"computeInstanceBackupProperties"|"cloudSqlInstanceBackupProperties"|"backupApplianceBackupProperties"|"alloyDbBackupProperties"|"diskBackupProperties"|undefined} backupProperties - * @memberof google.cloud.backupdr.v1.Backup + * BackupLock ClientLockInfo. + * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock * @instance */ - Object.defineProperty(Backup.prototype, "backupProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "cloudSqlInstanceBackupProperties", "backupApplianceBackupProperties", "alloyDbBackupProperties", "diskBackupProperties"]), + Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Backup planInfo. - * @member {"gcpBackupPlanInfo"|undefined} planInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Creates a new BackupLock instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance */ - Object.defineProperty(Backup.prototype, "planInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_satisfiesPzs", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Backup.prototype, "_satisfiesPzi", { - get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), - set: $util.oneOfSetter($oneOfFields) - }); + BackupLock.create = function create(properties) { + return new BackupLock(properties); + }; /** - * Backup sourceResource. - * @member {"gcpResource"|undefined} sourceResource - * @memberof google.cloud.backupdr.v1.Backup - * @instance + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Backup.prototype, "sourceResource", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Backup instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup} Backup instance - */ - Backup.create = function create(properties) { - return new Backup(properties); - }; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encode = function encode(message, writer) { + BackupLock.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) - $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); - if (message.serviceLocks != null && message.serviceLocks.length) - for (var i = 0; i < message.serviceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) - for (var i = 0; i < message.backupApplianceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); - if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) - $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 24, wireType 0 =*/192).bool(message.satisfiesPzs); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 25, wireType 0 =*/200).bool(message.satisfiesPzi); - if (message.cloudSqlInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "cloudSqlInstanceBackupProperties")) - $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.encode(message.cloudSqlInstanceBackupProperties, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.alloyDbBackupProperties != null && Object.hasOwnProperty.call(message, "alloyDbBackupProperties")) - $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.encode(message.alloyDbBackupProperties, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.diskBackupProperties != null && Object.hasOwnProperty.call(message, "diskBackupProperties")) - $root.google.cloud.backupdr.v1.DiskBackupProperties.encode(message.diskBackupProperties, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) - writer.uint32(/* id 30, wireType 0 =*/240).int32(message.backupRetentionInheritance); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.BackupGcpResource.encode(message.gcpResource, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.kmsKeyVersions != null && message.kmsKeyVersions.length) - for (var i = 0; i < message.kmsKeyVersions.length; ++i) - writer.uint32(/* id 33, wireType 2 =*/266).string(message.kmsKeyVersions[i]); + if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) + $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) + $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) + $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup + * @memberof google.cloud.backupdr.v1.BackupLock * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { + BackupLock.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Backup message from the specified reader or buffer. + * Decodes a BackupLock message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.Backup + * @memberof google.cloud.backupdr.v1.BackupLock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup} Backup + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decode = function decode(reader, length, error) { + BackupLock.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Backup(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupLock(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); + message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); break; } case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 30: { - message.backupRetentionInheritance = reader.int32(); - break; - } - case 7: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); - break; - } - case 15: { - message.state = reader.int32(); - break; - } - case 17: { - if (!(message.serviceLocks && message.serviceLocks.length)) - message.serviceLocks = []; - message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 18: { - if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) - message.backupApplianceLocks = []; - message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 19: { - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 26: { - message.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 21: { - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 27: { - message.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.decode(reader, reader.uint32()); - break; - } - case 28: { - message.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupType = reader.int32(); - break; - } - case 22: { - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.resourceSizeBytes = reader.int64(); - break; - } - case 24: { - message.satisfiesPzs = reader.bool(); - break; - } - case 25: { - message.satisfiesPzi = reader.bool(); - break; - } - case 31: { - message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.decode(reader, reader.uint32()); - break; - } - case 33: { - if (!(message.kmsKeyVersions && message.kmsKeyVersions.length)) - message.kmsKeyVersions = []; - message.kmsKeyVersions.push(reader.string()); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); break; } default: @@ -20053,1600 +20063,1690 @@ }; /** - * Decodes a Backup message from the specified reader or buffer, length delimited. + * Decodes a BackupLock message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup + * @memberof google.cloud.backupdr.v1.BackupLock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup} Backup + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Backup.decodeDelimited = function decodeDelimited(reader) { + BackupLock.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Backup message. + * Verifies a BackupLock message. * @function verify - * @memberof google.cloud.backupdr.v1.Backup + * @memberof google.cloud.backupdr.v1.BackupLock * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Backup.verify = function verify(message) { + BackupLock.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); + if (error) + return "lockUntilTime." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + properties.ClientLockInfo = 1; { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); if (error) - return "createTime." + error; + return "backupApplianceLockInfo." + error; } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - properties._enforcedRetentionEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); - if (error) - return "enforcedRetentionEndTime." + error; - } - } - if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { - properties._backupRetentionInheritance = 1; - switch (message.backupRetentionInheritance) { - default: - return "backupRetentionInheritance: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties._expireTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: string expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { - if (!Array.isArray(message.serviceLocks)) - return "serviceLocks: array expected"; - for (var i = 0; i < message.serviceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); - if (error) - return "serviceLocks." + error; - } - } - if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { - if (!Array.isArray(message.backupApplianceLocks)) - return "backupApplianceLocks: array expected"; - for (var i = 0; i < message.backupApplianceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); - if (error) - return "backupApplianceLocks." + error; - } - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); - if (error) - return "computeInstanceBackupProperties." + error; - } - } - if (message.cloudSqlInstanceBackupProperties != null && message.hasOwnProperty("cloudSqlInstanceBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify(message.cloudSqlInstanceBackupProperties); - if (error) - return "cloudSqlInstanceBackupProperties." + error; - } - } - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); - if (error) - return "backupApplianceBackupProperties." + error; - } - } - if (message.alloyDbBackupProperties != null && message.hasOwnProperty("alloyDbBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify(message.alloyDbBackupProperties); - if (error) - return "alloyDbBackupProperties." + error; - } - } - if (message.diskBackupProperties != null && message.hasOwnProperty("diskBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.DiskBackupProperties.verify(message.diskBackupProperties); - if (error) - return "diskBackupProperties." + error; - } - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - properties.planInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); - if (error) - return "gcpBackupPlanInfo." + error; - } - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) - return "resourceSizeBytes: integer|Long expected"; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - properties._satisfiesPzs = 1; - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - properties._satisfiesPzi = 1; - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - } - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.sourceResource = 1; + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + if (properties.ClientLockInfo === 1) + return "ClientLockInfo: multiple values"; + properties.ClientLockInfo = 1; { - var error = $root.google.cloud.backupdr.v1.BackupGcpResource.verify(message.gcpResource); + var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); if (error) - return "gcpResource." + error; + return "serviceLockInfo." + error; } } - if (message.kmsKeyVersions != null && message.hasOwnProperty("kmsKeyVersions")) { - if (!Array.isArray(message.kmsKeyVersions)) - return "kmsKeyVersions: array expected"; - for (var i = 0; i < message.kmsKeyVersions.length; ++i) - if (!$util.isString(message.kmsKeyVersions[i])) - return "kmsKeyVersions: string[] expected"; - } return null; }; /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup + * @memberof google.cloud.backupdr.v1.BackupLock * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup} Backup + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup) + BackupLock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) return object; - var message = new $root.google.cloud.backupdr.v1.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.backupdr.v1.BackupLock(); + if (object.lockUntilTime != null) { + if (typeof object.lockUntilTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); + message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.backupApplianceLockInfo != null) { + if (typeof object.backupApplianceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); + if (object.serviceLockInfo != null) { + if (typeof object.serviceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); } - if (object.enforcedRetentionEndTime != null) { - if (typeof object.enforcedRetentionEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + return message; + }; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupLock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lockUntilTime = null; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) + object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "backupApplianceLockInfo"; } - switch (object.backupRetentionInheritance) { - default: - if (typeof object.backupRetentionInheritance === "number") { - message.backupRetentionInheritance = object.backupRetentionInheritance; - break; - } - break; - case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": - case 0: - message.backupRetentionInheritance = 0; - break; - case "INHERIT_VAULT_RETENTION": - case 1: - message.backupRetentionInheritance = 1; - break; - case "MATCH_BACKUP_EXPIRE_TIME": - case 2: - message.backupRetentionInheritance = 2; - break; - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.etag != null) - message.etag = String(object.etag); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "UPLOADING": - case 5: - message.state = 5; - break; - } - if (object.serviceLocks) { - if (!Array.isArray(object.serviceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); - message.serviceLocks = []; - for (var i = 0; i < object.serviceLocks.length; ++i) { - if (typeof object.serviceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); - message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); - } - } - if (object.backupApplianceLocks) { - if (!Array.isArray(object.backupApplianceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); - message.backupApplianceLocks = []; - for (var i = 0; i < object.backupApplianceLocks.length; ++i) { - if (typeof object.backupApplianceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); - message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); - } - } - if (object.computeInstanceBackupProperties != null) { - if (typeof object.computeInstanceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); - } - if (object.cloudSqlInstanceBackupProperties != null) { - if (typeof object.cloudSqlInstanceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.cloudSqlInstanceBackupProperties: object expected"); - message.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.fromObject(object.cloudSqlInstanceBackupProperties); - } - if (object.backupApplianceBackupProperties != null) { - if (typeof object.backupApplianceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); - } - if (object.alloyDbBackupProperties != null) { - if (typeof object.alloyDbBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.alloyDbBackupProperties: object expected"); - message.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.fromObject(object.alloyDbBackupProperties); - } - if (object.diskBackupProperties != null) { - if (typeof object.diskBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.diskBackupProperties: object expected"); - message.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.fromObject(object.diskBackupProperties); - } - switch (object.backupType) { - default: - if (typeof object.backupType === "number") { - message.backupType = object.backupType; - break; - } - break; - case "BACKUP_TYPE_UNSPECIFIED": - case 0: - message.backupType = 0; - break; - case "SCHEDULED": - case 1: - message.backupType = 1; - break; - case "ON_DEMAND": - case 2: - message.backupType = 2; - break; - case "ON_DEMAND_OPERATIONAL": - case 3: - message.backupType = 3; - break; - } - if (object.gcpBackupPlanInfo != null) { - if (typeof object.gcpBackupPlanInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); - } - if (object.resourceSizeBytes != null) - if ($util.Long) - (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; - else if (typeof object.resourceSizeBytes === "string") - message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); - else if (typeof object.resourceSizeBytes === "number") - message.resourceSizeBytes = object.resourceSizeBytes; - else if (typeof object.resourceSizeBytes === "object") - message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.fromObject(object.gcpResource); - } - if (object.kmsKeyVersions) { - if (!Array.isArray(object.kmsKeyVersions)) - throw TypeError(".google.cloud.backupdr.v1.Backup.kmsKeyVersions: array expected"); - message.kmsKeyVersions = []; - for (var i = 0; i < object.kmsKeyVersions.length; ++i) - message.kmsKeyVersions[i] = String(object.kmsKeyVersions[i]); + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "serviceLockInfo"; } - return message; + return object; }; /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup + * Converts this BackupLock to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + * @returns {Object.} JSON object + */ + BackupLock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupLock + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupLock * @static - * @param {google.cloud.backupdr.v1.Backup} message Backup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Backup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.serviceLocks = []; - object.backupApplianceLocks = []; - object.kmsKeyVersions = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resourceSizeBytes = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); - if (options.oneofs) - object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object._expireTime = "expireTime"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; + BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; - if (message.serviceLocks && message.serviceLocks.length) { - object.serviceLocks = []; - for (var j = 0; j < message.serviceLocks.length; ++j) - object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); - } - if (message.backupApplianceLocks && message.backupApplianceLocks.length) { - object.backupApplianceLocks = []; - for (var j = 0; j < message.backupApplianceLocks.length; ++j) - object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "computeInstanceBackupProperties"; - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "backupApplianceBackupProperties"; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); - if (options.oneofs) - object.planInfo = "gcpBackupPlanInfo"; - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (typeof message.resourceSizeBytes === "number") - object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; - else - object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - object.satisfiesPzs = message.satisfiesPzs; - if (options.oneofs) - object._satisfiesPzs = "satisfiesPzs"; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { - object.satisfiesPzi = message.satisfiesPzi; - if (options.oneofs) - object._satisfiesPzi = "satisfiesPzi"; - } - if (message.cloudSqlInstanceBackupProperties != null && message.hasOwnProperty("cloudSqlInstanceBackupProperties")) { - object.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.toObject(message.cloudSqlInstanceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "cloudSqlInstanceBackupProperties"; - } - if (message.alloyDbBackupProperties != null && message.hasOwnProperty("alloyDbBackupProperties")) { - object.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.toObject(message.alloyDbBackupProperties, options); - if (options.oneofs) - object.backupProperties = "alloyDbBackupProperties"; - } - if (message.diskBackupProperties != null && message.hasOwnProperty("diskBackupProperties")) { - object.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.toObject(message.diskBackupProperties, options); - if (options.oneofs) - object.backupProperties = "diskBackupProperties"; - } - if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { - object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; - if (options.oneofs) - object._backupRetentionInheritance = "backupRetentionInheritance"; - } - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.toObject(message.gcpResource, options); - if (options.oneofs) - object.sourceResource = "gcpResource"; - } - if (message.kmsKeyVersions && message.kmsKeyVersions.length) { - object.kmsKeyVersions = []; - for (var j = 0; j < message.kmsKeyVersions.length; ++j) - object.kmsKeyVersions[j] = message.kmsKeyVersions[j]; - } - return object; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; }; + return BackupLock; + })(); + + v1.Backup = (function() { + /** - * Converts this Backup to JSON. - * @function toJSON + * Properties of a Backup. + * @memberof google.cloud.backupdr.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [description] Backup description + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime + * @property {Object.|null} [labels] Backup labels + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null} [backupRetentionInheritance] Backup backupRetentionInheritance + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime + * @property {string|null} [etag] Backup etag + * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state + * @property {Array.|null} [serviceLocks] Backup serviceLocks + * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks + * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties + * @property {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties|null} [cloudSqlInstanceBackupProperties] Backup cloudSqlInstanceBackupProperties + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties + * @property {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties|null} [alloyDbBackupProperties] Backup alloyDbBackupProperties + * @property {google.cloud.backupdr.v1.IDiskBackupProperties|null} [diskBackupProperties] Backup diskBackupProperties + * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo + * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes + * @property {boolean|null} [satisfiesPzs] Backup satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Backup satisfiesPzi + * @property {google.cloud.backupdr.v1.IBackupGcpResource|null} [gcpResource] Backup gcpResource + * @property {Array.|null} [kmsKeyVersions] Backup kmsKeyVersions + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + this.serviceLocks = []; + this.backupApplianceLocks = []; + this.kmsKeyVersions = []; + 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]]; + } + + /** + * Backup name. + * @member {string} name * @memberof google.cloud.backupdr.v1.Backup * @instance - * @returns {Object.} JSON object */ - Backup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Backup.prototype.name = ""; /** - * Gets the default type url for Backup - * @function getTypeUrl + * Backup description. + * @member {string|null|undefined} description * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @instance */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; - }; + Backup.prototype.description = null; /** - * State enum. - * @name google.cloud.backupdr.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - * @property {number} UPLOADING=5 UPLOADING value + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "UPLOADING"] = 5; - return values; - })(); + Backup.prototype.createTime = null; /** - * BackupType enum. - * @name google.cloud.backupdr.v1.Backup.BackupType - * @enum {number} - * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} ON_DEMAND=2 ON_DEMAND value - * @property {number} ON_DEMAND_OPERATIONAL=3 ON_DEMAND_OPERATIONAL value + * Backup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance */ - Backup.BackupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "ON_DEMAND"] = 2; - values[valuesById[3] = "ON_DEMAND_OPERATIONAL"] = 3; - return values; - })(); + Backup.prototype.updateTime = null; - Backup.GCPBackupPlanInfo = (function() { + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; - /** - * Properties of a GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @interface IGCPBackupPlanInfo - * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan - * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId - * @property {string|null} [backupPlanRevisionName] GCPBackupPlanInfo backupPlanRevisionName - * @property {string|null} [backupPlanRevisionId] GCPBackupPlanInfo backupPlanRevisionId - */ + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; - /** - * Constructs a new GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @classdesc Represents a GCPBackupPlanInfo. - * @implements IGCPBackupPlanInfo - * @constructor - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - */ - function GCPBackupPlanInfo(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]]; - } + /** + * Backup backupRetentionInheritance. + * @member {google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance|null|undefined} backupRetentionInheritance + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupRetentionInheritance = null; - /** - * GCPBackupPlanInfo backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlan = ""; + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.expireTime = null; - /** - * GCPBackupPlanInfo backupPlanRuleId. - * @member {string} backupPlanRuleId - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + /** + * Backup consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.consistencyTime = null; - /** - * GCPBackupPlanInfo backupPlanRevisionName. - * @member {string} backupPlanRevisionName - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRevisionName = ""; + /** + * Backup etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.etag = null; - /** - * GCPBackupPlanInfo backupPlanRevisionId. - * @member {string} backupPlanRevisionId - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRevisionId = ""; + /** + * Backup state. + * @member {google.cloud.backupdr.v1.Backup.State} state + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.state = 0; - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance - */ - GCPBackupPlanInfo.create = function create(properties) { - return new GCPBackupPlanInfo(properties); - }; + /** + * Backup serviceLocks. + * @member {Array.} serviceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.serviceLocks = $util.emptyArray; - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); - if (message.backupPlanRevisionName != null && Object.hasOwnProperty.call(message, "backupPlanRevisionName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanRevisionName); - if (message.backupPlanRevisionId != null && Object.hasOwnProperty.call(message, "backupPlanRevisionId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRevisionId); - return writer; - }; + /** + * Backup backupApplianceLocks. + * @member {Array.} backupApplianceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceLocks = $util.emptyArray; - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Backup computeInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.computeInstanceBackupProperties = null; - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanRuleId = reader.string(); - break; - } - case 3: { - message.backupPlanRevisionName = reader.string(); - break; - } - case 4: { - message.backupPlanRevisionId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Backup cloudSqlInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.ICloudSqlInstanceBackupProperties|null|undefined} cloudSqlInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.cloudSqlInstanceBackupProperties = null; - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Backup backupApplianceBackupProperties. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceBackupProperties = null; - /** - * Verifies a GCPBackupPlanInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPBackupPlanInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - if (!$util.isString(message.backupPlanRuleId)) - return "backupPlanRuleId: string expected"; - if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) - if (!$util.isString(message.backupPlanRevisionName)) - return "backupPlanRevisionName: string expected"; - if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) - if (!$util.isString(message.backupPlanRevisionId)) - return "backupPlanRevisionId: string expected"; - return null; - }; + /** + * Backup alloyDbBackupProperties. + * @member {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties|null|undefined} alloyDbBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.alloyDbBackupProperties = null; - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - */ - GCPBackupPlanInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanRuleId != null) - message.backupPlanRuleId = String(object.backupPlanRuleId); - if (object.backupPlanRevisionName != null) - message.backupPlanRevisionName = String(object.backupPlanRevisionName); - if (object.backupPlanRevisionId != null) - message.backupPlanRevisionId = String(object.backupPlanRevisionId); - return message; - }; + /** + * Backup diskBackupProperties. + * @member {google.cloud.backupdr.v1.IDiskBackupProperties|null|undefined} diskBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.diskBackupProperties = null; - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPBackupPlanInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanRuleId = ""; - object.backupPlanRevisionName = ""; - object.backupPlanRevisionId = ""; + /** + * Backup backupType. + * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup gcpBackupPlanInfo. + * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpBackupPlanInfo = null; + + /** + * Backup resourceSizeBytes. + * @member {number|Long} resourceSizeBytes + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Backup satisfiesPzs. + * @member {boolean|null|undefined} satisfiesPzs + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.satisfiesPzs = null; + + /** + * Backup satisfiesPzi. + * @member {boolean|null|undefined} satisfiesPzi + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.satisfiesPzi = null; + + /** + * Backup gcpResource. + * @member {google.cloud.backupdr.v1.IBackupGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpResource = null; + + /** + * Backup kmsKeyVersions. + * @member {Array.} kmsKeyVersions + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.kmsKeyVersions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { + get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_backupRetentionInheritance", { + get: $util.oneOfGetter($oneOfFields = ["backupRetentionInheritance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_expireTime", { + get: $util.oneOfGetter($oneOfFields = ["expireTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup backupProperties. + * @member {"computeInstanceBackupProperties"|"cloudSqlInstanceBackupProperties"|"backupApplianceBackupProperties"|"alloyDbBackupProperties"|"diskBackupProperties"|undefined} backupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "backupProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "cloudSqlInstanceBackupProperties", "backupApplianceBackupProperties", "alloyDbBackupProperties", "diskBackupProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup planInfo. + * @member {"gcpBackupPlanInfo"|undefined} planInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "planInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_satisfiesPzs", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Backup.prototype, "_satisfiesPzi", { + get: $util.oneOfGetter($oneOfFields = ["satisfiesPzi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup sourceResource. + * @member {"gcpResource"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); + if (message.serviceLocks != null && message.serviceLocks.length) + for (var i = 0; i < message.serviceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) + for (var i = 0; i < message.backupApplianceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); + if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) + $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 24, wireType 0 =*/192).bool(message.satisfiesPzs); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.satisfiesPzi); + if (message.cloudSqlInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "cloudSqlInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.encode(message.cloudSqlInstanceBackupProperties, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.alloyDbBackupProperties != null && Object.hasOwnProperty.call(message, "alloyDbBackupProperties")) + $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.encode(message.alloyDbBackupProperties, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.diskBackupProperties != null && Object.hasOwnProperty.call(message, "diskBackupProperties")) + $root.google.cloud.backupdr.v1.DiskBackupProperties.encode(message.diskBackupProperties, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.backupRetentionInheritance != null && Object.hasOwnProperty.call(message, "backupRetentionInheritance")) + writer.uint32(/* id 30, wireType 0 =*/240).int32(message.backupRetentionInheritance); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.BackupGcpResource.encode(message.gcpResource, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.kmsKeyVersions != null && message.kmsKeyVersions.length) + for (var i = 0; i < message.kmsKeyVersions.length; ++i) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.kmsKeyVersions[i]); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 30: { + message.backupRetentionInheritance = reader.int32(); + break; + } + case 7: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 15: { + message.state = reader.int32(); + break; + } + case 17: { + if (!(message.serviceLocks && message.serviceLocks.length)) + message.serviceLocks = []; + message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 18: { + if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) + message.backupApplianceLocks = []; + message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 19: { + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 26: { + message.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 21: { + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 27: { + message.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.decode(reader, reader.uint32()); + break; + } + case 28: { + message.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupType = reader.int32(); + break; + } + case 22: { + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.resourceSizeBytes = reader.int64(); + break; + } + case 24: { + message.satisfiesPzs = reader.bool(); + break; + } + case 25: { + message.satisfiesPzi = reader.bool(); + break; + } + case 31: { + message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.decode(reader, reader.uint32()); + break; + } + case 33: { + if (!(message.kmsKeyVersions && message.kmsKeyVersions.length)) + message.kmsKeyVersions = []; + message.kmsKeyVersions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - object.backupPlanRuleId = message.backupPlanRuleId; - if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) - object.backupPlanRevisionName = message.backupPlanRevisionName; - if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) - object.backupPlanRevisionId = message.backupPlanRevisionId; - return object; - }; + } + return message; + }; - /** - * Converts this GCPBackupPlanInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - * @returns {Object.} JSON object - */ - GCPBackupPlanInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for GCPBackupPlanInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + properties._enforcedRetentionEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + properties._backupRetentionInheritance = 1; + switch (message.backupRetentionInheritance) { + default: + return "backupRetentionInheritance: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties._expireTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { + if (!Array.isArray(message.serviceLocks)) + return "serviceLocks: array expected"; + for (var i = 0; i < message.serviceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); + if (error) + return "serviceLocks." + error; + } + } + if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { + if (!Array.isArray(message.backupApplianceLocks)) + return "backupApplianceLocks: array expected"; + for (var i = 0; i < message.backupApplianceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); + if (error) + return "backupApplianceLocks." + error; + } + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); + if (error) + return "computeInstanceBackupProperties." + error; + } + } + if (message.cloudSqlInstanceBackupProperties != null && message.hasOwnProperty("cloudSqlInstanceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.verify(message.cloudSqlInstanceBackupProperties); + if (error) + return "cloudSqlInstanceBackupProperties." + error; + } + } + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); + if (error) + return "backupApplianceBackupProperties." + error; + } + } + if (message.alloyDbBackupProperties != null && message.hasOwnProperty("alloyDbBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify(message.alloyDbBackupProperties); + if (error) + return "alloyDbBackupProperties." + error; + } + } + if (message.diskBackupProperties != null && message.hasOwnProperty("diskBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.DiskBackupProperties.verify(message.diskBackupProperties); + if (error) + return "diskBackupProperties." + error; + } + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + properties.planInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); + if (error) + return "gcpBackupPlanInfo." + error; + } + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) + return "resourceSizeBytes: integer|Long expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + properties._satisfiesPzs = 1; + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + properties._satisfiesPzi = 1; + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + } + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupGcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; - }; - - return GCPBackupPlanInfo; - })(); - - return Backup; - })(); - - v1.CreateBackupVaultRequest = (function() { - - /** - * Properties of a CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupVaultRequest - * @property {string|null} [parent] CreateBackupVaultRequest parent - * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault - * @property {string|null} [requestId] CreateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly - */ - - /** - * Constructs a new CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupVaultRequest. - * @implements ICreateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - */ - function CreateBackupVaultRequest(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]]; - } - - /** - * CreateBackupVaultRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.parent = ""; - - /** - * CreateBackupVaultRequest backupVaultId. - * @member {string} backupVaultId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVaultId = ""; - - /** - * CreateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVault = null; - - /** - * CreateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.requestId = ""; - - /** - * CreateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance - */ - CreateBackupVaultRequest.create = function create(properties) { - return new CreateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + } + if (message.kmsKeyVersions != null && message.hasOwnProperty("kmsKeyVersions")) { + if (!Array.isArray(message.kmsKeyVersions)) + return "kmsKeyVersions: array expected"; + for (var i = 0; i < message.kmsKeyVersions.length; ++i) + if (!$util.isString(message.kmsKeyVersions[i])) + return "kmsKeyVersions: string[] expected"; + } + return null; }; /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup} Backup */ - CreateBackupVaultRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + switch (object.backupRetentionInheritance) { + default: + if (typeof object.backupRetentionInheritance === "number") { + message.backupRetentionInheritance = object.backupRetentionInheritance; break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupVaultId = reader.string(); - break; - } - case 3: { - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + } + break; + case "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": + case 0: + message.backupRetentionInheritance = 0; + break; + case "INHERIT_VAULT_RETENTION": + case 1: + message.backupRetentionInheritance = 1; + break; + case "MATCH_BACKUP_EXPIRE_TIME": + case 2: + message.backupRetentionInheritance = 2; + break; + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.etag != null) + message.etag = String(object.etag); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + case "UPLOADING": + case 5: + message.state = 5; + break; + } + if (object.serviceLocks) { + if (!Array.isArray(object.serviceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); + message.serviceLocks = []; + for (var i = 0; i < object.serviceLocks.length; ++i) { + if (typeof object.serviceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); + message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); + } + } + if (object.backupApplianceLocks) { + if (!Array.isArray(object.backupApplianceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); + message.backupApplianceLocks = []; + for (var i = 0; i < object.backupApplianceLocks.length; ++i) { + if (typeof object.backupApplianceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); + message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); + } + } + if (object.computeInstanceBackupProperties != null) { + if (typeof object.computeInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); + } + if (object.cloudSqlInstanceBackupProperties != null) { + if (typeof object.cloudSqlInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.cloudSqlInstanceBackupProperties: object expected"); + message.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.fromObject(object.cloudSqlInstanceBackupProperties); + } + if (object.backupApplianceBackupProperties != null) { + if (typeof object.backupApplianceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); + } + if (object.alloyDbBackupProperties != null) { + if (typeof object.alloyDbBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.alloyDbBackupProperties: object expected"); + message.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.fromObject(object.alloyDbBackupProperties); + } + if (object.diskBackupProperties != null) { + if (typeof object.diskBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.diskBackupProperties: object expected"); + message.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.fromObject(object.diskBackupProperties); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; break; } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "SCHEDULED": + case 1: + message.backupType = 1; + break; + case "ON_DEMAND": + case 2: + message.backupType = 2; + break; + case "ON_DEMAND_OPERATIONAL": + case 3: + message.backupType = 3; + break; + } + if (object.gcpBackupPlanInfo != null) { + if (typeof object.gcpBackupPlanInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); + } + if (object.resourceSizeBytes != null) + if ($util.Long) + (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; + else if (typeof object.resourceSizeBytes === "string") + message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); + else if (typeof object.resourceSizeBytes === "number") + message.resourceSizeBytes = object.resourceSizeBytes; + else if (typeof object.resourceSizeBytes === "object") + message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.fromObject(object.gcpResource); + } + if (object.kmsKeyVersions) { + if (!Array.isArray(object.kmsKeyVersions)) + throw TypeError(".google.cloud.backupdr.v1.Backup.kmsKeyVersions: array expected"); + message.kmsKeyVersions = []; + for (var i = 0; i < object.kmsKeyVersions.length; ++i) + message.kmsKeyVersions[i] = String(object.kmsKeyVersions[i]); } return message; }; /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @param {google.cloud.backupdr.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - if (!$util.isString(message.backupVaultId)) - return "backupVaultId: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + error; + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceLocks = []; + object.backupApplianceLocks = []; + object.kmsKeyVersions = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceSizeBytes = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + if (options.oneofs) + object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object._expireTime = "expireTime"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; + if (message.serviceLocks && message.serviceLocks.length) { + object.serviceLocks = []; + for (var j = 0; j < message.serviceLocks.length; ++j) + object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); + } + if (message.backupApplianceLocks && message.backupApplianceLocks.length) { + object.backupApplianceLocks = []; + for (var j = 0; j < message.backupApplianceLocks.length; ++j) + object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "computeInstanceBackupProperties"; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "backupApplianceBackupProperties"; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); + if (options.oneofs) + object.planInfo = "gcpBackupPlanInfo"; + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (typeof message.resourceSizeBytes === "number") + object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; + else + object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + object.satisfiesPzs = message.satisfiesPzs; + if (options.oneofs) + object._satisfiesPzs = "satisfiesPzs"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - */ - CreateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupVaultId != null) - message.backupVaultId = String(object.backupVaultId); - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) { + object.satisfiesPzi = message.satisfiesPzi; + if (options.oneofs) + object._satisfiesPzi = "satisfiesPzi"; } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupVaultId = ""; - object.backupVault = null; - object.requestId = ""; - object.validateOnly = false; + if (message.cloudSqlInstanceBackupProperties != null && message.hasOwnProperty("cloudSqlInstanceBackupProperties")) { + object.cloudSqlInstanceBackupProperties = $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.toObject(message.cloudSqlInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "cloudSqlInstanceBackupProperties"; + } + if (message.alloyDbBackupProperties != null && message.hasOwnProperty("alloyDbBackupProperties")) { + object.alloyDbBackupProperties = $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.toObject(message.alloyDbBackupProperties, options); + if (options.oneofs) + object.backupProperties = "alloyDbBackupProperties"; + } + if (message.diskBackupProperties != null && message.hasOwnProperty("diskBackupProperties")) { + object.diskBackupProperties = $root.google.cloud.backupdr.v1.DiskBackupProperties.toObject(message.diskBackupProperties, options); + if (options.oneofs) + object.backupProperties = "diskBackupProperties"; + } + if (message.backupRetentionInheritance != null && message.hasOwnProperty("backupRetentionInheritance")) { + object.backupRetentionInheritance = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] === undefined ? message.backupRetentionInheritance : $root.google.cloud.backupdr.v1.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance] : message.backupRetentionInheritance; + if (options.oneofs) + object._backupRetentionInheritance = "backupRetentionInheritance"; + } + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.BackupGcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.sourceResource = "gcpResource"; + } + if (message.kmsKeyVersions && message.kmsKeyVersions.length) { + object.kmsKeyVersions = []; + for (var j = 0; j < message.kmsKeyVersions.length; ++j) + object.kmsKeyVersions[j] = message.kmsKeyVersions[j]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - object.backupVaultId = message.backupVaultId; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateBackupVaultRequest to JSON. + * Converts this Backup to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.Backup * @instance * @returns {Object.} JSON object */ - CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + Backup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateBackupVaultRequest + * Gets the default type url for Backup * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.Backup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; }; - return CreateBackupVaultRequest; - })(); - - v1.ListBackupVaultsRequest = (function() { - /** - * Properties of a ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsRequest - * @property {string|null} [parent] ListBackupVaultsRequest parent - * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize - * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken - * @property {string|null} [filter] ListBackupVaultsRequest filter - * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view + * State enum. + * @name google.cloud.backupdr.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + * @property {number} UPLOADING=5 UPLOADING value */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "UPLOADING"] = 5; + return values; + })(); /** - * Constructs a new ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsRequest. - * @implements IListBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * BackupType enum. + * @name google.cloud.backupdr.v1.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} ON_DEMAND=2 ON_DEMAND value + * @property {number} ON_DEMAND_OPERATIONAL=3 ON_DEMAND_OPERATIONAL value */ - function ListBackupVaultsRequest(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]]; - } + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "ON_DEMAND"] = 2; + values[valuesById[3] = "ON_DEMAND_OPERATIONAL"] = 3; + return values; + })(); - /** - * ListBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.parent = ""; + Backup.GCPBackupPlanInfo = (function() { - /** - * ListBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageSize = 0; + /** + * Properties of a GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @interface IGCPBackupPlanInfo + * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan + * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId + * @property {string|null} [backupPlanRevisionName] GCPBackupPlanInfo backupPlanRevisionName + * @property {string|null} [backupPlanRevisionId] GCPBackupPlanInfo backupPlanRevisionId + */ - /** - * ListBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageToken = ""; + /** + * Constructs a new GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @classdesc Represents a GCPBackupPlanInfo. + * @implements IGCPBackupPlanInfo + * @constructor + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + */ + function GCPBackupPlanInfo(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]]; + } - /** - * ListBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.filter = ""; + /** + * GCPBackupPlanInfo backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlan = ""; - /** - * ListBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.orderBy = ""; + /** + * GCPBackupPlanInfo backupPlanRuleId. + * @member {string} backupPlanRuleId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + + /** + * GCPBackupPlanInfo backupPlanRevisionName. + * @member {string} backupPlanRevisionName + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRevisionName = ""; - /** - * ListBackupVaultsRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.view = 0; + /** + * GCPBackupPlanInfo backupPlanRevisionId. + * @member {string} backupPlanRevisionId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRevisionId = ""; - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance - */ - ListBackupVaultsRequest.create = function create(properties) { - return new ListBackupVaultsRequest(properties); - }; + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance + */ + GCPBackupPlanInfo.create = function create(properties) { + return new GCPBackupPlanInfo(properties); + }; - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); + if (message.backupPlanRevisionName != null && Object.hasOwnProperty.call(message, "backupPlanRevisionName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanRevisionName); + if (message.backupPlanRevisionId != null && Object.hasOwnProperty.call(message, "backupPlanRevisionId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRevisionId); + return writer; + }; - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 6: { - message.view = reader.int32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanRuleId = reader.string(); + break; + } + case 3: { + message.backupPlanRevisionName = reader.string(); + break; + } + case 4: { + message.backupPlanRevisionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPBackupPlanInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPBackupPlanInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + if (!$util.isString(message.backupPlanRuleId)) + return "backupPlanRuleId: string expected"; + if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) + if (!$util.isString(message.backupPlanRevisionName)) + return "backupPlanRevisionName: string expected"; + if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) + if (!$util.isString(message.backupPlanRevisionId)) + return "backupPlanRevisionId: string expected"; + return null; + }; + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + */ + GCPBackupPlanInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanRuleId != null) + message.backupPlanRuleId = String(object.backupPlanRuleId); + if (object.backupPlanRevisionName != null) + message.backupPlanRevisionName = String(object.backupPlanRevisionName); + if (object.backupPlanRevisionId != null) + message.backupPlanRevisionId = String(object.backupPlanRevisionId); + return message; + }; - /** - * Verifies a ListBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPBackupPlanInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanRuleId = ""; + object.backupPlanRevisionName = ""; + object.backupPlanRevisionId = ""; } - return null; - }; - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - */ - ListBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + object.backupPlanRuleId = message.backupPlanRuleId; + if (message.backupPlanRevisionName != null && message.hasOwnProperty("backupPlanRevisionName")) + object.backupPlanRevisionName = message.backupPlanRevisionName; + if (message.backupPlanRevisionId != null && message.hasOwnProperty("backupPlanRevisionId")) + object.backupPlanRevisionId = message.backupPlanRevisionId; return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; + }; - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; + /** + * Converts this GCPBackupPlanInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + * @returns {Object.} JSON object + */ + GCPBackupPlanInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for GCPBackupPlanInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; + }; - /** - * Gets the default type url for ListBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; - }; + return GCPBackupPlanInfo; + })(); - return ListBackupVaultsRequest; + return Backup; })(); - v1.ListBackupVaultsResponse = (function() { + v1.CreateBackupVaultRequest = (function() { /** - * Properties of a ListBackupVaultsResponse. + * Properties of a CreateBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsResponse - * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + * @property {string|null} [requestId] CreateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly */ /** - * Constructs a new ListBackupVaultsResponse. + * Constructs a new CreateBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsResponse. - * @implements IListBackupVaultsResponse + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set */ - function ListBackupVaultsResponse(properties) { - this.backupVaults = []; - this.unreachable = []; + function CreateBackupVaultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21654,111 +21754,133 @@ } /** - * ListBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @instance */ - ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + CreateBackupVaultRequest.prototype.backupVault = null; /** - * ListBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * CreateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @instance */ - ListBackupVaultsResponse.prototype.nextPageToken = ""; + CreateBackupVaultRequest.prototype.requestId = ""; /** - * ListBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * CreateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @instance */ - ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + CreateBackupVaultRequest.prototype.validateOnly = false; /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. + * Creates a new CreateBackupVaultRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance */ - ListBackupVaultsResponse.create = function create(properties) { - return new ListBackupVaultsResponse(properties); + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); }; /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupVaultsResponse.encode = function encode(message, writer) { + CreateBackupVaultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupVaultsResponse.decode = function decode(reader, length, error) { + CreateBackupVaultRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.backupVaultId = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); break; } default: @@ -21770,173 +21892,165 @@ }; /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupVaultsResponse message. + * Verifies a CreateBackupVaultRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupVaultsResponse.verify = function verify(message) { + CreateBackupVaultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest */ - ListBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupVaultId != null) + message.backupVaultId = String(object.backupVaultId); + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupVaultsResponse.toObject = function toObject(message, options) { + CreateBackupVaultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + object.backupVaultId = message.backupVaultId; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListBackupVaultsResponse to JSON. + * Converts this CreateBackupVaultRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @instance * @returns {Object.} JSON object */ - ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupVaultsResponse + * Gets the default type url for CreateBackupVaultRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; }; - return ListBackupVaultsResponse; + return CreateBackupVaultRequest; })(); - v1.FetchUsableBackupVaultsRequest = (function() { + v1.ListBackupVaultsRequest = (function() { /** - * Properties of a FetchUsableBackupVaultsRequest. + * Properties of a ListBackupVaultsRequest. * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsRequest - * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent - * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize - * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken - * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter - * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [filter] ListBackupVaultsRequest filter + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view */ /** - * Constructs a new FetchUsableBackupVaultsRequest. + * Constructs a new ListBackupVaultsRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsRequest. - * @implements IFetchUsableBackupVaultsRequest + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set */ - function FetchUsableBackupVaultsRequest(properties) { + function ListBackupVaultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21944,67 +22058,75 @@ } /** - * FetchUsableBackupVaultsRequest parent. + * ListBackupVaultsRequest parent. * @member {string} parent - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance */ - FetchUsableBackupVaultsRequest.prototype.parent = ""; + ListBackupVaultsRequest.prototype.parent = ""; /** - * FetchUsableBackupVaultsRequest pageSize. + * ListBackupVaultsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance */ - FetchUsableBackupVaultsRequest.prototype.pageSize = 0; + ListBackupVaultsRequest.prototype.pageSize = 0; /** - * FetchUsableBackupVaultsRequest pageToken. + * ListBackupVaultsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance */ - FetchUsableBackupVaultsRequest.prototype.pageToken = ""; + ListBackupVaultsRequest.prototype.pageToken = ""; /** - * FetchUsableBackupVaultsRequest filter. + * ListBackupVaultsRequest filter. * @member {string} filter - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance */ - FetchUsableBackupVaultsRequest.prototype.filter = ""; + ListBackupVaultsRequest.prototype.filter = ""; /** - * FetchUsableBackupVaultsRequest orderBy. + * ListBackupVaultsRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance */ - FetchUsableBackupVaultsRequest.prototype.orderBy = ""; + ListBackupVaultsRequest.prototype.orderBy = ""; /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * ListBackupVaultsRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance */ - FetchUsableBackupVaultsRequest.create = function create(properties) { - return new FetchUsableBackupVaultsRequest(properties); + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); }; /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchUsableBackupVaultsRequest.encode = function encode(message, writer) { + ListBackupVaultsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -22017,37 +22139,39 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); return writer; }; /** - * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchUsableBackupVaultsRequest.decode = function decode(reader, length, error) { + ListBackupVaultsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -22073,6 +22197,10 @@ message.orderBy = reader.string(); break; } + case 6: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -22082,30 +22210,30 @@ }; /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchUsableBackupVaultsRequest message. + * Verifies a ListBackupVaultsRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchUsableBackupVaultsRequest.verify = function verify(message) { + ListBackupVaultsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -22123,21 +22251,30 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest */ - FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -22148,19 +22285,39 @@ message.filter = String(object.filter); if (object.orderBy != null) message.orderBy = String(object.orderBy); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } return message; }; /** - * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest + * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchUsableBackupVaultsRequest.toObject = function toObject(message, options) { + ListBackupVaultsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -22170,6 +22327,7 @@ object.pageToken = ""; object.filter = ""; object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -22181,58 +22339,60 @@ object.filter = message.filter; if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; return object; }; /** - * Converts this FetchUsableBackupVaultsRequest to JSON. + * Converts this ListBackupVaultsRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @instance * @returns {Object.} JSON object */ - FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchUsableBackupVaultsRequest + * Gets the default type url for ListBackupVaultsRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; }; - return FetchUsableBackupVaultsRequest; + return ListBackupVaultsRequest; })(); - v1.FetchUsableBackupVaultsResponse = (function() { + v1.ListBackupVaultsResponse = (function() { /** - * Properties of a FetchUsableBackupVaultsResponse. + * Properties of a ListBackupVaultsResponse. * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsResponse - * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable */ /** - * Constructs a new FetchUsableBackupVaultsResponse. + * Constructs a new ListBackupVaultsResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsResponse. - * @implements IFetchUsableBackupVaultsResponse + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set */ - function FetchUsableBackupVaultsResponse(properties) { + function ListBackupVaultsResponse(properties) { this.backupVaults = []; this.unreachable = []; if (properties) @@ -22242,51 +22402,51 @@ } /** - * FetchUsableBackupVaultsResponse backupVaults. + * ListBackupVaultsResponse backupVaults. * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @instance */ - FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; /** - * FetchUsableBackupVaultsResponse nextPageToken. + * ListBackupVaultsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @instance */ - FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; + ListBackupVaultsResponse.prototype.nextPageToken = ""; /** - * FetchUsableBackupVaultsResponse unreachable. + * ListBackupVaultsResponse unreachable. * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @instance */ - FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * Creates a new ListBackupVaultsResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance */ - FetchUsableBackupVaultsResponse.create = function create(properties) { - return new FetchUsableBackupVaultsResponse(properties); + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); }; /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { + ListBackupVaultsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.backupVaults != null && message.backupVaults.length) @@ -22301,33 +22461,33 @@ }; /** - * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchUsableBackupVaultsResponse.decode = function decode(reader, length, error) { + ListBackupVaultsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -22358,30 +22518,30 @@ }; /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchUsableBackupVaultsResponse message. + * Verifies a ListBackupVaultsResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchUsableBackupVaultsResponse.verify = function verify(message) { + ListBackupVaultsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { @@ -22407,24 +22567,24 @@ }; /** - * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse */ - FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); if (object.backupVaults) { if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); message.backupVaults = []; for (var i = 0; i < object.backupVaults.length; ++i) { if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); } } @@ -22432,7 +22592,7 @@ message.nextPageToken = String(object.nextPageToken); if (object.unreachable) { if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.unreachable: array expected"); + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.unreachable: array expected"); message.unreachable = []; for (var i = 0; i < object.unreachable.length; ++i) message.unreachable[i] = String(object.unreachable[i]); @@ -22441,15 +22601,15 @@ }; /** - * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { + ListBackupVaultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -22475,58 +22635,56 @@ }; /** - * Converts this FetchUsableBackupVaultsResponse to JSON. + * Converts this ListBackupVaultsResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @instance * @returns {Object.} JSON object */ - FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchUsableBackupVaultsResponse + * Gets the default type url for ListBackupVaultsResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; }; - return FetchUsableBackupVaultsResponse; + return ListBackupVaultsResponse; })(); - v1.FetchBackupsForResourceTypeRequest = (function() { + v1.FetchUsableBackupVaultsRequest = (function() { /** - * Properties of a FetchBackupsForResourceTypeRequest. + * Properties of a FetchUsableBackupVaultsRequest. * @memberof google.cloud.backupdr.v1 - * @interface IFetchBackupsForResourceTypeRequest - * @property {string|null} [parent] FetchBackupsForResourceTypeRequest parent - * @property {string|null} [resourceType] FetchBackupsForResourceTypeRequest resourceType - * @property {number|null} [pageSize] FetchBackupsForResourceTypeRequest pageSize - * @property {string|null} [pageToken] FetchBackupsForResourceTypeRequest pageToken - * @property {string|null} [filter] FetchBackupsForResourceTypeRequest filter - * @property {string|null} [orderBy] FetchBackupsForResourceTypeRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] FetchBackupsForResourceTypeRequest view + * @interface IFetchUsableBackupVaultsRequest + * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent + * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize + * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken + * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter + * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy */ /** - * Constructs a new FetchBackupsForResourceTypeRequest. + * Constructs a new FetchUsableBackupVaultsRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchBackupsForResourceTypeRequest. - * @implements IFetchBackupsForResourceTypeRequest + * @classdesc Represents a FetchUsableBackupVaultsRequest. + * @implements IFetchUsableBackupVaultsRequest * @constructor - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set */ - function FetchBackupsForResourceTypeRequest(properties) { + function FetchUsableBackupVaultsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22534,130 +22692,110 @@ } /** - * FetchBackupsForResourceTypeRequest parent. + * FetchUsableBackupVaultsRequest parent. * @member {string} parent - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest - * @instance - */ - FetchBackupsForResourceTypeRequest.prototype.parent = ""; - - /** - * FetchBackupsForResourceTypeRequest resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance */ - FetchBackupsForResourceTypeRequest.prototype.resourceType = ""; + FetchUsableBackupVaultsRequest.prototype.parent = ""; /** - * FetchBackupsForResourceTypeRequest pageSize. + * FetchUsableBackupVaultsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance */ - FetchBackupsForResourceTypeRequest.prototype.pageSize = 0; + FetchUsableBackupVaultsRequest.prototype.pageSize = 0; /** - * FetchBackupsForResourceTypeRequest pageToken. + * FetchUsableBackupVaultsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance */ - FetchBackupsForResourceTypeRequest.prototype.pageToken = ""; + FetchUsableBackupVaultsRequest.prototype.pageToken = ""; /** - * FetchBackupsForResourceTypeRequest filter. + * FetchUsableBackupVaultsRequest filter. * @member {string} filter - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance */ - FetchBackupsForResourceTypeRequest.prototype.filter = ""; + FetchUsableBackupVaultsRequest.prototype.filter = ""; /** - * FetchBackupsForResourceTypeRequest orderBy. + * FetchUsableBackupVaultsRequest orderBy. * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest - * @instance - */ - FetchBackupsForResourceTypeRequest.prototype.orderBy = ""; - - /** - * FetchBackupsForResourceTypeRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance */ - FetchBackupsForResourceTypeRequest.prototype.view = 0; + FetchUsableBackupVaultsRequest.prototype.orderBy = ""; /** - * Creates a new FetchBackupsForResourceTypeRequest instance using the specified properties. + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance */ - FetchBackupsForResourceTypeRequest.create = function create(properties) { - return new FetchBackupsForResourceTypeRequest(properties); + FetchUsableBackupVaultsRequest.create = function create(properties) { + return new FetchUsableBackupVaultsRequest(properties); }; /** - * Encodes the specified FetchBackupsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchBackupsForResourceTypeRequest.encode = function encode(message, writer) { + FetchUsableBackupVaultsRequest.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified FetchBackupsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchBackupsForResourceTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer. + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchBackupsForResourceTypeRequest.decode = function decode(reader, length, error) { + FetchUsableBackupVaultsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -22668,29 +22806,21 @@ break; } case 2: { - message.resourceType = reader.string(); - break; - } - case 3: { message.pageSize = reader.int32(); break; } - case 4: { + case 3: { message.pageToken = reader.string(); break; } - case 5: { + case 4: { message.filter = reader.string(); break; } - case 6: { + case 5: { message.orderBy = reader.string(); break; } - case 7: { - message.view = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -22700,38 +22830,35 @@ }; /** - * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchBackupsForResourceTypeRequest.decodeDelimited = function decodeDelimited(reader) { + FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchBackupsForResourceTypeRequest message. + * Verifies a FetchUsableBackupVaultsRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchBackupsForResourceTypeRequest.verify = function verify(message) { + FetchUsableBackupVaultsRequest.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.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -22744,34 +22871,23 @@ if (message.orderBy != null && message.hasOwnProperty("orderBy")) if (!$util.isString(message.orderBy)) return "orderBy: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a FetchBackupsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest */ - FetchBackupsForResourceTypeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest) + FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) return object; - var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -22780,55 +22896,31 @@ message.filter = String(object.filter); if (object.orderBy != null) message.orderBy = String(object.orderBy); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } return message; }; /** - * Creates a plain object from a FetchBackupsForResourceTypeRequest message. Also converts values to other types if specified. + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static - * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchBackupsForResourceTypeRequest.toObject = function toObject(message, options) { + FetchUsableBackupVaultsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.resourceType = ""; object.pageSize = 0; object.pageToken = ""; object.filter = ""; object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; if (message.pageSize != null && message.hasOwnProperty("pageSize")) object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) @@ -22837,60 +22929,60 @@ object.filter = message.filter; if (message.orderBy != null && message.hasOwnProperty("orderBy")) object.orderBy = message.orderBy; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this FetchBackupsForResourceTypeRequest to JSON. + * Converts this FetchUsableBackupVaultsRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @instance * @returns {Object.} JSON object */ - FetchBackupsForResourceTypeRequest.prototype.toJSON = function toJSON() { + FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchBackupsForResourceTypeRequest + * Gets the default type url for FetchUsableBackupVaultsRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchBackupsForResourceTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; }; - return FetchBackupsForResourceTypeRequest; + return FetchUsableBackupVaultsRequest; })(); - v1.FetchBackupsForResourceTypeResponse = (function() { + v1.FetchUsableBackupVaultsResponse = (function() { /** - * Properties of a FetchBackupsForResourceTypeResponse. + * Properties of a FetchUsableBackupVaultsResponse. * @memberof google.cloud.backupdr.v1 - * @interface IFetchBackupsForResourceTypeResponse - * @property {Array.|null} [backups] FetchBackupsForResourceTypeResponse backups - * @property {string|null} [nextPageToken] FetchBackupsForResourceTypeResponse nextPageToken + * @interface IFetchUsableBackupVaultsResponse + * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable */ /** - * Constructs a new FetchBackupsForResourceTypeResponse. + * Constructs a new FetchUsableBackupVaultsResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchBackupsForResourceTypeResponse. - * @implements IFetchBackupsForResourceTypeResponse + * @classdesc Represents a FetchUsableBackupVaultsResponse. + * @implements IFetchUsableBackupVaultsResponse * @constructor - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set */ - function FetchBackupsForResourceTypeResponse(properties) { - this.backups = []; + function FetchUsableBackupVaultsResponse(properties) { + this.backupVaults = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22898,96 +22990,113 @@ } /** - * FetchBackupsForResourceTypeResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * FetchUsableBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @instance */ - FetchBackupsForResourceTypeResponse.prototype.backups = $util.emptyArray; + FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; /** - * FetchBackupsForResourceTypeResponse nextPageToken. + * FetchUsableBackupVaultsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @instance */ - FetchBackupsForResourceTypeResponse.prototype.nextPageToken = ""; + FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; /** - * Creates a new FetchBackupsForResourceTypeResponse instance using the specified properties. + * FetchUsableBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance */ - FetchBackupsForResourceTypeResponse.create = function create(properties) { - return new FetchBackupsForResourceTypeResponse(properties); + FetchUsableBackupVaultsResponse.create = function create(properties) { + return new FetchUsableBackupVaultsResponse(properties); }; /** - * Encodes the specified FetchBackupsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchBackupsForResourceTypeResponse.encode = function encode(message, writer) { + FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified FetchBackupsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchBackupsForResourceTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { + FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer. + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchBackupsForResourceTypeResponse.decode = function decode(reader, length, error) { + FetchUsableBackupVaultsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32())); break; } case 2: { message.nextPageToken = reader.string(); break; } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22997,149 +23106,175 @@ }; /** - * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer, length delimited. + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchBackupsForResourceTypeResponse.decodeDelimited = function decodeDelimited(reader) { + FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchBackupsForResourceTypeResponse message. + * Verifies a FetchUsableBackupVaultsResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchBackupsForResourceTypeResponse.verify = function verify(message) { + FetchUsableBackupVaultsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); if (error) - return "backups." + error; + return "backupVaults." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) if (!$util.isString(message.nextPageToken)) return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a FetchBackupsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse */ - FetchBackupsForResourceTypeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse) + FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) return object; - var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); } } if (object.nextPageToken != null) message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a FetchBackupsForResourceTypeResponse message. Also converts values to other types if specified. + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static - * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchBackupsForResourceTypeResponse.toObject = function toObject(message, options) { + FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.backups = []; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } if (options.defaults) object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[j], options); + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } return object; }; /** - * Converts this FetchBackupsForResourceTypeResponse to JSON. + * Converts this FetchUsableBackupVaultsResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @instance * @returns {Object.} JSON object */ - FetchBackupsForResourceTypeResponse.prototype.toJSON = function toJSON() { + FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchBackupsForResourceTypeResponse + * Gets the default type url for FetchUsableBackupVaultsResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchBackupsForResourceTypeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; }; - return FetchBackupsForResourceTypeResponse; + return FetchUsableBackupVaultsResponse; })(); - v1.GetBackupVaultRequest = (function() { + v1.FetchBackupsForResourceTypeRequest = (function() { /** - * Properties of a GetBackupVaultRequest. + * Properties of a FetchBackupsForResourceTypeRequest. * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupVaultRequest - * @property {string|null} [name] GetBackupVaultRequest name - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view + * @interface IFetchBackupsForResourceTypeRequest + * @property {string|null} [parent] FetchBackupsForResourceTypeRequest parent + * @property {string|null} [resourceType] FetchBackupsForResourceTypeRequest resourceType + * @property {number|null} [pageSize] FetchBackupsForResourceTypeRequest pageSize + * @property {string|null} [pageToken] FetchBackupsForResourceTypeRequest pageToken + * @property {string|null} [filter] FetchBackupsForResourceTypeRequest filter + * @property {string|null} [orderBy] FetchBackupsForResourceTypeRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] FetchBackupsForResourceTypeRequest view */ /** - * Constructs a new GetBackupVaultRequest. + * Constructs a new FetchBackupsForResourceTypeRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupVaultRequest. - * @implements IGetBackupVaultRequest + * @classdesc Represents a FetchBackupsForResourceTypeRequest. + * @implements IFetchBackupsForResourceTypeRequest * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set */ - function GetBackupVaultRequest(properties) { + function FetchBackupsForResourceTypeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23147,90 +23282,160 @@ } /** - * GetBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * FetchBackupsForResourceTypeRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @instance */ - GetBackupVaultRequest.prototype.name = ""; + FetchBackupsForResourceTypeRequest.prototype.parent = ""; /** - * GetBackupVaultRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * FetchBackupsForResourceTypeRequest resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @instance */ - GetBackupVaultRequest.prototype.view = 0; + FetchBackupsForResourceTypeRequest.prototype.resourceType = ""; /** - * Creates a new GetBackupVaultRequest instance using the specified properties. + * FetchBackupsForResourceTypeRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.pageSize = 0; + + /** + * FetchBackupsForResourceTypeRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.pageToken = ""; + + /** + * FetchBackupsForResourceTypeRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.filter = ""; + + /** + * FetchBackupsForResourceTypeRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.orderBy = ""; + + /** + * FetchBackupsForResourceTypeRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest + * @instance + */ + FetchBackupsForResourceTypeRequest.prototype.view = 0; + + /** + * Creates a new FetchBackupsForResourceTypeRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest instance */ - GetBackupVaultRequest.create = function create(properties) { - return new GetBackupVaultRequest(properties); + FetchBackupsForResourceTypeRequest.create = function create(properties) { + return new FetchBackupsForResourceTypeRequest(properties); }; /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * Encodes the specified FetchBackupsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupVaultRequest.encode = function encode(message, writer) { + FetchBackupsForResourceTypeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.view); return writer; }; /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * Encodes the specified FetchBackupsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + FetchBackupsForResourceTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupVaultRequest.decode = function decode(reader, length, error) { + FetchBackupsForResourceTypeRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 7: { message.view = reader.int32(); break; } @@ -23243,35 +23448,50 @@ }; /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + FetchBackupsForResourceTypeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupVaultRequest message. + * Verifies a FetchBackupsForResourceTypeRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupVaultRequest.verify = function verify(message) { + FetchBackupsForResourceTypeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.view != null && message.hasOwnProperty("view")) switch (message.view) { default: @@ -23285,19 +23505,29 @@ }; /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchBackupsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} FetchBackupsForResourceTypeRequest */ - GetBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + FetchBackupsForResourceTypeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest) return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); switch (object.view) { default: if (typeof object.view === "number") { @@ -23305,15 +23535,15 @@ break; } break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case "BACKUP_VIEW_UNSPECIFIED": case 0: message.view = 0; break; - case "BACKUP_VAULT_VIEW_BASIC": + case "BACKUP_VIEW_BASIC": case 1: message.view = 1; break; - case "BACKUP_VAULT_VIEW_FULL": + case "BACKUP_VIEW_FULL": case 2: message.view = 2; break; @@ -23322,81 +23552,93 @@ }; /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * Creates a plain object from a FetchBackupsForResourceTypeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static - * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest} message FetchBackupsForResourceTypeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupVaultRequest.toObject = function toObject(message, options) { + FetchBackupsForResourceTypeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + object.parent = ""; + object.resourceType = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this GetBackupVaultRequest to JSON. + * Converts this FetchBackupsForResourceTypeRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @instance * @returns {Object.} JSON object */ - GetBackupVaultRequest.prototype.toJSON = function toJSON() { + FetchBackupsForResourceTypeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupVaultRequest + * Gets the default type url for FetchBackupsForResourceTypeRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchBackupsForResourceTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest"; }; - return GetBackupVaultRequest; + return FetchBackupsForResourceTypeRequest; })(); - v1.UpdateBackupVaultRequest = (function() { + v1.FetchBackupsForResourceTypeResponse = (function() { /** - * Properties of an UpdateBackupVaultRequest. + * Properties of a FetchBackupsForResourceTypeResponse. * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupVaultRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault - * @property {string|null} [requestId] UpdateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly - * @property {boolean|null} [force] UpdateBackupVaultRequest force - * @property {boolean|null} [forceUpdateAccessRestriction] UpdateBackupVaultRequest forceUpdateAccessRestriction + * @interface IFetchBackupsForResourceTypeResponse + * @property {Array.|null} [backups] FetchBackupsForResourceTypeResponse backups + * @property {string|null} [nextPageToken] FetchBackupsForResourceTypeResponse nextPageToken */ /** - * Constructs a new UpdateBackupVaultRequest. + * Constructs a new FetchBackupsForResourceTypeResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupVaultRequest. - * @implements IUpdateBackupVaultRequest + * @classdesc Represents a FetchBackupsForResourceTypeResponse. + * @implements IFetchBackupsForResourceTypeResponse * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set */ - function UpdateBackupVaultRequest(properties) { + function FetchBackupsForResourceTypeResponse(properties) { + this.backups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23404,147 +23646,94 @@ } /** - * UpdateBackupVaultRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.updateMask = null; - - /** - * UpdateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.backupVault = null; - - /** - * UpdateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.requestId = ""; - - /** - * UpdateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.validateOnly = false; - - /** - * UpdateBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * FetchBackupsForResourceTypeResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @instance */ - UpdateBackupVaultRequest.prototype.force = false; + FetchBackupsForResourceTypeResponse.prototype.backups = $util.emptyArray; /** - * UpdateBackupVaultRequest forceUpdateAccessRestriction. - * @member {boolean} forceUpdateAccessRestriction - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * FetchBackupsForResourceTypeResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @instance */ - UpdateBackupVaultRequest.prototype.forceUpdateAccessRestriction = false; + FetchBackupsForResourceTypeResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * Creates a new FetchBackupsForResourceTypeResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse instance */ - UpdateBackupVaultRequest.create = function create(properties) { - return new UpdateBackupVaultRequest(properties); + FetchBackupsForResourceTypeResponse.create = function create(properties) { + return new FetchBackupsForResourceTypeResponse(properties); }; /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * Encodes the specified FetchBackupsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBackupVaultRequest.encode = function encode(message, writer) { + FetchBackupsForResourceTypeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - if (message.forceUpdateAccessRestriction != null && Object.hasOwnProperty.call(message, "forceUpdateAccessRestriction")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.forceUpdateAccessRestriction); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * Encodes the specified FetchBackupsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + FetchBackupsForResourceTypeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBackupVaultRequest.decode = function decode(reader, length, error) { + FetchBackupsForResourceTypeResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); break; } case 2: { - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - case 6: { - message.forceUpdateAccessRestriction = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -23556,179 +23745,149 @@ }; /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + FetchBackupsForResourceTypeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBackupVaultRequest message. + * Verifies a FetchBackupsForResourceTypeResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBackupVaultRequest.verify = function verify(message) { + FetchBackupsForResourceTypeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + error; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.forceUpdateAccessRestriction != null && message.hasOwnProperty("forceUpdateAccessRestriction")) - if (typeof message.forceUpdateAccessRestriction !== "boolean") - return "forceUpdateAccessRestriction: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchBackupsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @returns {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} FetchBackupsForResourceTypeResponse */ - UpdateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) + FetchBackupsForResourceTypeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse) return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + var message = new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.force != null) - message.force = Boolean(object.force); - if (object.forceUpdateAccessRestriction != null) - message.forceUpdateAccessRestriction = Boolean(object.forceUpdateAccessRestriction); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * Creates a plain object from a FetchBackupsForResourceTypeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static - * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse} message FetchBackupsForResourceTypeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBackupVaultRequest.toObject = function toObject(message, options) { + FetchBackupsForResourceTypeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupVault = null; - object.requestId = ""; - object.validateOnly = false; - object.force = false; - object.forceUpdateAccessRestriction = false; + if (options.arrays || options.defaults) + object.backups = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[j], options); } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.forceUpdateAccessRestriction != null && message.hasOwnProperty("forceUpdateAccessRestriction")) - object.forceUpdateAccessRestriction = message.forceUpdateAccessRestriction; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateBackupVaultRequest to JSON. + * Converts this FetchBackupsForResourceTypeResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @instance * @returns {Object.} JSON object */ - UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + FetchBackupsForResourceTypeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateBackupVaultRequest + * Gets the default type url for FetchBackupsForResourceTypeResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @memberof google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchBackupsForResourceTypeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse"; }; - return UpdateBackupVaultRequest; + return FetchBackupsForResourceTypeResponse; })(); - v1.DeleteBackupVaultRequest = (function() { + v1.GetBackupVaultRequest = (function() { /** - * Properties of a DeleteBackupVaultRequest. + * Properties of a GetBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupVaultRequest - * @property {string|null} [name] DeleteBackupVaultRequest name - * @property {string|null} [requestId] DeleteBackupVaultRequest requestId - * @property {boolean|null} [force] DeleteBackupVaultRequest force - * @property {string|null} [etag] DeleteBackupVaultRequest etag - * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing - * @property {boolean|null} [ignoreBackupPlanReferences] DeleteBackupVaultRequest ignoreBackupPlanReferences + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view */ /** - * Constructs a new DeleteBackupVaultRequest. + * Constructs a new GetBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupVaultRequest. - * @implements IDeleteBackupVaultRequest + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set */ - function DeleteBackupVaultRequest(properties) { + function GetBackupVaultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23736,130 +23895,80 @@ } /** - * DeleteBackupVaultRequest name. + * GetBackupVaultRequest name. * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.name = ""; - - /** - * DeleteBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.requestId = ""; - - /** - * DeleteBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.force = false; - - /** - * DeleteBackupVaultRequest etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.etag = ""; - - /** - * DeleteBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.validateOnly = false; - - /** - * DeleteBackupVaultRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @instance */ - DeleteBackupVaultRequest.prototype.allowMissing = false; + GetBackupVaultRequest.prototype.name = ""; /** - * DeleteBackupVaultRequest ignoreBackupPlanReferences. - * @member {boolean} ignoreBackupPlanReferences - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * GetBackupVaultRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @instance */ - DeleteBackupVaultRequest.prototype.ignoreBackupPlanReferences = false; + GetBackupVaultRequest.prototype.view = 0; /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * Creates a new GetBackupVaultRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance */ - DeleteBackupVaultRequest.create = function create(properties) { - return new DeleteBackupVaultRequest(properties); + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); }; /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupVaultRequest.encode = function encode(message, writer) { + GetBackupVaultRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); - if (message.ignoreBackupPlanReferences != null && Object.hasOwnProperty.call(message, "ignoreBackupPlanReferences")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.ignoreBackupPlanReferences); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupVaultRequest.decode = function decode(reader, length, error) { + GetBackupVaultRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -23870,27 +23979,7 @@ break; } case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } - case 4: { - message.etag = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.allowMissing = reader.bool(); - break; - } - case 7: { - message.ignoreBackupPlanReferences = reader.bool(); + message.view = reader.int32(); break; } default: @@ -23902,175 +23991,160 @@ }; /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBackupVaultRequest message. + * Verifies a GetBackupVaultRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBackupVaultRequest.verify = function verify(message) { + GetBackupVaultRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.ignoreBackupPlanReferences != null && message.hasOwnProperty("ignoreBackupPlanReferences")) - if (typeof message.ignoreBackupPlanReferences !== "boolean") - return "ignoreBackupPlanReferences: boolean expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - */ - DeleteBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); - if (object.etag != null) - message.etag = String(object.etag); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.ignoreBackupPlanReferences != null) - message.ignoreBackupPlanReferences = Boolean(object.ignoreBackupPlanReferences); + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } return message; }; /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupVaultRequest.toObject = function toObject(message, options) { + GetBackupVaultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.requestId = ""; - object.force = false; - object.etag = ""; - object.validateOnly = false; - object.allowMissing = false; - object.ignoreBackupPlanReferences = false; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.ignoreBackupPlanReferences != null && message.hasOwnProperty("ignoreBackupPlanReferences")) - object.ignoreBackupPlanReferences = message.ignoreBackupPlanReferences; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; return object; }; /** - * Converts this DeleteBackupVaultRequest to JSON. + * Converts this GetBackupVaultRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @instance * @returns {Object.} JSON object */ - DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + GetBackupVaultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBackupVaultRequest + * Gets the default type url for GetBackupVaultRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; }; - return DeleteBackupVaultRequest; + return GetBackupVaultRequest; })(); - v1.ListDataSourcesRequest = (function() { + v1.UpdateBackupVaultRequest = (function() { /** - * Properties of a ListDataSourcesRequest. + * Properties of an UpdateBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesRequest - * @property {string|null} [parent] ListDataSourcesRequest parent - * @property {number|null} [pageSize] ListDataSourcesRequest pageSize - * @property {string|null} [pageToken] ListDataSourcesRequest pageToken - * @property {string|null} [filter] ListDataSourcesRequest filter - * @property {string|null} [orderBy] ListDataSourcesRequest orderBy + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + * @property {string|null} [requestId] UpdateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly + * @property {boolean|null} [force] UpdateBackupVaultRequest force + * @property {boolean|null} [forceUpdateAccessRestriction] UpdateBackupVaultRequest forceUpdateAccessRestriction */ /** - * Constructs a new ListDataSourcesRequest. + * Constructs a new UpdateBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesRequest. - * @implements IListDataSourcesRequest + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set */ - function ListDataSourcesRequest(properties) { + function UpdateBackupVaultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24078,133 +24152,147 @@ } /** - * ListDataSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance */ - ListDataSourcesRequest.prototype.parent = ""; + UpdateBackupVaultRequest.prototype.updateMask = null; /** - * ListDataSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance */ - ListDataSourcesRequest.prototype.pageSize = 0; + UpdateBackupVaultRequest.prototype.backupVault = null; /** - * ListDataSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * UpdateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance */ - ListDataSourcesRequest.prototype.pageToken = ""; + UpdateBackupVaultRequest.prototype.requestId = ""; /** - * ListDataSourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * UpdateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance */ - ListDataSourcesRequest.prototype.filter = ""; + UpdateBackupVaultRequest.prototype.validateOnly = false; /** - * ListDataSourcesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * UpdateBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance */ - ListDataSourcesRequest.prototype.orderBy = ""; + UpdateBackupVaultRequest.prototype.force = false; /** - * Creates a new ListDataSourcesRequest instance using the specified properties. + * UpdateBackupVaultRequest forceUpdateAccessRestriction. + * @member {boolean} forceUpdateAccessRestriction + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.forceUpdateAccessRestriction = false; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance */ - ListDataSourcesRequest.create = function create(properties) { - return new ListDataSourcesRequest(properties); + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); }; /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDataSourcesRequest.encode = function encode(message, writer) { + UpdateBackupVaultRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + if (message.forceUpdateAccessRestriction != null && Object.hasOwnProperty.call(message, "forceUpdateAccessRestriction")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.forceUpdateAccessRestriction); return writer; }; /** - * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDataSourcesRequest.decode = function decode(reader, length, error) { + UpdateBackupVaultRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.requestId = reader.string(); break; } case 4: { - message.filter = reader.string(); + message.validateOnly = reader.bool(); break; } case 5: { - message.orderBy = reader.string(); + message.force = reader.bool(); + break; + } + case 6: { + message.forceUpdateAccessRestriction = reader.bool(); break; } default: @@ -24216,159 +24304,179 @@ }; /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDataSourcesRequest message. + * Verifies an UpdateBackupVaultRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.forceUpdateAccessRestriction != null && message.hasOwnProperty("forceUpdateAccessRestriction")) + if (typeof message.forceUpdateAccessRestriction !== "boolean") + return "forceUpdateAccessRestriction: boolean expected"; return null; }; /** - * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest */ - ListDataSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.force != null) + message.force = Boolean(object.force); + if (object.forceUpdateAccessRestriction != null) + message.forceUpdateAccessRestriction = Boolean(object.forceUpdateAccessRestriction); return message; }; /** - * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDataSourcesRequest.toObject = function toObject(message, options) { + UpdateBackupVaultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.updateMask = null; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; + object.force = false; + object.forceUpdateAccessRestriction = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.forceUpdateAccessRestriction != null && message.hasOwnProperty("forceUpdateAccessRestriction")) + object.forceUpdateAccessRestriction = message.forceUpdateAccessRestriction; return object; }; /** - * Converts this ListDataSourcesRequest to JSON. + * Converts this UpdateBackupVaultRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @instance * @returns {Object.} JSON object */ - ListDataSourcesRequest.prototype.toJSON = function toJSON() { + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDataSourcesRequest + * Gets the default type url for UpdateBackupVaultRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; }; - return ListDataSourcesRequest; + return UpdateBackupVaultRequest; })(); - v1.ListDataSourcesResponse = (function() { + v1.DeleteBackupVaultRequest = (function() { /** - * Properties of a ListDataSourcesResponse. + * Properties of a DeleteBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesResponse - * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources - * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken - * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + * @property {string|null} [requestId] DeleteBackupVaultRequest requestId + * @property {boolean|null} [force] DeleteBackupVaultRequest force + * @property {string|null} [etag] DeleteBackupVaultRequest etag + * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing + * @property {boolean|null} [ignoreBackupPlanReferences] DeleteBackupVaultRequest ignoreBackupPlanReferences */ /** - * Constructs a new ListDataSourcesResponse. + * Constructs a new DeleteBackupVaultRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesResponse. - * @implements IListDataSourcesResponse + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set */ - function ListDataSourcesResponse(properties) { - this.dataSources = []; - this.unreachable = []; + function DeleteBackupVaultRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24376,111 +24484,161 @@ } /** - * ListDataSourcesResponse dataSources. - * @member {Array.} dataSources - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @instance */ - ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + DeleteBackupVaultRequest.prototype.name = ""; /** - * ListDataSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * DeleteBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @instance */ - ListDataSourcesResponse.prototype.nextPageToken = ""; + DeleteBackupVaultRequest.prototype.requestId = ""; /** - * ListDataSourcesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * DeleteBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @instance */ - ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; + DeleteBackupVaultRequest.prototype.force = false; /** - * Creates a new ListDataSourcesResponse instance using the specified properties. + * DeleteBackupVaultRequest etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.etag = ""; + + /** + * DeleteBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.validateOnly = false; + + /** + * DeleteBackupVaultRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.allowMissing = false; + + /** + * DeleteBackupVaultRequest ignoreBackupPlanReferences. + * @member {boolean} ignoreBackupPlanReferences + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.ignoreBackupPlanReferences = false; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance */ - ListDataSourcesResponse.create = function create(properties) { - return new ListDataSourcesResponse(properties); + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); }; /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDataSourcesResponse.encode = function encode(message, writer) { + DeleteBackupVaultRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSources != null && message.dataSources.length) - for (var i = 0; i < message.dataSources.length; ++i) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); + if (message.ignoreBackupPlanReferences != null && Object.hasOwnProperty.call(message, "ignoreBackupPlanReferences")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.ignoreBackupPlanReferences); return writer; }; /** - * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDataSourcesResponse.decode = function decode(reader, length, error) { + DeleteBackupVaultRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.dataSources && message.dataSources.length)) - message.dataSources = []; - message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.requestId = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.force = reader.bool(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.allowMissing = reader.bool(); + break; + } + case 7: { + message.ignoreBackupPlanReferences = reader.bool(); break; } default: @@ -24492,247 +24650,309 @@ }; /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDataSourcesResponse message. + * Verifies a DeleteBackupVaultRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDataSourcesResponse.verify = function verify(message) { + DeleteBackupVaultRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSources != null && message.hasOwnProperty("dataSources")) { - if (!Array.isArray(message.dataSources)) - return "dataSources: array expected"; - for (var i = 0; i < message.dataSources.length; ++i) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); - if (error) - return "dataSources." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.ignoreBackupPlanReferences != null && message.hasOwnProperty("ignoreBackupPlanReferences")) + if (typeof message.ignoreBackupPlanReferences !== "boolean") + return "ignoreBackupPlanReferences: boolean expected"; return null; }; /** - * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest */ - ListDataSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); - if (object.dataSources) { - if (!Array.isArray(object.dataSources)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); - message.dataSources = []; - for (var i = 0; i < object.dataSources.length; ++i) { - if (typeof object.dataSources[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); - message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.ignoreBackupPlanReferences != null) + message.ignoreBackupPlanReferences = Boolean(object.ignoreBackupPlanReferences); return message; }; /** - * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDataSourcesResponse.toObject = function toObject(message, options) { + DeleteBackupVaultRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dataSources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataSources && message.dataSources.length) { - object.dataSources = []; - for (var j = 0; j < message.dataSources.length; ++j) - object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.etag = ""; + object.validateOnly = false; + object.allowMissing = false; + object.ignoreBackupPlanReferences = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.ignoreBackupPlanReferences != null && message.hasOwnProperty("ignoreBackupPlanReferences")) + object.ignoreBackupPlanReferences = message.ignoreBackupPlanReferences; return object; }; /** - * Converts this ListDataSourcesResponse to JSON. + * Converts this DeleteBackupVaultRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @instance * @returns {Object.} JSON object */ - ListDataSourcesResponse.prototype.toJSON = function toJSON() { + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDataSourcesResponse + * Gets the default type url for DeleteBackupVaultRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; }; - return ListDataSourcesResponse; + return DeleteBackupVaultRequest; })(); - v1.GetDataSourceRequest = (function() { + v1.ListDataSourcesRequest = (function() { /** - * Properties of a GetDataSourceRequest. + * Properties of a ListDataSourcesRequest. * @memberof google.cloud.backupdr.v1 - * @interface IGetDataSourceRequest - * @property {string|null} [name] GetDataSourceRequest name + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {string|null} [filter] ListDataSourcesRequest filter + * @property {string|null} [orderBy] ListDataSourcesRequest orderBy */ /** - * Constructs a new GetDataSourceRequest. + * Constructs a new ListDataSourcesRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetDataSourceRequest. - * @implements IGetDataSourceRequest + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest * @constructor - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(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]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance */ - function GetDataSourceRequest(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]]; - } + ListDataSourcesRequest.prototype.filter = ""; /** - * GetDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * ListDataSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @instance */ - GetDataSourceRequest.prototype.name = ""; + ListDataSourcesRequest.prototype.orderBy = ""; /** - * Creates a new GetDataSourceRequest instance using the specified properties. + * Creates a new ListDataSourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance */ - GetDataSourceRequest.create = function create(properties) { - return new GetDataSourceRequest(properties); + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); }; /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDataSourceRequest.encode = function encode(message, writer) { + ListDataSourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDataSourceRequest.decode = function decode(reader, length, error) { + ListDataSourcesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -24744,125 +24964,159 @@ }; /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDataSourceRequest message. + * Verifies a ListDataSourcesRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDataSourceRequest.verify = function verify(message) { + ListDataSourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest */ - GetDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) return object; - var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static - * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDataSourceRequest.toObject = function toObject(message, options) { + ListDataSourcesRequest.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; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetDataSourceRequest to JSON. + * Converts this ListDataSourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @instance * @returns {Object.} JSON object */ - GetDataSourceRequest.prototype.toJSON = function toJSON() { + ListDataSourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDataSourceRequest + * Gets the default type url for ListDataSourcesRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; }; - return GetDataSourceRequest; + return ListDataSourcesRequest; })(); - v1.UpdateDataSourceRequest = (function() { + v1.ListDataSourcesResponse = (function() { /** - * Properties of an UpdateDataSourceRequest. + * Properties of a ListDataSourcesResponse. * @memberof google.cloud.backupdr.v1 - * @interface IUpdateDataSourceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask - * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource - * @property {string|null} [requestId] UpdateDataSourceRequest requestId - * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable */ /** - * Constructs a new UpdateDataSourceRequest. + * Constructs a new ListDataSourcesResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateDataSourceRequest. - * @implements IUpdateDataSourceRequest + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse * @constructor - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set */ - function UpdateDataSourceRequest(properties) { + function ListDataSourcesResponse(properties) { + this.dataSources = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24870,119 +25124,111 @@ } /** - * UpdateDataSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.updateMask = null; - - /** - * UpdateDataSourceRequest dataSource. - * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @instance */ - UpdateDataSourceRequest.prototype.dataSource = null; + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; /** - * UpdateDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @instance */ - UpdateDataSourceRequest.prototype.requestId = ""; + ListDataSourcesResponse.prototype.nextPageToken = ""; /** - * UpdateDataSourceRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * ListDataSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @instance */ - UpdateDataSourceRequest.prototype.allowMissing = false; + ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. + * Creates a new ListDataSourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance */ - UpdateDataSourceRequest.create = function create(properties) { - return new UpdateDataSourceRequest(properties); + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); }; /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDataSourceRequest.encode = function encode(message, writer) { + ListDataSourcesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDataSourceRequest.decode = function decode(reader, length, error) { + ListDataSourcesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32())); break; } case 2: { - message.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -24994,310 +25240,247 @@ }; /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDataSourceRequest message. + * Verifies a ListDataSourcesResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDataSourceRequest.verify = function verify(message) { + ListDataSourcesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + error; + } } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; return null; }; /** - * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse */ - UpdateDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) return object; - var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); + } } - if (object.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); - message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); return message; }; /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static - * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDataSourceRequest.toObject = function toObject(message, options) { + ListDataSourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataSource = null; - object.requestId = ""; - object.allowMissing = false; + if (options.arrays || options.defaults) { + object.dataSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; return object; }; /** - * Converts this UpdateDataSourceRequest to JSON. + * Converts this ListDataSourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @instance * @returns {Object.} JSON object */ - UpdateDataSourceRequest.prototype.toJSON = function toJSON() { + ListDataSourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateDataSourceRequest + * Gets the default type url for ListDataSourcesResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; }; - return UpdateDataSourceRequest; + return ListDataSourcesResponse; })(); - v1.ListBackupsRequest = (function() { - - /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view - */ + v1.GetDataSourceRequest = (function() { /** - * Constructs a new ListBackupsRequest. + * Properties of a GetDataSourceRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - */ - function ListBackupsRequest(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]]; - } - - /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name */ - ListBackupsRequest.prototype.filter = ""; /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set */ - ListBackupsRequest.prototype.orderBy = ""; + function GetDataSourceRequest(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]]; + } /** - * ListBackupsRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @instance */ - ListBackupsRequest.prototype.view = 0; + GetDataSourceRequest.prototype.name = ""; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new GetDataSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); }; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + GetDataSourceRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a GetDataSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decode = function decode(reader, length, error) { + GetDataSourceRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.view = reader.int32(); + message.name = reader.string(); break; } default: @@ -25309,191 +25492,125 @@ }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsRequest message. + * Verifies a GetDataSourceRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsRequest.verify = function verify(message) { + GetDataSourceRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } + var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + GetDataSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this GetDataSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @instance * @returns {Object.} JSON object */ - ListBackupsRequest.prototype.toJSON = function toJSON() { + GetDataSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for GetDataSourceRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; }; - return ListBackupsRequest; + return GetDataSourceRequest; })(); - v1.ListBackupsResponse = (function() { + v1.UpdateDataSourceRequest = (function() { /** - * Properties of a ListBackupsResponse. + * Properties of an UpdateDataSourceRequest. * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + * @interface IUpdateDataSourceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask + * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource + * @property {string|null} [requestId] UpdateDataSourceRequest requestId + * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing */ /** - * Constructs a new ListBackupsResponse. + * Constructs a new UpdateDataSourceRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse + * @classdesc Represents an UpdateDataSourceRequest. + * @implements IUpdateDataSourceRequest * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + */ + function UpdateDataSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25501,111 +25618,119 @@ } /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * UpdateDataSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @instance */ - ListBackupsResponse.prototype.backups = $util.emptyArray; + UpdateDataSourceRequest.prototype.updateMask = null; /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * UpdateDataSourceRequest dataSource. + * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @instance */ - ListBackupsResponse.prototype.nextPageToken = ""; + UpdateDataSourceRequest.prototype.dataSource = null; /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * UpdateDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @instance */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; + UpdateDataSourceRequest.prototype.requestId = ""; /** - * Creates a new ListBackupsResponse instance using the specified properties. + * UpdateDataSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); + UpdateDataSourceRequest.create = function create(properties) { + return new UpdateDataSourceRequest(properties); }; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encode = function encode(message, writer) { + UpdateDataSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); return writer; }; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decode = function decode(reader, length, error) { + UpdateDataSourceRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); break; } default: @@ -25617,170 +25742,162 @@ }; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsResponse message. + * Verifies an UpdateDataSourceRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsResponse.verify = function verify(message) { + UpdateDataSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; return null; }; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) + UpdateDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); - } + var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); return message; }; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static - * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse + * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsResponse.toObject = function toObject(message, options) { + UpdateDataSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.updateMask = null; + object.dataSource = null; + object.requestId = ""; + object.allowMissing = false; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; return object; }; /** - * Converts this ListBackupsResponse to JSON. + * Converts this UpdateDataSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @instance * @returns {Object.} JSON object */ - ListBackupsResponse.prototype.toJSON = function toJSON() { + UpdateDataSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsResponse + * Gets the default type url for UpdateDataSourceRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; }; - return ListBackupsResponse; + return UpdateDataSourceRequest; })(); - v1.GetBackupRequest = (function() { + v1.ListBackupsRequest = (function() { /** - * Properties of a GetBackupRequest. + * Properties of a ListBackupsRequest. * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view */ /** - * Constructs a new GetBackupRequest. + * Constructs a new ListBackupsRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set */ - function GetBackupRequest(properties) { + function ListBackupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25788,90 +25905,146 @@ } /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance */ - GetBackupRequest.prototype.name = ""; + ListBackupsRequest.prototype.parent = ""; /** - * GetBackupRequest view. + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance */ - GetBackupRequest.prototype.view = 0; + ListBackupsRequest.prototype.view = 0; /** - * Creates a new GetBackupRequest instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); }; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + ListBackupsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); return writer; }; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decode = function decode(reader, length, error) { + ListBackupsRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { message.view = reader.int32(); break; } @@ -25884,35 +26057,47 @@ }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBackupRequest message. + * Verifies a ListBackupsRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBackupRequest.verify = function verify(message) { + ListBackupsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.view != null && message.hasOwnProperty("view")) switch (message.view) { default: @@ -25926,19 +26111,27 @@ }; /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); switch (object.view) { default: if (typeof object.view === "number") { @@ -25963,78 +26156,92 @@ }; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + ListBackupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; if (message.view != null && message.hasOwnProperty("view")) object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this GetBackupRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance * @returns {Object.} JSON object */ - GetBackupRequest.prototype.toJSON = function toJSON() { + ListBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for ListBackupsRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; }; - return GetBackupRequest; + return ListBackupsRequest; })(); - v1.UpdateBackupRequest = (function() { + v1.ListBackupsResponse = (function() { /** - * Properties of an UpdateBackupRequest. + * Properties of a ListBackupsResponse. * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup - * @property {string|null} [requestId] UpdateBackupRequest requestId + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable */ /** - * Constructs a new UpdateBackupRequest. + * Constructs a new ListBackupsResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set */ - function UpdateBackupRequest(properties) { + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26042,105 +26249,111 @@ } /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - UpdateBackupRequest.prototype.updateMask = null; + ListBackupsResponse.prototype.backups = $util.emptyArray; /** - * UpdateBackupRequest backup. - * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - UpdateBackupRequest.prototype.backup = null; + ListBackupsResponse.prototype.nextPageToken = ""; /** - * UpdateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - UpdateBackupRequest.prototype.requestId = ""; + ListBackupsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateBackupRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); }; /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBackupRequest.encode = function encode(message, writer) { + ListBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.backupdr.v1.Backup.encode(message.backup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBackupRequest.decode = function decode(reader, length, error) { + ListBackupsResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); break; } case 2: { - message.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -26152,150 +26365,170 @@ }; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBackupRequest message. + * Verifies a ListBackupsResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBackupRequest.verify = function verify(message) { + ListBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; + } } - if (message.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBackupRequest.toObject = function toObject(message, options) { + ListBackupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this UpdateBackupRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance * @returns {Object.} JSON object */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { + ListBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateBackupRequest + * Gets the default type url for ListBackupsResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; }; - return UpdateBackupRequest; + return ListBackupsResponse; })(); - v1.DeleteBackupRequest = (function() { + v1.GetBackupRequest = (function() { /** - * Properties of a DeleteBackupRequest. + * Properties of a GetBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view */ /** - * Constructs a new DeleteBackupRequest. + * Constructs a new GetBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set */ - function DeleteBackupRequest(properties) { + function GetBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26303,80 +26536,80 @@ } /** - * DeleteBackupRequest name. + * GetBackupRequest name. * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @instance */ - DeleteBackupRequest.prototype.name = ""; + GetBackupRequest.prototype.name = ""; /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @instance */ - DeleteBackupRequest.prototype.requestId = ""; + GetBackupRequest.prototype.view = 0; /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); }; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encode = function encode(message, writer) { + GetBackupRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decode = function decode(reader, length, error) { + GetBackupRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -26387,7 +26620,7 @@ break; } case 2: { - message.requestId = reader.string(); + message.view = reader.int32(); break; } default: @@ -26399,138 +26632,157 @@ }; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBackupRequest message. + * Verifies a GetBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBackupRequest.verify = function verify(message) { + GetBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } return message; }; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBackupRequest.toObject = function toObject(message, options) { + GetBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.requestId = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this GetBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @instance * @returns {Object.} JSON object */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { + GetBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for GetBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; }; - return DeleteBackupRequest; + return GetBackupRequest; })(); - v1.RestoreBackupRequest = (function() { + v1.UpdateBackupRequest = (function() { /** - * Properties of a RestoreBackupRequest. + * Properties of an UpdateBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupRequest - * @property {string|null} [name] RestoreBackupRequest name - * @property {string|null} [requestId] RestoreBackupRequest requestId - * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment - * @property {google.cloud.backupdr.v1.IDiskTargetEnvironment|null} [diskTargetEnvironment] RestoreBackupRequest diskTargetEnvironment - * @property {google.cloud.backupdr.v1.IRegionDiskTargetEnvironment|null} [regionDiskTargetEnvironment] RestoreBackupRequest regionDiskTargetEnvironment - * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties - * @property {google.cloud.backupdr.v1.IDiskRestoreProperties|null} [diskRestoreProperties] RestoreBackupRequest diskRestoreProperties - * @property {google.protobuf.IFieldMask|null} [clearOverridesFieldMask] RestoreBackupRequest clearOverridesFieldMask + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId */ /** - * Constructs a new RestoreBackupRequest. + * Constructs a new UpdateBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupRequest. - * @implements IRestoreBackupRequest + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set */ - function RestoreBackupRequest(properties) { + function UpdateBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26538,206 +26790,105 @@ } /** - * RestoreBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.name = ""; - - /** - * RestoreBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.requestId = ""; - - /** - * RestoreBackupRequest computeInstanceTargetEnvironment. - * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; - - /** - * RestoreBackupRequest diskTargetEnvironment. - * @member {google.cloud.backupdr.v1.IDiskTargetEnvironment|null|undefined} diskTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.diskTargetEnvironment = null; - - /** - * RestoreBackupRequest regionDiskTargetEnvironment. - * @member {google.cloud.backupdr.v1.IRegionDiskTargetEnvironment|null|undefined} regionDiskTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.regionDiskTargetEnvironment = null; - - /** - * RestoreBackupRequest computeInstanceRestoreProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; - - /** - * RestoreBackupRequest diskRestoreProperties. - * @member {google.cloud.backupdr.v1.IDiskRestoreProperties|null|undefined} diskRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.diskRestoreProperties = null; - - /** - * RestoreBackupRequest clearOverridesFieldMask. - * @member {google.protobuf.IFieldMask|null|undefined} clearOverridesFieldMask - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - RestoreBackupRequest.prototype.clearOverridesFieldMask = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateBackupRequest.prototype.updateMask = null; /** - * RestoreBackupRequest targetEnvironment. - * @member {"computeInstanceTargetEnvironment"|"diskTargetEnvironment"|"regionDiskTargetEnvironment"|undefined} targetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment", "diskTargetEnvironment", "regionDiskTargetEnvironment"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateBackupRequest.prototype.backup = null; /** - * RestoreBackupRequest instanceProperties. - * @member {"computeInstanceRestoreProperties"|"diskRestoreProperties"|undefined} instanceProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties", "diskRestoreProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(RestoreBackupRequest.prototype, "_clearOverridesFieldMask", { - get: $util.oneOfGetter($oneOfFields = ["clearOverridesFieldMask"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateBackupRequest.prototype.requestId = ""; /** - * Creates a new RestoreBackupRequest instance using the specified properties. + * Creates a new UpdateBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance - */ - RestoreBackupRequest.create = function create(properties) { - return new RestoreBackupRequest(properties); + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); }; /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupRequest.encode = function encode(message, writer) { + UpdateBackupRequest.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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) - $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.diskTargetEnvironment != null && Object.hasOwnProperty.call(message, "diskTargetEnvironment")) - $root.google.cloud.backupdr.v1.DiskTargetEnvironment.encode(message.diskTargetEnvironment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.regionDiskTargetEnvironment != null && Object.hasOwnProperty.call(message, "regionDiskTargetEnvironment")) - $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.encode(message.regionDiskTargetEnvironment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.diskRestoreProperties != null && Object.hasOwnProperty.call(message, "diskRestoreProperties")) - $root.google.cloud.backupdr.v1.DiskRestoreProperties.encode(message.diskRestoreProperties, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.clearOverridesFieldMask != null && Object.hasOwnProperty.call(message, "clearOverridesFieldMask")) - $root.google.protobuf.FieldMask.encode(message.clearOverridesFieldMask, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * Decodes an UpdateBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupRequest.decode = function decode(reader, length, error) { + UpdateBackupRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.requestId = reader.string(); + message.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); break; } case 3: { - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 5: { - message.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 6: { - message.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); - break; - } - case 7: { - message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.decode(reader, reader.uint32()); - break; - } - case 8: { - message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.requestId = reader.string(); break; } default: @@ -26749,246 +26900,150 @@ }; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreBackupRequest message. + * Verifies an UpdateBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreBackupRequest.verify = function verify(message) { + UpdateBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); - if (error) - return "computeInstanceTargetEnvironment." + error; - } - } - if (message.diskTargetEnvironment != null && message.hasOwnProperty("diskTargetEnvironment")) { - if (properties.targetEnvironment === 1) - return "targetEnvironment: multiple values"; - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.verify(message.diskTargetEnvironment); - if (error) - return "diskTargetEnvironment." + error; - } - } - if (message.regionDiskTargetEnvironment != null && message.hasOwnProperty("regionDiskTargetEnvironment")) { - if (properties.targetEnvironment === 1) - return "targetEnvironment: multiple values"; - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.verify(message.regionDiskTargetEnvironment); - if (error) - return "regionDiskTargetEnvironment." + error; - } - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - properties.instanceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); - if (error) - return "computeInstanceRestoreProperties." + error; - } - } - if (message.diskRestoreProperties != null && message.hasOwnProperty("diskRestoreProperties")) { - if (properties.instanceProperties === 1) - return "instanceProperties: multiple values"; - properties.instanceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.DiskRestoreProperties.verify(message.diskRestoreProperties); - if (error) - return "diskRestoreProperties." + error; - } - } - if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { - properties._clearOverridesFieldMask = 1; - { - var error = $root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask); - if (error) - return "clearOverridesFieldMask." + error; - } - } return null; }; /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest */ - RestoreBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.computeInstanceTargetEnvironment != null) { - if (typeof object.computeInstanceTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); - } - if (object.diskTargetEnvironment != null) { - if (typeof object.diskTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.diskTargetEnvironment: object expected"); - message.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.fromObject(object.diskTargetEnvironment); - } - if (object.regionDiskTargetEnvironment != null) { - if (typeof object.regionDiskTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.regionDiskTargetEnvironment: object expected"); - message.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.fromObject(object.regionDiskTargetEnvironment); - } - if (object.computeInstanceRestoreProperties != null) { - if (typeof object.computeInstanceRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); - } - if (object.diskRestoreProperties != null) { - if (typeof object.diskRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.diskRestoreProperties: object expected"); - message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.fromObject(object.diskRestoreProperties); + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.clearOverridesFieldMask != null) { - if (typeof object.clearOverridesFieldMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.clearOverridesFieldMask: object expected"); - message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.fromObject(object.clearOverridesFieldMask); + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreBackupRequest.toObject = function toObject(message, options) { + UpdateBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "computeInstanceTargetEnvironment"; - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "computeInstanceRestoreProperties"; - } - if (message.diskTargetEnvironment != null && message.hasOwnProperty("diskTargetEnvironment")) { - object.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.toObject(message.diskTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "diskTargetEnvironment"; - } - if (message.regionDiskTargetEnvironment != null && message.hasOwnProperty("regionDiskTargetEnvironment")) { - object.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.toObject(message.regionDiskTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "regionDiskTargetEnvironment"; - } - if (message.diskRestoreProperties != null && message.hasOwnProperty("diskRestoreProperties")) { - object.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.toObject(message.diskRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "diskRestoreProperties"; - } - if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { - object.clearOverridesFieldMask = $root.google.protobuf.FieldMask.toObject(message.clearOverridesFieldMask, options); - if (options.oneofs) - object._clearOverridesFieldMask = "clearOverridesFieldMask"; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this RestoreBackupRequest to JSON. + * Converts this UpdateBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance * @returns {Object.} JSON object */ - RestoreBackupRequest.prototype.toJSON = function toJSON() { + UpdateBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreBackupRequest + * Gets the default type url for UpdateBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; }; - return RestoreBackupRequest; + return UpdateBackupRequest; })(); - v1.RestoreBackupResponse = (function() { + v1.DeleteBackupRequest = (function() { /** - * Properties of a RestoreBackupResponse. + * Properties of a DeleteBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupResponse - * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId */ /** - * Constructs a new RestoreBackupResponse. + * Constructs a new DeleteBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupResponse. - * @implements IRestoreBackupResponse + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set */ - function RestoreBackupResponse(properties) { + function DeleteBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26996,77 +27051,91 @@ } /** - * RestoreBackupResponse targetResource. - * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @instance */ - RestoreBackupResponse.prototype.targetResource = null; + DeleteBackupRequest.prototype.name = ""; /** - * Creates a new RestoreBackupResponse instance using the specified properties. + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance */ - RestoreBackupResponse.create = function create(properties) { - return new RestoreBackupResponse(properties); + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); }; /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupResponse.encode = function encode(message, writer) { + DeleteBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, 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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupResponse.decode = function decode(reader, length, error) { + DeleteBackupRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); break; } default: @@ -27078,219 +27147,345 @@ }; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreBackupResponse message. + * Verifies a DeleteBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreBackupResponse.verify = function verify(message) { + DeleteBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) { - var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); - if (error) - return "targetResource." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest */ - RestoreBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); - if (object.targetResource != null) { - if (typeof object.targetResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); - } + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreBackupResponse.toObject = function toObject(message, options) { + DeleteBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.targetResource = null; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this RestoreBackupResponse to JSON. + * Converts this DeleteBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @instance * @returns {Object.} JSON object */ - RestoreBackupResponse.prototype.toJSON = function toJSON() { + DeleteBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreBackupResponse + * Gets the default type url for DeleteBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; }; - return RestoreBackupResponse; + return DeleteBackupRequest; })(); - v1.TargetResource = (function() { + v1.RestoreBackupRequest = (function() { + + /** + * Properties of a RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IDiskTargetEnvironment|null} [diskTargetEnvironment] RestoreBackupRequest diskTargetEnvironment + * @property {google.cloud.backupdr.v1.IRegionDiskTargetEnvironment|null} [regionDiskTargetEnvironment] RestoreBackupRequest regionDiskTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + * @property {google.cloud.backupdr.v1.IDiskRestoreProperties|null} [diskRestoreProperties] RestoreBackupRequest diskRestoreProperties + * @property {google.protobuf.IFieldMask|null} [clearOverridesFieldMask] RestoreBackupRequest clearOverridesFieldMask + */ + + /** + * Constructs a new RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + */ + function RestoreBackupRequest(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]]; + } + + /** + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.name = ""; + + /** + * RestoreBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest diskTargetEnvironment. + * @member {google.cloud.backupdr.v1.IDiskTargetEnvironment|null|undefined} diskTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.diskTargetEnvironment = null; + + /** + * RestoreBackupRequest regionDiskTargetEnvironment. + * @member {google.cloud.backupdr.v1.IRegionDiskTargetEnvironment|null|undefined} regionDiskTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.regionDiskTargetEnvironment = null; /** - * Properties of a TargetResource. - * @memberof google.cloud.backupdr.v1 - * @interface ITargetResource - * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; /** - * Constructs a new TargetResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TargetResource. - * @implements ITargetResource - * @constructor - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * RestoreBackupRequest diskRestoreProperties. + * @member {google.cloud.backupdr.v1.IDiskRestoreProperties|null|undefined} diskRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance */ - function TargetResource(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]]; - } + RestoreBackupRequest.prototype.diskRestoreProperties = null; /** - * TargetResource gcpResource. - * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.TargetResource + * RestoreBackupRequest clearOverridesFieldMask. + * @member {google.protobuf.IFieldMask|null|undefined} clearOverridesFieldMask + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance */ - TargetResource.prototype.gcpResource = null; + RestoreBackupRequest.prototype.clearOverridesFieldMask = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * TargetResource targetResourceInfo. - * @member {"gcpResource"|undefined} targetResourceInfo - * @memberof google.cloud.backupdr.v1.TargetResource + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|"diskTargetEnvironment"|"regionDiskTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance */ - Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment", "diskTargetEnvironment", "regionDiskTargetEnvironment"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new TargetResource instance using the specified properties. + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|"diskRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties", "diskRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RestoreBackupRequest.prototype, "_clearOverridesFieldMask", { + get: $util.oneOfGetter($oneOfFields = ["clearOverridesFieldMask"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance */ - TargetResource.create = function create(properties) { - return new TargetResource(properties); + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); }; /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetResource.encode = function encode(message, writer) { + RestoreBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, 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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.diskTargetEnvironment != null && Object.hasOwnProperty.call(message, "diskTargetEnvironment")) + $root.google.cloud.backupdr.v1.DiskTargetEnvironment.encode(message.diskTargetEnvironment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.regionDiskTargetEnvironment != null && Object.hasOwnProperty.call(message, "regionDiskTargetEnvironment")) + $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.encode(message.regionDiskTargetEnvironment, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.diskRestoreProperties != null && Object.hasOwnProperty.call(message, "diskRestoreProperties")) + $root.google.cloud.backupdr.v1.DiskRestoreProperties.encode(message.diskRestoreProperties, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.clearOverridesFieldMask != null && Object.hasOwnProperty.call(message, "clearOverridesFieldMask")) + $root.google.protobuf.FieldMask.encode(message.clearOverridesFieldMask, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetResource message from the specified reader or buffer. + * Decodes a RestoreBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetResource.decode = function decode(reader, length, error) { + RestoreBackupRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.TargetResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 5: { + message.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 6: { + message.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } + case 7: { + message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.decode(reader, reader.uint32()); + break; + } + case 8: { + message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -27302,134 +27497,246 @@ }; /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetResource.decodeDelimited = function decodeDelimited(reader) { + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetResource message. + * Verifies a RestoreBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetResource.verify = function verify(message) { + RestoreBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.targetResourceInfo = 1; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; { - var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); if (error) - return "gcpResource." + error; + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.diskTargetEnvironment != null && message.hasOwnProperty("diskTargetEnvironment")) { + if (properties.targetEnvironment === 1) + return "targetEnvironment: multiple values"; + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.verify(message.diskTargetEnvironment); + if (error) + return "diskTargetEnvironment." + error; + } + } + if (message.regionDiskTargetEnvironment != null && message.hasOwnProperty("regionDiskTargetEnvironment")) { + if (properties.targetEnvironment === 1) + return "targetEnvironment: multiple values"; + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.verify(message.regionDiskTargetEnvironment); + if (error) + return "regionDiskTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + if (message.diskRestoreProperties != null && message.hasOwnProperty("diskRestoreProperties")) { + if (properties.instanceProperties === 1) + return "instanceProperties: multiple values"; + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.DiskRestoreProperties.verify(message.diskRestoreProperties); + if (error) + return "diskRestoreProperties." + error; + } + } + if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { + properties._clearOverridesFieldMask = 1; + { + var error = $root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask); + if (error) + return "clearOverridesFieldMask." + error; } } return null; }; /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest */ - TargetResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.TargetResource(); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.diskTargetEnvironment != null) { + if (typeof object.diskTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.diskTargetEnvironment: object expected"); + message.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.fromObject(object.diskTargetEnvironment); + } + if (object.regionDiskTargetEnvironment != null) { + if (typeof object.regionDiskTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.regionDiskTargetEnvironment: object expected"); + message.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.fromObject(object.regionDiskTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } + if (object.diskRestoreProperties != null) { + if (typeof object.diskRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.diskRestoreProperties: object expected"); + message.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.fromObject(object.diskRestoreProperties); + } + if (object.clearOverridesFieldMask != null) { + if (typeof object.clearOverridesFieldMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.clearOverridesFieldMask: object expected"); + message.clearOverridesFieldMask = $root.google.protobuf.FieldMask.fromObject(object.clearOverridesFieldMask); } return message; }; /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetResource.toObject = function toObject(message, options) { + RestoreBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); if (options.oneofs) - object.targetResourceInfo = "gcpResource"; + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } + if (message.diskTargetEnvironment != null && message.hasOwnProperty("diskTargetEnvironment")) { + object.diskTargetEnvironment = $root.google.cloud.backupdr.v1.DiskTargetEnvironment.toObject(message.diskTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "diskTargetEnvironment"; + } + if (message.regionDiskTargetEnvironment != null && message.hasOwnProperty("regionDiskTargetEnvironment")) { + object.regionDiskTargetEnvironment = $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.toObject(message.regionDiskTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "regionDiskTargetEnvironment"; + } + if (message.diskRestoreProperties != null && message.hasOwnProperty("diskRestoreProperties")) { + object.diskRestoreProperties = $root.google.cloud.backupdr.v1.DiskRestoreProperties.toObject(message.diskRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "diskRestoreProperties"; + } + if (message.clearOverridesFieldMask != null && message.hasOwnProperty("clearOverridesFieldMask")) { + object.clearOverridesFieldMask = $root.google.protobuf.FieldMask.toObject(message.clearOverridesFieldMask, options); + if (options.oneofs) + object._clearOverridesFieldMask = "clearOverridesFieldMask"; } return object; }; /** - * Converts this TargetResource to JSON. + * Converts this RestoreBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance * @returns {Object.} JSON object */ - TargetResource.prototype.toJSON = function toJSON() { + RestoreBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetResource + * Gets the default type url for RestoreBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; }; - return TargetResource; + return RestoreBackupRequest; })(); - v1.GcpResource = (function() { + v1.RestoreBackupResponse = (function() { /** - * Properties of a GcpResource. + * Properties of a RestoreBackupResponse. * @memberof google.cloud.backupdr.v1 - * @interface IGcpResource - * @property {string|null} [gcpResourcename] GcpResource gcpResourcename - * @property {string|null} [location] GcpResource location - * @property {string|null} [type] GcpResource type + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource */ /** - * Constructs a new GcpResource. + * Constructs a new RestoreBackupResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpResource. - * @implements IGcpResource + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse * @constructor - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set */ - function GcpResource(properties) { + function RestoreBackupResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27437,105 +27744,77 @@ } /** - * GcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.gcpResourcename = ""; - - /** - * GcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.location = ""; - - /** - * GcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.GcpResource + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @instance */ - GcpResource.prototype.type = ""; + RestoreBackupResponse.prototype.targetResource = null; /** - * Creates a new GcpResource instance using the specified properties. + * Creates a new RestoreBackupResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance */ - GcpResource.create = function create(properties) { - return new GcpResource(properties); + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); }; /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcpResource.encode = function encode(message, writer) { + RestoreBackupResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcpResource message from the specified reader or buffer. + * Decodes a RestoreBackupResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpResource.decode = function decode(reader, length, error) { + RestoreBackupResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GcpResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); break; } default: @@ -27547,141 +27826,127 @@ }; /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpResource.decodeDelimited = function decodeDelimited(reader) { + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcpResource message. + * Verifies a RestoreBackupResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcpResource.verify = function verify(message) { + RestoreBackupResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; + } return null; }; /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse */ - GcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) return object; - var message = new $root.google.cloud.backupdr.v1.GcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); + } return message; }; /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcpResource.toObject = function toObject(message, options) { + RestoreBackupResponse.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + var object = {}; + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); return object; }; /** - * Converts this GcpResource to JSON. + * Converts this RestoreBackupResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @instance * @returns {Object.} JSON object */ - GcpResource.prototype.toJSON = function toJSON() { + RestoreBackupResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcpResource + * Gets the default type url for RestoreBackupResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; }; - return GcpResource; + return RestoreBackupResponse; })(); - v1.BackupGcpResource = (function() { + v1.TargetResource = (function() { /** - * Properties of a BackupGcpResource. + * Properties of a TargetResource. * @memberof google.cloud.backupdr.v1 - * @interface IBackupGcpResource - * @property {string|null} [gcpResourcename] BackupGcpResource gcpResourcename - * @property {string|null} [location] BackupGcpResource location - * @property {string|null} [type] BackupGcpResource type + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource */ /** - * Constructs a new BackupGcpResource. + * Constructs a new TargetResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupGcpResource. - * @implements IBackupGcpResource + * @classdesc Represents a TargetResource. + * @implements ITargetResource * @constructor - * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set */ - function BackupGcpResource(properties) { + function TargetResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27689,105 +27954,91 @@ } /** - * BackupGcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @instance */ - BackupGcpResource.prototype.gcpResourcename = ""; + TargetResource.prototype.gcpResource = null; - /** - * BackupGcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.BackupGcpResource - * @instance - */ - BackupGcpResource.prototype.location = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BackupGcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource * @instance */ - BackupGcpResource.prototype.type = ""; + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BackupGcpResource instance using the specified properties. + * Creates a new TargetResource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource instance + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance */ - BackupGcpResource.create = function create(properties) { - return new BackupGcpResource(properties); + TargetResource.create = function create(properties) { + return new TargetResource(properties); }; /** - * Encodes the specified BackupGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupGcpResource.encode = function encode(message, writer) { + TargetResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BackupGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupGcpResource message from the specified reader or buffer. + * Decodes a TargetResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupGcpResource.decode = function decode(reader, length, error) { + TargetResource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.TargetResource(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); break; } default: @@ -27799,187 +28050,134 @@ }; /** - * Decodes a BackupGcpResource message from the specified reader or buffer, length delimited. + * Decodes a TargetResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupGcpResource.decodeDelimited = function decodeDelimited(reader) { + TargetResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupGcpResource message. + * Verifies a TargetResource message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupGcpResource.verify = function verify(message) { + TargetResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } return null; }; /** - * Creates a BackupGcpResource message from a plain object. Also converts values to their respective internal types. + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource */ - BackupGcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupGcpResource) + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) return object; - var message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } return message; }; /** - * Creates a plain object from a BackupGcpResource message. Also converts values to other types if specified. + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.BackupGcpResource} message BackupGcpResource + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupGcpResource.toObject = function toObject(message, options) { + TargetResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; return object; }; /** - * Converts this BackupGcpResource to JSON. + * Converts this TargetResource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupGcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @instance * @returns {Object.} JSON object */ - BackupGcpResource.prototype.toJSON = function toJSON() { + TargetResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupGcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupGcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupGcpResource"; - }; - - return BackupGcpResource; - })(); - - /** - * BackupConfigState enum. - * @name google.cloud.backupdr.v1.BackupConfigState - * @enum {number} - * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PASSIVE=2 PASSIVE value - */ - v1.BackupConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PASSIVE"] = 2; - return values; - })(); - - /** - * BackupView enum. - * @name google.cloud.backupdr.v1.BackupView - * @enum {number} - * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value - * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value - */ - v1.BackupView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; - return values; - })(); + * Gets the default type url for TargetResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + }; - /** - * BackupVaultView enum. - * @name google.cloud.backupdr.v1.BackupVaultView - * @enum {number} - * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value - * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value - */ - v1.BackupVaultView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; - return values; + return TargetResource; })(); - v1.AlloyDBClusterDataSourceProperties = (function() { + v1.GcpResource = (function() { /** - * Properties of an AlloyDBClusterDataSourceProperties. + * Properties of a GcpResource. * @memberof google.cloud.backupdr.v1 - * @interface IAlloyDBClusterDataSourceProperties - * @property {string|null} [name] AlloyDBClusterDataSourceProperties name + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type */ /** - * Constructs a new AlloyDBClusterDataSourceProperties. + * Constructs a new GcpResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AlloyDBClusterDataSourceProperties. - * @implements IAlloyDBClusterDataSourceProperties + * @classdesc Represents a GcpResource. + * @implements IGcpResource * @constructor - * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set */ - function AlloyDBClusterDataSourceProperties(properties) { + function GcpResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27987,77 +28185,105 @@ } /** - * AlloyDBClusterDataSourceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource * @instance */ - AlloyDBClusterDataSourceProperties.prototype.name = ""; + GcpResource.prototype.gcpResourcename = ""; /** - * Creates a new AlloyDBClusterDataSourceProperties instance using the specified properties. + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.location = ""; + + /** + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.type = ""; + + /** + * Creates a new GcpResource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties instance + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance */ - AlloyDBClusterDataSourceProperties.create = function create(properties) { - return new AlloyDBClusterDataSourceProperties(properties); + GcpResource.create = function create(properties) { + return new GcpResource(properties); }; /** - * Encodes the specified AlloyDBClusterDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AlloyDBClusterDataSourceProperties.encode = function encode(message, writer) { + GcpResource.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.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified AlloyDBClusterDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.verify|verify} messages. + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AlloyDBClusterDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer. + * Decodes a GcpResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AlloyDBClusterDataSourceProperties.decode = function decode(reader, length, error) { + GcpResource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GcpResource(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); break; } default: @@ -28069,125 +28295,141 @@ }; /** - * Decodes an AlloyDBClusterDataSourceProperties message from the specified reader or buffer, length delimited. + * Decodes a GcpResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AlloyDBClusterDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + GcpResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AlloyDBClusterDataSourceProperties message. + * Verifies a GcpResource message. * @function verify - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AlloyDBClusterDataSourceProperties.verify = function verify(message) { + GcpResource.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.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; return null; }; /** - * Creates an AlloyDBClusterDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} AlloyDBClusterDataSourceProperties + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource */ - AlloyDBClusterDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties) + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) return object; - var message = new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); return message; }; /** - * Creates a plain object from an AlloyDBClusterDataSourceProperties message. Also converts values to other types if specified. + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties} message AlloyDBClusterDataSourceProperties + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AlloyDBClusterDataSourceProperties.toObject = function toObject(message, options) { + GcpResource.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; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this AlloyDBClusterDataSourceProperties to JSON. + * Converts this GcpResource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @instance * @returns {Object.} JSON object */ - AlloyDBClusterDataSourceProperties.prototype.toJSON = function toJSON() { + GcpResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AlloyDBClusterDataSourceProperties + * Gets the default type url for GcpResource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AlloyDBClusterDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; }; - return AlloyDBClusterDataSourceProperties; + return GcpResource; })(); - v1.AlloyDbClusterBackupProperties = (function() { + v1.BackupGcpResource = (function() { /** - * Properties of an AlloyDbClusterBackupProperties. + * Properties of a BackupGcpResource. * @memberof google.cloud.backupdr.v1 - * @interface IAlloyDbClusterBackupProperties - * @property {string|null} [description] AlloyDbClusterBackupProperties description - * @property {number|Long|null} [storedBytes] AlloyDbClusterBackupProperties storedBytes - * @property {string|null} [chainId] AlloyDbClusterBackupProperties chainId - * @property {string|null} [databaseVersion] AlloyDbClusterBackupProperties databaseVersion + * @interface IBackupGcpResource + * @property {string|null} [gcpResourcename] BackupGcpResource gcpResourcename + * @property {string|null} [location] BackupGcpResource location + * @property {string|null} [type] BackupGcpResource type */ /** - * Constructs a new AlloyDbClusterBackupProperties. + * Constructs a new BackupGcpResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AlloyDbClusterBackupProperties. - * @implements IAlloyDbClusterBackupProperties + * @classdesc Represents a BackupGcpResource. + * @implements IBackupGcpResource * @constructor - * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set */ - function AlloyDbClusterBackupProperties(properties) { + function BackupGcpResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28195,128 +28437,105 @@ } /** - * AlloyDbClusterBackupProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties - * @instance - */ - AlloyDbClusterBackupProperties.prototype.description = null; - - /** - * AlloyDbClusterBackupProperties storedBytes. - * @member {number|Long} storedBytes - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * BackupGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @instance */ - AlloyDbClusterBackupProperties.prototype.storedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BackupGcpResource.prototype.gcpResourcename = ""; /** - * AlloyDbClusterBackupProperties chainId. - * @member {string} chainId - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * BackupGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @instance */ - AlloyDbClusterBackupProperties.prototype.chainId = ""; + BackupGcpResource.prototype.location = ""; /** - * AlloyDbClusterBackupProperties databaseVersion. - * @member {string} databaseVersion - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * BackupGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @instance */ - AlloyDbClusterBackupProperties.prototype.databaseVersion = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AlloyDbClusterBackupProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + BackupGcpResource.prototype.type = ""; /** - * Creates a new AlloyDbClusterBackupProperties instance using the specified properties. + * Creates a new BackupGcpResource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties instance + * @param {google.cloud.backupdr.v1.IBackupGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource instance */ - AlloyDbClusterBackupProperties.create = function create(properties) { - return new AlloyDbClusterBackupProperties(properties); + BackupGcpResource.create = function create(properties) { + return new BackupGcpResource(properties); }; /** - * Encodes the specified AlloyDbClusterBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. + * Encodes the specified BackupGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AlloyDbClusterBackupProperties.encode = function encode(message, writer) { + BackupGcpResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.storedBytes != null && Object.hasOwnProperty.call(message, "storedBytes")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.storedBytes); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); - if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseVersion); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified AlloyDbClusterBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.verify|verify} messages. + * Encodes the specified BackupGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupGcpResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static - * @param {google.cloud.backupdr.v1.IAlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupGcpResource} message BackupGcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AlloyDbClusterBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + BackupGcpResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer. + * Decodes a BackupGcpResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AlloyDbClusterBackupProperties.decode = function decode(reader, length, error) { + BackupGcpResource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.description = reader.string(); + message.gcpResourcename = reader.string(); break; } case 2: { - message.storedBytes = reader.int64(); + message.location = reader.string(); break; } case 3: { - message.chainId = reader.string(); - break; - } - case 4: { - message.databaseVersion = reader.string(); + message.type = reader.string(); break; } default: @@ -28328,146 +28547,167 @@ }; /** - * Decodes an AlloyDbClusterBackupProperties message from the specified reader or buffer, length delimited. + * Decodes a BackupGcpResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AlloyDbClusterBackupProperties.decodeDelimited = function decodeDelimited(reader) { + BackupGcpResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AlloyDbClusterBackupProperties message. + * Verifies a BackupGcpResource message. * @function verify - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AlloyDbClusterBackupProperties.verify = function verify(message) { + BackupGcpResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.storedBytes != null && message.hasOwnProperty("storedBytes")) - if (!$util.isInteger(message.storedBytes) && !(message.storedBytes && $util.isInteger(message.storedBytes.low) && $util.isInteger(message.storedBytes.high))) - return "storedBytes: integer|Long expected"; - if (message.chainId != null && message.hasOwnProperty("chainId")) - if (!$util.isString(message.chainId)) - return "chainId: string expected"; - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - if (!$util.isString(message.databaseVersion)) - return "databaseVersion: string expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; return null; }; /** - * Creates an AlloyDbClusterBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates a BackupGcpResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} AlloyDbClusterBackupProperties + * @returns {google.cloud.backupdr.v1.BackupGcpResource} BackupGcpResource */ - AlloyDbClusterBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties) + BackupGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupGcpResource) return object; - var message = new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties(); - if (object.description != null) - message.description = String(object.description); - if (object.storedBytes != null) - if ($util.Long) - (message.storedBytes = $util.Long.fromValue(object.storedBytes)).unsigned = false; - else if (typeof object.storedBytes === "string") - message.storedBytes = parseInt(object.storedBytes, 10); - else if (typeof object.storedBytes === "number") - message.storedBytes = object.storedBytes; - else if (typeof object.storedBytes === "object") - message.storedBytes = new $util.LongBits(object.storedBytes.low >>> 0, object.storedBytes.high >>> 0).toNumber(); - if (object.chainId != null) - message.chainId = String(object.chainId); - if (object.databaseVersion != null) - message.databaseVersion = String(object.databaseVersion); + var message = new $root.google.cloud.backupdr.v1.BackupGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); return message; }; /** - * Creates a plain object from an AlloyDbClusterBackupProperties message. Also converts values to other types if specified. + * Creates a plain object from a BackupGcpResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static - * @param {google.cloud.backupdr.v1.AlloyDbClusterBackupProperties} message AlloyDbClusterBackupProperties + * @param {google.cloud.backupdr.v1.BackupGcpResource} message BackupGcpResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AlloyDbClusterBackupProperties.toObject = function toObject(message, options) { + BackupGcpResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.storedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.storedBytes = options.longs === String ? "0" : 0; - object.chainId = ""; - object.databaseVersion = ""; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; } - if (message.storedBytes != null && message.hasOwnProperty("storedBytes")) - if (typeof message.storedBytes === "number") - object.storedBytes = options.longs === String ? String(message.storedBytes) : message.storedBytes; - else - object.storedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.storedBytes) : options.longs === Number ? new $util.LongBits(message.storedBytes.low >>> 0, message.storedBytes.high >>> 0).toNumber() : message.storedBytes; - if (message.chainId != null && message.hasOwnProperty("chainId")) - object.chainId = message.chainId; - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - object.databaseVersion = message.databaseVersion; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this AlloyDbClusterBackupProperties to JSON. + * Converts this BackupGcpResource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @instance * @returns {Object.} JSON object */ - AlloyDbClusterBackupProperties.prototype.toJSON = function toJSON() { + BackupGcpResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AlloyDbClusterBackupProperties + * Gets the default type url for BackupGcpResource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AlloyDbClusterBackupProperties + * @memberof google.cloud.backupdr.v1.BackupGcpResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AlloyDbClusterBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AlloyDbClusterBackupProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupGcpResource"; }; - return AlloyDbClusterBackupProperties; + return BackupGcpResource; + })(); + + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; })(); v1.BackupApplianceBackupProperties = (function() { diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index 40f1709f3a6..de4b3bf72cb 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -1878,7 +1878,8 @@ "oneofs": { "resourceProperties": { "oneof": [ - "cloudSqlInstanceBackupPlanAssociationProperties" + "cloudSqlInstanceBackupPlanAssociationProperties", + "alloydbClusterBackupPlanAssociationProperties" ] } }, @@ -1955,6 +1956,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "alloydbClusterBackupPlanAssociationProperties": { + "type": "AlloyDBClusterBackupPlanAssociationProperties", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "backupPlanRevisionId": { "type": "string", "id": 11, @@ -2262,6 +2270,69 @@ } } }, + "AlloyDBClusterDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "alloydb.googleapis.com/Cluster" + } + } + } + }, + "AlloyDbClusterBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "storedBytes": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "chainId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "databaseVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "AlloyDBClusterBackupPlanAssociationProperties": { + "fields": { + "clusterUid": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "CloudSqlInstanceDataSourceProperties": { "fields": { "name": { @@ -4120,57 +4191,6 @@ "BACKUP_VAULT_VIEW_FULL": 2 } }, - "AlloyDBClusterDataSourceProperties": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "alloydb.googleapis.com/Cluster" - } - } - } - }, - "AlloyDbClusterBackupProperties": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "storedBytes": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "chainId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "databaseVersion": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, "BackupApplianceBackupProperties": { "oneofs": { "_generationId": {