diff --git a/librarian.yaml b/librarian.yaml index eb44fbf7519a..084e1f45edbf 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -365,6 +365,7 @@ libraries: version: 0.11.0 apis: - path: google/cloud/backupdr/v1 + - path: google/cloud/backupdr/v1beta copyright_year: "2026" nodejs: default_version: v1 diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto new file mode 100644 index 000000000000..9195d1819f83 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto @@ -0,0 +1,134 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AppliedAutoProtectionPolicyProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// AppliedAutoProtectionPolicy is a read-only view of AutoProtectionPolicy +// and AutoProtectionPolicyBinding resources that apply to a given workload +// project. +message AppliedAutoProtectionPolicy { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AppliedAutoProtectionPolicy" + pattern: "projects/{project}/locations/{location}/appliedAutoProtectionPolicies/{applied_auto_protection_policy}" + plural: "appliedAutoProtectionPolicies" + singular: "appliedAutoProtectionPolicy" + }; + + // Represents the various states an applied auto protection policy can be in. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The policy is in the process of being applied. + CREATING = 1; + + // The policy has been applied and is active. + ACTIVE = 2; + + // The policy is in the process of being removed. + DELETION_INITIATED = 3; + } + + // Identifier. Canonical resource name. + // Format: + // projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{id}. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The full resource name of the AutoProtectionPolicyBinding that + // applies the source policy to a scope including this workload project. e.g., + // projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}. + string source_binding = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The criteria resources must meet for this rule to apply. From + // AutoProtectionPolicy.criteria. + Criteria criteria = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The set of backup plan configurations, mirroring the + // backup_plan_details from the source AutoProtectionPolicy. Each element + // specifies a backup plan for a given resource type. + repeated BackupPlanDetail backup_plan_details = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp indicating when the binding was last modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp indicating when the binding was last created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the last policy application when the job has + // run. + BindingEvaluationSummary binding_evaluation_summary = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the applied auto protection policy. + State status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing AppliedAutoProtectionPolicies. +message ListAppliedAutoProtectionPoliciesRequest { + // Required. The project and location for which to retrieve the list of + // applied policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of applied policies to return in a single + // page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAppliedAutoProtectionPolicies` call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAppliedAutoProtectionPolicies. +message ListAppliedAutoProtectionPoliciesResponse { + // A list of the AppliedAutoProtectionPolicy resources found. + repeated AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto new file mode 100644 index 000000000000..f29ae43a769b --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto @@ -0,0 +1,288 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AutoProtectionPolicyProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// An AutoprotectionPolicy is a policy resource designed to automate backup +// management, moving from manual per-resource protection to a bulk approach. +// The policy dynamically discovers and applies a specified backup plan to all +// eligible resources that match its defined scope and criteria. +message AutoProtectionPolicy { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}" + plural: "autoProtectionPolicies" + singular: "autoProtectionPolicy" + }; + + // The state of an AutoprotectionPolicy. + enum State { + // The state of the policy is unspecified. + STATE_UNSPECIFIED = 0; + + // The policy is being created. + CREATING = 1; + + // The policy is active and protecting matching resources. + ACTIVE = 2; + + // The policy is being updated. + UPDATING = 3; + + // The policy is being deleted. + DELETING = 4; + } + + // Identifier. The resource name of the AutoprotectionPolicy. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A description of the policy. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The backup plan details for matching resources. + repeated BackupPlanDetail backup_plan_details = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The criteria for matching resources. + Criteria criteria = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the AutoprotectionPolicy. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The etag for the policy. + // If this is provided on update, it must match the server's etag, otherwise + // the request will be rejected with an ABORTED error. + string etag = 6; + + // Output only. Summary of total count of different containers covered through + // this policy. + BindingSummary binding_summary = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Summary of last policy application when job was run per + // workload type. + PolicyEvaluationSummary policy_evaluation_summary = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the policy was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the policy was last updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupPlanDetail defines configuration of protection. +message BackupPlanDetail { + // Required. The type of resource that this policy will automatically protect. + // For MVP, `compute.googleapis.com/Instance` and + // `compute.googleapis.com/Disk` are supported. + string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the BackupPlan to apply to resources that + // match the policy's criteria. This backup plan must be in the same location + // as AutoProtectionPolicy. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// Criteria specifies a set of criteria for matching resources. +message Criteria { + // Required. A list of matching conditions that a resource must meet to be + // protected by the policy. + repeated MatchingCondition matching_conditions = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// MatchingCondition specifies a set of conditions for matching resources. +message MatchingCondition { + // A condition that a resource must meet to be protected by the + // policy. + oneof condition { + // Optional. A condition that matches resources based on their labels. + // For MVP, this is limited to a single label match. + KeyValuePair label_condition = 1 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// PolicyEvaluationSummary contains the summary of the last run of job that +// applies policy to matching resources. +message PolicyEvaluationSummary { + // Output only. The number of resources that currently match the policy's + // criteria. + int64 matching_resource_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources that are successfully + // protected. + int64 protected_resource_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources whose protection failed + // during job run. + int64 failed_resource_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BindingSummary contains count of different containers covered through this +// policy. +message BindingSummary { + // Output only. Total count of Projects protected with this policy. + int64 project_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// KeyValuePair defines a key-value pair for matching resource labels. +message KeyValuePair { + // Required. The key of the label to match. + // This must be in the format `{label_key}`. + // The key must match the regex + // Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The values of the label to match. + // There will be explicit “OR” between values of array. + // Each value must be in the format `{label_value}`. + // The value must match the regex + // Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`. + repeated string values = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for creating an AutoProtectionPolicy. +message CreateAutoProtectionPolicyRequest { + // Required. The parent resource where this policy will be created. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ID to use for the policy. + // This will become the final component of the policy's resource name. + string auto_protection_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AutoProtectionPolicy resource to create. + AutoProtectionPolicy auto_protection_policy = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for getting an AutoProtectionPolicy. +message GetAutoProtectionPolicyRequest { + // Required. The name of the policy to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; +} + +// Request message for updating an AutoProtectionPolicy. +message UpdateAutoProtectionPolicyRequest { + // Required. The policy to update. + AutoProtectionPolicy auto_protection_policy = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask is used to specify the fields to be overwritten in the + // AutoProtectionPolicy resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting an AutoProtectionPolicy. +message DeleteAutoProtectionPolicyRequest { + // Required. The name of the policy to delete. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // The current etag of the AutoProtectionPolicy. + // If an etag is provided and does not match the current etag of the + // connection, the request will be rejected with an ABORTED error. + string etag = 2; +} + +// Request message for ListAutoProtectionPolicies. +message ListAutoProtectionPoliciesRequest { + // Required. The project and location for which to retrieve the list of + // policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of policies to return in a single page. + // If unspecified, a server-default value will be used. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + // page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. The following fields are filterable: + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. The + // following fields are sortable: + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAutoProtectionPolicies. +message ListAutoProtectionPoliciesResponse { + // A list of the AutoProtectionPolicy resources found. + repeated AutoProtectionPolicy auto_protection_policies = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto new file mode 100644 index 000000000000..f5bcc7e76738 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto @@ -0,0 +1,200 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AutoProtectionPolicyBindingProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// An AutoprotectionPolicyBinding (APPA) acts as the bridge between an +// AutoprotectionPolicy and the scope (Project, Folder, or Organization) where +// the policy should be applied. +message AutoProtectionPolicyBinding { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}" + plural: "autoProtectionPolicyBindings" + singular: "autoProtectionPolicyBinding" + }; + + // The state of an AutoProtectionPolicyBinding. + enum State { + // The state of the binding is unspecified. + STATE_UNSPECIFIED = 0; + + // The binding is being created. + CREATING = 1; + + // The binding is active. + ACTIVE = 2; + + // The binding deletion is initiated. + DELETION_INITIATED = 3; + } + + // Identifier. The resource name of the AutoProtectionPolicyBinding. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A description of the binding. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current state of the AutoProtectionPolicyBinding. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Resource Id of target container on which policy will + // be applied. Format: projects/{project_id} + string scope = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "*" } + ]; + + // Output only. Summaries of the last policy application when the job has run, + // with one entry per resource type specified in the AutoProtectionPolicy. + BindingEvaluationSummary binding_evaluation_summary = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the binding was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the binding was last updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. The etag for the binding. + // If this is provided on update, it must match the server's etag. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// BindingEvaluationSummary contains the summary of the last run of job +// that applies policy to matching resources for a given binding. +message BindingEvaluationSummary { + // Output only. The number of resources that currently match the policy's + // criteria. + int64 matching_resource_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources that are successfully + // protected. + int64 protected_resource_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources whose protection failed + // during job run. + int64 failed_resource_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating an AutoProtectionPolicyBinding. +message CreateAutoProtectionPolicyBindingRequest { + // Required. The parent resource where this binding will be created. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // Required. The ID to use for the binding. + // This will become the final component of the binding's resource name. + string auto_protection_policy_binding_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The AutoProtectionPolicyBinding resource to create. + AutoProtectionPolicyBinding auto_protection_policy_binding = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for getting an AutoProtectionPolicyBinding. +message GetAutoProtectionPolicyBindingRequest { + // Required. The name of the binding to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Request message for ListAutoProtectionPolicyBindings. +message ListAutoProtectionPolicyBindingsRequest { + // Required. The project and location for which to retrieve the list of + // policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // Optional. The maximum number of policies to return in a single page. + // If unspecified, a server-default value will be used. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + // page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. The following fields are filterable: + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. The + // following fields are sortable: + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAutoProtectionPolicyBindings. +message ListAutoProtectionPolicyBindingsResponse { + // A list of the AutoProtectionPolicyBindings resources found. + repeated AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Request message for initiating delete of an AutoProtectionPolicyBinding. +message InitiateDeleteAutoProtectionPolicyBindingRequest { + // Required. The name of the binding to delete. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupdr.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupdr.proto new file mode 100644 index 000000000000..79678d780ce0 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupdr.proto @@ -0,0 +1,1003 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto"; +import "google/cloud/backupdr/v1beta/backupplan.proto"; +import "google/cloud/backupdr/v1beta/backupplanassociation.proto"; +import "google/cloud/backupdr/v1beta/backupvault.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/cloud/backupdr/v1beta/bindingmatchingresource.proto"; +import "google/cloud/backupdr/v1beta/datasourcereference.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupDRProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// The BackupDR Service +service BackupDR { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-backupdr," + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ManagementServers in a given project and location. + rpc ListManagementServers(ListManagementServersRequest) + returns (ListManagementServersResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/managementServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ManagementServer. + rpc GetManagementServer(GetManagementServerRequest) + returns (ManagementServer) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ManagementServer in a given project and location. + rpc CreateManagementServer(CreateManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/managementServers" + body: "management_server" + }; + option (google.api.method_signature) = + "parent,management_server,management_server_id"; + option (google.longrunning.operation_info) = { + response_type: "ManagementServer" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single ManagementServer. + rpc DeleteManagementServer(DeleteManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetch Backups for a given resource type. + rpc FetchBackupsForResourceType(FetchBackupsForResourceTypeRequest) + returns (FetchBackupsForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Update a BackupPlan. + rpc UpdateBackupPlan(UpdateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup_plan.name=projects/*/locations/*/backupPlans/*}" + body: "backup_plan" + }; + option (google.api.method_signature) = "backup_plan,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanRevision. + rpc GetBackupPlanRevision(GetBackupPlanRevisionRequest) + returns (BackupPlanRevision) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlans/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanRevisions in a given project and location. + rpc ListBackupPlanRevisions(ListBackupPlanRevisionsRequest) + returns (ListBackupPlanRevisionsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupPlans/*}/revisions" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Update a BackupPlanAssociation. + rpc UpdateBackupPlanAssociation(UpdateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "backup_plan_association,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // List BackupPlanAssociations for a given resource type. + rpc FetchBackupPlanAssociationsForResourceType( + FetchBackupPlanAssociationsForResourceTypeRequest) + returns (FetchBackupPlanAssociationsForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single DataSourceReference. + rpc GetDataSourceReference(GetDataSourceReferenceRequest) + returns (DataSourceReference) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/dataSourceReferences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataSourceReferences for a given project and location. + rpc ListDataSourceReferences(ListDataSourceReferencesRequest) + returns (ListDataSourceReferencesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetch DataSourceReferences for a given project, location and resource type. + rpc FetchDataSourceReferencesForResourceType( + FetchDataSourceReferencesForResourceTypeRequest) + returns (FetchDataSourceReferencesForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Initializes the service related config for a project. + rpc InitializeService(InitializeServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/serviceConfig}:initialize" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "InitializeServiceResponse" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new AutoProtectionPolicy in a given project and location. + rpc CreateAutoProtectionPolicy(CreateAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies" + body: "auto_protection_policy" + }; + option (google.api.method_signature) = + "parent,auto_protection_policy,auto_protection_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Lists AutoProtectionPolicies for a given project and location. + rpc ListAutoProtectionPolicies(ListAutoProtectionPoliciesRequest) + returns (ListAutoProtectionPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutoProtectionPolicy. + rpc GetAutoProtectionPolicy(GetAutoProtectionPolicyRequest) + returns (AutoProtectionPolicy) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the parameters of a single AutoProtectionPolicy. + rpc UpdateAutoProtectionPolicy(UpdateAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{auto_protection_policy.name=projects/*/locations/*/autoProtectionPolicies/*}" + body: "auto_protection_policy" + }; + option (google.api.method_signature) = "auto_protection_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single AutoProtectionPolicy. + rpc DeleteAutoProtectionPolicy(DeleteAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new AutoProtectionPolicyBinding in a given project and + // location. + rpc CreateAutoProtectionPolicyBinding( + CreateAutoProtectionPolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings" + body: "auto_protection_policy_binding" + }; + option (google.api.method_signature) = + "parent,auto_protection_policy_binding,auto_protection_policy_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Returns the auto protection policy binding read from the CCFE tables. + rpc GetAutoProtectionPolicyBinding(GetAutoProtectionPolicyBindingRequest) + returns (AutoProtectionPolicyBinding) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the auto protection policy bindings read from the CCFE tables. + rpc ListAutoProtectionPolicyBindings(ListAutoProtectionPolicyBindingsRequest) + returns (ListAutoProtectionPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists AppliedAutoProtectionPolicies in a given project and location. + rpc ListAppliedAutoProtectionPolicies( + ListAppliedAutoProtectionPoliciesRequest) + returns (ListAppliedAutoProtectionPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/appliedAutoProtectionPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // InitiateDeleteAutoProtectionPolicyBinding initiates delete for + // AutoProtectionPolicy Binding + rpc InitiateDeleteAutoProtectionPolicyBinding( + InitiateDeleteAutoProtectionPolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}:initiateDelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Binding Matching Resource. + rpc GetBindingMatchingResource(GetBindingMatchingResourceRequest) + returns (BindingMatchingResource) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*/matchingResources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + rpc ListBindingMatchingResources(ListBindingMatchingResourcesRequest) + returns (ListBindingMatchingResourcesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}/matchingResources" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Network configuration for ManagementServer instance. +message NetworkConfig { + // VPC peering modes supported by Google Cloud Backup and DR. + enum PeeringMode { + // Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0; + + // Connect using Private Service Access to the Management Server. Private + // services access provides an IP address range for multiple Google Cloud + // services, including Google Cloud Backup and DR. + PRIVATE_SERVICE_ACCESS = 1; + } + + // Optional. The resource name of the Google Compute Engine VPC network to + // which the ManagementServer instance is connected. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The network connect mode of the ManagementServer instance. For + // this version, only PRIVATE_SERVICE_ACCESS is supported. + PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// ManagementURI for the Management Server resource. +message ManagementURI { + // Output only. The ManagementServer AGM/RD WebUI URL. + string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer AGM/RD API URL. + string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. +message WorkforceIdentityBasedManagementURI { + // Output only. First party Management URI for Google Identities. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party Management URI for External Identity Providers. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, +message WorkforceIdentityBasedOAuth2ClientID { + // Output only. First party OAuth Client ID for Google Identities. + string first_party_oauth2_client_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party OAuth Client ID for External Identity Providers. + string third_party_oauth2_client_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementServer describes a single BackupDR ManagementServer instance. +message ManagementServer { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ManagementServer" + pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" + plural: "managementServers" + singular: "managementServer" + }; + + // Type of backup service resource. + enum InstanceType { + // Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0; + + // Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1; + } + + // State of Management server instance. + enum InstanceState { + // State not set. + INSTANCE_STATE_UNSPECIFIED = 0; + + // The instance is being created. + CREATING = 1; + + // The instance has been created and is fully usable. + READY = 2; + + // The instance configuration is being updated. Certain kinds of updates + // may cause the instance to become unusable while the update is in + // progress. + UPDATING = 3; + + // The instance is being deleted. + DELETING = 4; + + // The instance is being repaired and may be unstable. + REPAIRING = 5; + + // Maintenance is being performed on this instance. + MAINTENANCE = 6; + + // The instance is experiencing an issue and might be unusable. You can get + // further details from the statusMessage field of Instance resource. + ERROR = 7; + } + + // Output only. Identifier. The resource name. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the ManagementServer instance (2048 characters + // or less). + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // Labels currently defined: + // 1. migrate_from_go= + // If set to true, the MS is created in migration ready mode. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of the ManagementServer resource. + InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by clients to connect to AGM/RD graphical user interface and APIs. + ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostnames of the exposed AGM endpoints for both types of + // user i.e. 1p and 3p, used to connect AGM/RM UI. + WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = + 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer state. + InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. VPC networks to which the ManagementServer instance is connected. + // For this version, only a single network is supported. This field is + // optional if MS is created without PSA + repeated NetworkConfig networks = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Server specified ETag for the ManagementServer resource to + // prevent simultaneous updates from overwiting each other. + string etag = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The OAuth 2.0 client id is required to make API calls to the + // Backup and DR instance API of this ManagementServer. This is the value that + // should be provided in the 'aud' field of the OIDC ID Token (see openid + // specification + // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + WorkforceIdentityBasedOAuth2ClientID + workforce_identity_based_oauth2_client_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by BAs to connect to BA proxy. + repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + google.protobuf.BoolValue satisfies_pzs = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing management servers. +message ListManagementServersRequest { + // Required. The project and location for which to retrieve management servers + // information, in the format 'projects/{project_id}/locations/{location}'. + // In Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing management servers. +message ListManagementServersResponse { + // The list of ManagementServer instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return management servers in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated ManagementServer management_servers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a management server instance. +message GetManagementServerRequest { + // Required. Name of the management server resource name, in the format + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; +} + +// Request message for creating a management server instance. +message CreateManagementServerRequest { + // Required. The management server project and location in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Required. The name of the management server to create. The name must be + // unique for the specified project and location. + string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [management server + // resource][google.cloud.backupdr.v1.ManagementServer] + ManagementServer management_server = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for deleting a management server instance. +message DeleteManagementServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for initializing the service. +message InitializeServiceRequest { + // The configuration for initializing the resource. + oneof initialization_config { + // Optional. The configuration for initializing a Cloud SQL instance. + CloudSqlInstanceInitializationConfig + cloud_sql_instance_initialization_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The resource name of the serviceConfig used to initialize the + // service. The location must be the location of the BackupVault. + // Format: `projects/{project_id}/locations/{location}/serviceConfig`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource type to which the default service config will be + // applied. Examples include, "compute.googleapis.com/Instance" and + // "storage.googleapis.com/Bucket". + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The location where the BackupPlan will be created. This field is + // required for multi-region BackupVaults and is optional for regional + // BackupVaults. It is useful when creating a Backup Vault in a multi-region, + // allowing the BackupPlan to reside in a specific region within that + // multi-region. If this field is not provided, the BackupPlan will be created + // in the same location as specified in the `name` field. + string backup_plan_location = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validates the request and returns the result, but does + // not actually run it. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for initializing the service. +message InitializeServiceResponse { + // The resource name of the default `BackupVault` created. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + string backup_vault_name = 1; + + // The resource name of the default `BackupPlan` created. + // Format: + // `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. + string backup_plan_name = 2; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to 'Code.CANCELLED'. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AdditionalInfo contains additional Info related to backup plan + // association resource. + map additional_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplan.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplan.proto new file mode 100644 index 000000000000..e7184735077c --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplan.proto @@ -0,0 +1,669 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/dayofweek.proto"; +import "google/type/month.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// A `BackupPlan` specifies some common fields, such as `description` as well +// as one or more `BackupRule` messages. Each `BackupRule` has a retention +// policy and defines a schedule by which the system is to perform backup +// workloads. +message BackupPlan { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlan" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}" + plural: "backupPlans" + singular: "backupPlan" + }; + + // `State` enumerates the possible states for a `BackupPlan`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + + // The resource is being updated. + UPDATING = 5; + } + + // Defines optional workload-specific properties for backups generated by this + // plan. + oneof resource_properties { + // Optional. Defines optional properties specific to backups of disk-based + // resources, such as Compute Engine Persistent Disks. This includes + // settings like whether to perform a guest flush. + DiskBackupPlanProperties disk_backup_plan_properties = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines optional properties specific to backups of compute + // instance based resources, such as Compute Engine Instances. This includes + // settings like whether to perform a guest flush. + ComputeInstanceBackupPlanProperties + compute_instance_backup_plan_properties = 20 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. Identifier. The resource name of the `BackupPlan`. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the `BackupPlan` resource. + // + // The description allows for additional details about `BackupPlan` and its + // use cases to be provided. An example description is the following: "This + // is a backup plan that performs a daily backup at 6pm and retains data for 3 + // months". The description must be at most 2048 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This collection of key/value pairs allows for custom labels to be + // supplied by the user. Example, {"tag": "Weekly"}. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. When the `BackupPlan` was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the `BackupPlan` was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The backup rules for this `BackupPlan`. + repeated BackupRule backup_rules = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional field to configure the maximum number of days for which + // a backup can be retained. This field is only applicable for on-demand + // backups taken with custom retention value. + int32 max_custom_on_demand_retention_days = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The `State` for the `BackupPlan`. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The resource type to which the `BackupPlan` will be applied. + // Examples include, "compute.googleapis.com/Instance", + // "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + // "compute.googleapis.com/Disk". + string resource_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. `etag` is returned from the service in the response. As a user of + // the service, you may provide an etag value in this field to prevent stale + // resources. + string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Resource name of backup vault which will be used as storage + // location for backups. Format: + // projects/{project}/locations/{location}/backupVaults/{backupvault} + string backup_vault = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Output only. The Google Cloud service account to be used by the BackupVault + // for taking backups. Specify the email address of the Backup Vault Service + // Account. + string backup_vault_service_account = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Applicable only for Cloud SQL resource_type. + // + // Configures how long logs will be stored. It is defined in “days”. This + // value should be greater than or equal to minimum enforced log retention + // duration of the backup vault. + int64 log_retention_days = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. All resource types to which backupPlan can be applied. + repeated string supported_resource_types = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string revision_id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource id of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + string revision_name = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `BackupRule` binds the backup schedule to a retention policy. +message BackupRule { + // The schedule that defines the automated backup workloads for this + // `BackupRule`. + oneof backup_schedule_oneof { + // Optional. Defines a schedule that runs within the confines of a defined + // window of time. + StandardSchedule standard_schedule = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + // unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + // followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + // /[a-z][a-z0-9-]{,62}/. + string rule_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Configures the duration for which backup data will be kept. It is + // defined in “days”. The value should be greater than or equal to minimum + // enforced retention of the backup vault. + // + // Minimum value is 1 and maximum value is 36159 for custom retention + // on-demand backup. + // Minimum and maximum values are workload specific for all other rules. + // Note: Longer retention can lead to higher storage costs post introductory + // trial. We recommend starting with a short duration of 3 days or less. + int32 backup_retention_days = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// `StandardSchedule` defines a schedule that run within the confines of a +// defined window of days. We can define recurrence type for schedule as +// HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. +message StandardSchedule { + // `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + enum RecurrenceType { + // recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0; + + // The `BackupRule` is to be applied hourly. + HOURLY = 1; + + // The `BackupRule` is to be applied daily. + DAILY = 2; + + // The `BackupRule` is to be applied weekly. + WEEKLY = 3; + + // The `BackupRule` is to be applied monthly. + MONTHLY = 4; + + // The `BackupRule` is to be applied yearly. + YEARLY = 5; + } + + // Required. Specifies the `RecurrenceType` for the schedule. + RecurrenceType recurrence_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + // means jobs will run every 2 hours from start time till end time defined. + // + // This is required for `recurrence_type`, `HOURLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `HOURLY`. + // + // The supported values for each resource type are as follows: + // + // * `compute.googleapis.com/Instance`: 1-23 + // * `compute.googleapis.com/Disk`: 1-23 + // * `sqladmin.googleapis.com/Instance`: 6-23 + // * `alloydb.googleapis.com/Cluster`: 1-23 + // * `file.googleapis.com/Instance`: 1-23 + // + // Refer to link + // https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices + // for more details. + int32 hourly_frequency = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + // will run. + // + // This is required for `recurrence_type`, `WEEKLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `WEEKLY`. + repeated google.type.DayOfWeek days_of_week = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + // + // Values for `days_of_month` are only applicable for `recurrence_type`, + // `MONTHLY` and `YEARLY`. A validation error will occur if other values are + // supplied. + repeated int32 days_of_month = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + // MONDAY, on which jobs will run. This will be specified by two fields in + // `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + // e.g. `LAST`. + // + // This field is only applicable for `recurrence_type`, `MONTHLY` and + // `YEARLY`. A validation error will occur if other values are supplied. + WeekDayOfMonth week_day_of_month = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + // which jobs will run. + // + // This field is only applicable when `recurrence_type` is `YEARLY`. A + // validation error will occur if other values are supplied. + repeated google.type.Month months = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A BackupWindow defines the window of day during which backup jobs + // will run. Jobs are queued at the beginning of the window and will be marked + // as `NOT_RUN` if they do not start by the end of the window. + // + // Note: running jobs will not be cancelled at the end of the window. + BackupWindow backup_window = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time zone to be used when interpreting the schedule. + // The value of this field must be a time zone name from the IANA tz database. + // See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + // list of valid timezone names. For e.g., Europe/Paris. + string time_zone = 8 [(google.api.field_behavior) = REQUIRED]; +} + +// `BackupWindow` defines a window of the day during which backup jobs will run. +message BackupWindow { + // Required. The hour of day (0-23) when the window starts for e.g. if value + // of start hour of day is 6 that mean backup window start at 6:00. + int32 start_hour_of_day = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The hour of day (1-24) when the window end for e.g. if value of + // end hour of day is 10 that mean backup window end time is 10:00. + // + // End hour of day should be greater than start hour of day. + // 0 <= start_hour_of_day < end_hour_of_day <= 24 + // + // End hour of day is not include in backup window that mean if + // end_hour_of_day= 10 jobs should start before 10:00. + int32 end_hour_of_day = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `WeekDayOfMonth` defines the week day of the month on which the backups will +// run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values +// like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. +message WeekDayOfMonth { + // `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + // third, or last week of the month. + enum WeekOfMonth { + // The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0; + + // The first week of the month. + FIRST = 1; + + // The second week of the month. + SECOND = 2; + + // The third week of the month. + THIRD = 3; + + // The fourth week of the month. + FOURTH = 4; + + // The last week of the month. + LAST = 5; + } + + // Required. Specifies the week of the month. + WeekOfMonth week_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the day of the week. + google.type.DayOfWeek day_of_week = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for creating a `BackupPlan`. +message CreateBackupPlanRequest { + // Required. The `BackupPlan` project and location in the format + // `projects/{project}/locations/{location}`. In Google Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Required. The name of the `BackupPlan` to create. The name must be unique + // for the specified project and location.The name must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens. + // Pattern, /[a-z][a-z0-9-]{,62}/. + string backup_plan_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `BackupPlan` resource object to create. + BackupPlan backup_plan = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request message for getting a list `BackupPlan`. +message ListBackupPlansRequest { + // Required. The project and location for which to retrieve `BackupPlans` + // information. Format: `projects/{project}/locations/{location}`. In Google + // Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + // **us-central1**. To retrieve backup plans for all locations, use "-" for + // the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlan`. +message ListBackupPlansResponse { + // The list of `BackupPlans` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + // BackupPlan + repeated BackupPlan backup_plans = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token] + // in a subsequent `ListBackupPlans` call to retrieve the next page of + // results. If this field is omitted or empty, then there are no more results + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request message for getting a `BackupPlan`. +message GetBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to retrieve. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// The request message for deleting a `BackupPlan`. +message DeleteBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to delete. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for updating a backup plan. +message UpdateBackupPlanRequest { + // Required. The resource being updated + BackupPlan backup_plan = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // Field mask is used to specify the fields to be overwritten in the + // BackupPlan resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then the request will fail. + // Currently, these fields are supported in update: description, schedules, + // retention period, adding and removing Backup Rules. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in +// time. +message BackupPlanRevision { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanRevision" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}" + plural: "backupPlanRevisions" + singular: "backupPlanRevision" + }; + + // The state of the `BackupPlanRevision`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource State + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Backup Plan being encompassed by this revision. + BackupPlan backup_plan_snapshot = 4; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for getting a `BackupPlanRevision`. +message GetBackupPlanRevisionRequest { + // Required. The resource name of the `BackupPlanRevision` to retrieve. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanRevision" + } + ]; +} + +// The request message for getting a list of `BackupPlanRevision`. +message ListBackupPlanRevisionsRequest { + // Required. The project and location for which to retrieve + // `BackupPlanRevisions` information. Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + // **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanRevision" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlanRevision`. +message ListBackupPlanRevisionsResponse { + // The list of `BackupPlanRevisions` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupPlanRevision backup_plan_revisions = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token] + // in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + // results. If this field is omitted or empty, then there are no more results + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Properties for a disk backup plan. +message DiskBackupPlanProperties { + // Optional. Indicates whether to perform a guest flush operation before + // taking a disk backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Properties for a compute instance backup plan. +message ComputeInstanceBackupPlanProperties { + // Optional. Indicates whether to perform a guest flush operation before + // taking a compute backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplanassociation.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplanassociation.proto new file mode 100644 index 000000000000..0cd0b70d1471 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupplanassociation.proto @@ -0,0 +1,478 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanAssociationProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// A BackupPlanAssociation represents a single BackupPlanAssociation which +// contains details like workload, backup plan etc +message BackupPlanAssociation { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + pattern: "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}" + plural: "backupPlanAssociations" + singular: "backupPlanAssociation" + }; + + // Enum for State of BackupPlan Association + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + + // The resource is being updated. + UPDATING = 5; + + // The resource has been created but backups are paused. + PAUSED = 6; + } + + // Properties of the protected Google Cloud resource. + oneof resource_properties { + // Output only. Cloud SQL instance's backup plan association properties. + 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. Identifier. The resource name of BackupPlanAssociation in + // below format Format : + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. Immutable. Resource type of workload on which backupplan is + // applied + string resource_type = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Immutable. Resource name of workload on which the backup plan is + // applied. + // + // The format can either be the resource name (e.g., + // "projects/my-project/zones/us-central1-a/instances/my-instance") or the + // full resource URI (e.g., + // "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). + string resource = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Resource name of backup plan which needs to be applied on + // workload. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The BackupPlanAssociation resource state. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The config info related to backup rules. + repeated RuleConfigInfo rules_config_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of data source which will be used as storage + // location for backups taken. Format : + // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} + string data_source = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string backup_plan_revision_id = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource id of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + string backup_plan_revision_name = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the `AutoProtectionPolicyBinding` that + // manages this association, if any. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Message for rules config info. +message RuleConfigInfo { + // Enum for LastBackupState + enum LastBackupState { + // State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup is pending. + FIRST_BACKUP_PENDING = 1; + + // The most recent backup could not be run/failed because of the lack of + // permissions. + PERMISSION_DENIED = 2; + + // The last backup operation succeeded. + SUCCEEDED = 3; + + // The last backup operation failed. + FAILED = 4; + } + + // Output only. Backup Rule id fetched from backup plan. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last backup state for rule. + LastBackupState last_backup_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. google.rpc.Status object to store the last backup error. + google.rpc.Status last_backup_error = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The point in time when the last successful backup was captured + // from the source. + google.protobuf.Timestamp last_successful_backup_consistency_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating a backup plan. +message CreateBackupPlanAssociationRequest { + // Required. The backup plan association project and location in the format + // `projects/{project_id}/locations/{location}`. In Backup and DR locations + // map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The name of the backup plan association to create. The name must + // be unique for the specified project and location. + string backup_plan_association_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupPlanAssociation backup_plan_association = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for List BackupPlanAssociation +message ListBackupPlanAssociationsRequest { + // Required. The project and location for which to retrieve backup Plan + // Associations information, in the format + // `projects/{project_id}/locations/{location}`. In Backup and DR, locations + // map to Google Cloud regions, for example **us-central1**. To retrieve + // backup plan associations for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for List BackupPlanAssociation +message ListBackupPlanAssociationsResponse { + // The list of Backup Plan Associations in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup plan associations in reachable + // locations and the 'unreachable' field will be populated with a list of + // unreachable locations. + repeated BackupPlanAssociation backup_plan_associations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the FetchBackupPlanAssociationsForResourceType method. +message FetchBackupPlanAssociationsForResourceTypeRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The type of the Google Cloud resource. + // Ex: sql.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of BackupPlanAssociations to return. The + // service may return fewer than this value. If unspecified, at most 50 + // BackupPlanAssociations will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchBackupPlanAssociationsForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchBackupPlanAssociationsForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * resource + // * backup_plan + // * state + // * data_source + // * cloud_sql_instance_backup_plan_association_properties.instance_create_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchBackupPlanAssociationsForResourceType method. +message FetchBackupPlanAssociationsForResourceTypeResponse { + // Output only. The BackupPlanAssociations from the specified parent. + repeated BackupPlanAssociation backup_plan_associations = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for getting a BackupPlanAssociation resource. +message GetBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; +} + +// Request message for deleting a backup plan association. +message DeleteBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. This field is exclusively used by Backup and DR's auto-protection + // feature. The resource name of the `AutoProtectionPolicyBinding` that + // triggered the deletion of this association. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Request message for updating a backup plan association. +message UpdateBackupPlanAssociationRequest { + // Required. The resource being updated + BackupPlanAssociation backup_plan_association = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // Field mask is used to specify the fields to be overwritten in the + // BackupPlanAssociation resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then the request will fail. + // Currently backup_plan_association.backup_plan is the only supported field. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for triggering a backup. +message TriggerBackupRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. backup rule_id for which a backup needs to be triggered. + // If not specified, on-demand backup with custom retention will be triggered. + string rule_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The duration for which backup data will be kept, while taking an + // on-demand backup with custom retention. It is defined in "days". + // It is mutually exclusive with rule_id. This field is required if + // rule_id is not provided. + int32 custom_retention_days = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to be applied on the backup. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault.proto new file mode 100644 index 000000000000..e0c23fdc1234 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault.proto @@ -0,0 +1,1431 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_ba.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/cloud/backupdr/v1beta/backupvault_disk.proto"; +import "google/cloud/backupdr/v1beta/backupvault_gce.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; + +// Backup configuration state. Is the resource configured for backup? +enum BackupConfigState { + // The possible states of backup configuration. + // Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + + // The data source is actively protected (i.e. there is a + // BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1; + + // The data source is no longer protected (but may have backups under it) + PASSIVE = 2; +} + +// BackupView contains enum options for Partial and Full view. +enum BackupView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1; + + // Includes all data about the Backup. + // This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2; +} + +// BackupVaultView contains enum options for Partial and Full view. +enum BackupVaultView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1; + + // Includes all data about the Backup Vault. + // This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2; +} + +// Message describing a BackupVault object. +message BackupVault { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // Message describing the EncryptionConfig of backup vault. + // This determines how data within the vault is encrypted at rest. + message EncryptionConfig { + // Optional. The Cloud KMS key name to encrypt backups in this backup vault. + // Must be in the same region as the vault. Some workload backups like + // compute disk backups may use their inherited source key instead. Format: + // projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key} + optional string kms_key_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + } + + // How a backup's enforced retention end time is inherited. + enum BackupRetentionInheritance { + // Inheritance behavior not set. This will default to + // `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0; + + // The enforced retention end time of a backup will be inherited from the + // backup vault's `backup_minimum_enforced_retention_duration` field. + // + // This is the default behavior. + INHERIT_VAULT_RETENTION = 1; + + // The enforced retention end time of a backup will always match the expire + // time of the backup. + // + // If this is set, the backup's enforced retention end time will be set to + // match the expire time during creation of the backup. When updating, the + // ERET and expire time must be updated together and have the same value. + // Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2; + } + + // Holds the state of the backup vault resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup vault is being created. + CREATING = 1; + + // The backup vault has been created and is fully usable. + ACTIVE = 2; + + // The backup vault is being deleted. + DELETING = 3; + + // The backup vault is experiencing an issue and might be unusable. + ERROR = 4; + + // The backup vault is being updated. + UPDATING = 5; + } + + // Holds the access restriction for the backup vault. + enum AccessRestriction { + // Access restriction not set. If user does not provide any value or pass + // this value, it will be changed to WITHIN_ORGANIZATION. + ACCESS_RESTRICTION_UNSPECIFIED = 0; + + // Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1; + + // Access to or from resources outside your current organization will be + // denied. + WITHIN_ORGANIZATION = 2; + + // No access restriction. + UNRESTRICTED = 3; + + // Access to or from resources outside your current organization will be + // denied except for backup appliance. + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4; + } + + // Output only. Identifier. Name of the backup vault to create. It must have + // the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + // `{backupvault}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the project and location. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the BackupVault instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The default and minimum enforced retention for each backup within + // the backup vault. The enforced retention for each backup can be extended. + // Note: Longer minimum enforced retention period impacts potential storage + // costs post introductory trial. We recommend starting with a short duration + // of 3 days or less. + optional google.protobuf.Duration backup_minimum_enforced_retention_duration = + 20 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Setting for how a backup's enforced retention end time is + // inherited. + optional BackupRetentionInheritance backup_retention_inheritance = 27 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Set to true when there are no backups nested under this + // resource. + optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag for the backup vault resource to + // prevent simultaneous updates from overwiting each other. + optional string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The BackupVault resource instance state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Time after which the BackupVault resource is locked. + optional google.protobuf.Timestamp effective_time = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of backups in this backup vault. + int64 backup_count = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account used by the BackupVault Service for this + // BackupVault. The user should grant this account permissions in their + // workload project to enable the service to run backups and restores there. + string service_account = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources. + int64 total_stored_bytes = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Immutable after resource creation until resource deletion. + string uid = 21 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. User annotations. See https://google.aip.dev/128#annotations + // Stores small amounts of arbitrary data. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restricts access to certain sources and destinations for data + // being sent into, or restored from, the backup vault. Defaults to + // WITHIN_ORGANIZATION if not provided during creation. + AccessRestriction access_restriction = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption config of the backup vault. + optional EncryptionConfig encryption_config = 29 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message describing a DataSource object. +// Datasource object used to represent Datasource details for both admin and +// basic view. +message DataSource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSource" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}" + plural: "dataSources" + singular: "dataSource" + }; + + // Holds the state of the data source resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The data source is being created. + CREATING = 1; + + // The data source has been created and is fully usable. + ACTIVE = 2; + + // The data source is being deleted. + DELETING = 3; + + // The data source is experiencing an issue and might be unusable. + ERROR = 4; + } + + // The source resource that is represented by this DataSource. It can be a + // Google Cloud resource, or one backed up by a Backup Appliance. + oneof source_resource { + // The backed up resource is a Google Cloud resource. + // The word 'DataSource' was included in the names to indicate that this is + // the representation of the Google Cloud resource used within the + // DataSource object. + DataSourceGcpResource data_source_gcp_resource = 26; + + // The backed up resource is a backup appliance application. + DataSourceBackupApplianceApplication + data_source_backup_appliance_application = 27; + } + + // Output only. Identifier. Name of the datasource to create. + // It must have the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + // `{datasource}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the backup vault. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The DataSource resource instance state. + State state = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of backups in the data source. + optional int64 backup_count = 7; + + // Server specified ETag for the ManagementServer resource to prevent + // simultaneous updates from overwiting each other. + optional string etag = 14; + + // The number of bytes (metadata and data) stored in this datasource. + optional int64 total_stored_bytes = 23; + + // Output only. The backup configuration state. + BackupConfigState config_state = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Details of how the resource is configured for backup. + BackupConfigInfo backup_config_info = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field is set to true if the backup is blocked by vault + // access restriction. + bool backup_blocked_by_vault_access_restriction = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupConfigInfo has information about how the resource is configured +// for Backup and about the most recent backup to this vault. +message BackupConfigInfo { + // LastBackupstate tracks whether the last backup was not yet started, + // successful, failed, or could not be run because of the lack of permissions. + enum LastBackupState { + // Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup has not yet completed + FIRST_BACKUP_PENDING = 1; + + // The most recent backup was successful + SUCCEEDED = 2; + + // The most recent backup failed + FAILED = 3; + + // The most recent backup could not be run/failed because of the lack of + // permissions + PERMISSION_DENIED = 4; + } + + // Configuration Info has the resource format-specific configuration. + oneof backup_config { + // Configuration for a Google Cloud resource. + GcpBackupConfig gcp_backup_config = 4; + + // Configuration for an application backed up by a Backup Appliance. + BackupApplianceBackupConfig backup_appliance_backup_config = 5; + } + + // Output only. The status of the last backup to this BackupVault + LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup were successful, this field has the + // consistency date. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup failed, this field has the error message. + google.rpc.Status last_backup_error = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GcpBackupConfig captures the Backup configuration details for Google Cloud +// resources. All Google Cloud resources regardless of type are protected with +// backup plan associations. +message GcpBackupConfig { + // The name of the backup plan. + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The description of the backup plan. + string backup_plan_description = 2; + + // The name of the backup plan association. + string backup_plan_association = 3 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + }]; + + // The names of the backup plan rules which point to this backupvault + repeated string backup_plan_rules = 4; + + // The name of the backup plan revision. + string backup_plan_revision_name = 5; + + // The user friendly id of the backup plan revision. + // E.g. v0, v1 etc. + string backup_plan_revision_id = 6; + + // Output only. The resource name of the `AutoProtectionPolicyBinding` that + // manages this datasource, if any. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// BackupApplianceBackupConfig captures the backup configuration for +// applications that are protected by Backup Appliances. +message BackupApplianceBackupConfig { + // The name of the backup appliance. + string backup_appliance_name = 1; + + // The ID of the backup appliance. + int64 backup_appliance_id = 2; + + // The ID of the SLA of this application. + int64 sla_id = 3; + + // The name of the application. + string application_name = 4; + + // The name of the host where the application is running. + string host_name = 5; + + // The name of the SLT associated with the application. + string slt_name = 6; + + // The name of the SLP associated with the application. + string slp_name = 7; +} + +// DataSourceGcpResource is used for protected resources that are Google Cloud +// Resources. This name is easeier to understand than GcpResourceDataSource or +// GcpDataSourceResource +message DataSourceGcpResource { + // gcp_Properties has properties of the Google Cloud Resource. + oneof gcp_resource_properties { + // ComputeInstanceDataSourceProperties has a subset of Compute Instance + // properties that are useful at the Datasource level. + ComputeInstanceDataSourceProperties compute_instance_datasource_properties = + 4; + + // Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + // SQL Instance properties that are useful at the Datasource level. + CloudSqlInstanceDataSourceProperties + cloud_sql_instance_datasource_properties = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB + // cluster properties that are useful at the Datasource level. Currently + // none of its child properties are auditable. If new auditable properties + // are added, the AUDIT annotation should be added. + AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = + 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // DiskDataSourceProperties has a subset of Disk properties that are useful + // at the Datasource level. + DiskDataSourceProperties disk_datasource_properties = 7; + } + + // Output only. Full resource pathname URL of the source Google Cloud + // resource. + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // The type of the Google Cloud resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// BackupApplianceApplication describes a Source Resource when it is an +// application backed up by a BackupAppliance. +message DataSourceBackupApplianceApplication { + // The name of the Application as known to the Backup Appliance. + string application_name = 1; + + // Appliance name. + string backup_appliance = 2; + + // Appliance Id of the Backup Appliance. + int64 appliance_id = 3; + + // The type of the application. e.g. VMBackup + string type = 4; + + // The appid field of the application within the Backup Appliance. + int64 application_id = 8; + + // Hostname of the host where the application is running. + string hostname = 6; + + // Hostid of the application host. + int64 host_id = 7; +} + +// ServiceLockInfo represents the details of a lock taken by the service on a +// Backup resource. +message ServiceLockInfo { + // Output only. The name of the operation that created this lock. + // The lock will automatically be released when the operation completes. + string operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupApplianceLockInfo contains metadata about the backupappliance that +// created the lock. +message BackupApplianceLockInfo { + // The information about this lock. + oneof lock_source { + // The job name on the backup/recovery appliance that created this lock. + string job_name = 6; + + // The image name that depends on this Backup. + string backup_image = 7; + + // The SLA on the backup/recovery appliance that owns the lock. + int64 sla_id = 8; + } + + // Required. The ID of the backup/recovery appliance that created this lock. + int64 backup_appliance_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the backup/recovery appliance that created this lock. + string backup_appliance_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + // value of this string is only meaningful to the client and it is not + // interpreted by the BackupVault service. + string lock_reason = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// BackupLock represents a single lock on a Backup resource. An unexpired +// lock on a Backup prevents the Backup from being deleted. +message BackupLock { + // Metadata about the owner and reason for the lock. + oneof ClientLockInfo { + // If the client is a backup and recovery appliance, this + // contains metadata about why the lock exists. + BackupApplianceLockInfo backup_appliance_lock_info = 3; + + // Output only. Contains metadata about the lock exist for Google Cloud + // native backups. + ServiceLockInfo service_lock_info = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Required. The time after which this lock is not considered valid and will + // no longer protect the Backup from deletion. + google.protobuf.Timestamp lock_until_time = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message describing a Backup object. +message Backup { + option (google.api.resource) = { + type: "backupdr.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // GCPBackupPlanInfo captures the plan configuration details of Google Cloud + // resources at the time of backup. + message GCPBackupPlanInfo { + // Resource name of backup plan by which workload is protected at the time + // of the backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The rule id of the backup plan which triggered this backup in case of + // scheduled backup or used for + string backup_plan_rule_id = 2; + + // Resource name of the backup plan revision which triggered this backup in + // case of scheduled backup or used for on demand backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId} + string backup_plan_revision_name = 3; + + // The user friendly id of the backup plan revision which triggered this + // backup in case of scheduled backup or used for on demand backup. + string backup_plan_revision_id = 4; + } + + // Holds the state of the backup resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup has been created and is fully usable. + ACTIVE = 2; + + // The backup is being deleted. + DELETING = 3; + + // The backup is experiencing an issue and might be unusable. + ERROR = 4; + + // The backup is being uploaded. + UPLOADING = 5; + } + + // Type of the backup, scheduled or ondemand. + enum BackupType { + // Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // Scheduled backup. + SCHEDULED = 1; + + // On demand backup. + ON_DEMAND = 2; + + // Operational backup. + ON_DEMAND_OPERATIONAL = 3; + } + + // Workload specific backup properties. + oneof backup_properties { + // Output only. Compute Engine specific backup properties. + ComputeInstanceBackupProperties compute_instance_backup_properties = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud SQL specific backup properties. + CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Backup Appliance specific backup properties. + BackupApplianceBackupProperties backup_appliance_backup_properties = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDB specific backup properties. + AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Disk specific backup properties. + DiskBackupProperties disk_backup_properties = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Configuration Info has the resource format-specific configuration. + oneof plan_info { + // Output only. Configuration for a Google Cloud resource. + GCPBackupPlanInfo gcp_backup_plan_info = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Resource that is being backed up. + oneof source_resource { + // Output only. Unique identifier of the GCP resource that is being backed + // up. + BackupGcpResource gcp_resource = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. Name of the backup to create. It must have the + // format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + // `{backup}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The description of the Backup instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The backup can not be deleted before this time. + optional google.protobuf.Timestamp enforced_retention_end_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Setting for how the enforced retention end time is inherited. + // This value is copied from this backup's BackupVault. + optional BackupVault.BackupRetentionInheritance backup_retention_inheritance = + 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When this backup is automatically expired. + optional google.protobuf.Timestamp expire_time = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The point in time when this backup was captured from the + // source. + optional google.protobuf.Timestamp consistency_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag to prevent updates from overwriting each + // other. + optional string etag = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Backup resource instance state. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of BackupLocks taken by the service to prevent the + // deletion of the backup. + repeated BackupLock service_locks = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of BackupLocks taken by the accessor Backup Appliance. + repeated BackupLock backup_appliance_locks = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Type of the backup, unspecified, scheduled or ondemand. + BackupType backup_type = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. source resource size in bytes at the time of the backup. + int64 resource_size_bytes = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. Reserved for future use. + optional bool satisfies_pzs = 24 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Output only. Reserved for future use. + optional bool satisfies_pzi = 25 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Output only. The list of KMS key versions used to encrypt the + // backup. + repeated string kms_key_versions = 33 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; +} + +// Message for creating a BackupVault. +message CreateBackupVaultRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Required. ID of the requesting object + // If auto-generating ID server-side, remove this field and + // backup_vault_id from the method_signature of Create RPC + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing backupvault stores. +message ListBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault. + BackupVaultView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing BackupVaults. +message ListBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for fetching usable BackupVaults. +message FetchUsableBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for fetching usable BackupVaults. +message FetchUsableBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeRequest { + // Required. Datasources are the parent resource for the backups. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Required. The type of the GCP resource. + // Ex: sqladmin.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of Backups to return. The service may + // return fewer than this value. If unspecified, at most 50 + // Backups will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchBackupsForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchBackupsForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * name + // * state + // * backup_type + // * create_time + // * expire_time + // * enforced_retention_end_time + // * gcp_backup_plan_info.backup_plan + // * cloud_sql_instance_backup_properties.instance_tier + // * cloud_sql_instance_backup_properties.database_installed_version + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This parameter is used to specify the view of the backup. + // If not specified, the default view is BASIC. + BackupView view = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeResponse { + // The Backups from the specified parent. + repeated Backup backups = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for getting a BackupVault. +message GetBackupVaultRequest { + // Required. Name of the backupvault store resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault + BackupVaultView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a BackupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // BackupVault resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will not check plan duration against backup vault + // enforcement duration. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, we will force update access restriction even if + // some non compliant data sources are present. The default is 'false'. + bool force_update_access_restriction = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a BackupVault. +message DeleteBackupVaultRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, any data source from this backup vault will also + // be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // The current etag of the backup vault. + // If an etag is provided and does not match the current etag of the + // connection, deletion will be blocked. + string etag = 4; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true and the BackupVault is not found, the request will + // succeed but no action will be taken. + bool allow_missing = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, backupvault deletion will proceed even if there + // are backup plans referencing the backupvault. The default is 'false'. + bool ignore_backup_plan_references = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing DataSources. +message ListDataSourcesRequest { + // Required. The project and location for which to retrieve data + // sources information, in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + // DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing DataSources. +message ListDataSourcesResponse { + // The list of DataSource instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated DataSource data_sources = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a DataSource instance. +message GetDataSourceRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; +} + +// Request message for updating a data source instance. +message UpdateDataSourceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // DataSource resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + DataSource data_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Enable upsert. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing Backups. +message ListBackupsRequest { + // Required. The project and location for which to retrieve backup + // information, in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + // DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing Backups. +message ListBackupsResponse { + // The list of Backup instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated Backup backups = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a Backup. +message GetBackupRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a Backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Backup. +message DeleteBackupRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for restoring from a Backup. +message RestoreBackupRequest { + // The target environment for the restore operation. + oneof target_environment { + // Compute Engine target environment to be used during restore. + ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + + // Disk target environment to be used during restore. + DiskTargetEnvironment disk_target_environment = 5; + + // Region disk target environment to be used during restore. + RegionDiskTargetEnvironment region_disk_target_environment = 6; + } + + // The property overrides for the instance being restored. + oneof instance_properties { + // Compute Engine instance properties to be overridden during restore. + ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + + // Disk properties to be overridden during restore. + DiskRestoreProperties disk_restore_properties = 7; + } + + // Required. The resource name of the Backup instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. A field mask used to clear server-side default values + // for fields within the `instance_properties` oneof. + // + // When a field in this mask is cleared, the server will not apply its + // default logic (like inheriting a value from the source) for that field. + // + // The most common current use case is clearing default encryption keys. + // + // Examples of field mask paths: + // - Compute Instance Disks: + // `compute_instance_restore_properties.disks.*.disk_encryption_key` + // - Single Disk: `disk_restore_properties.disk_encryption_key` + optional google.protobuf.FieldMask clear_overrides_field_mask = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for restoring from a Backup. +message RestoreBackupResponse { + // Details of the target resource created/modified as part of restore. + TargetResource target_resource = 1; +} + +// Details of the target resource created/modified as part of restore. +message TargetResource { + // Minimum details to identify the restored resource. + oneof target_resource_info { + // Details of the native Google Cloud resource created as part of restore. + GcpResource gcp_resource = 1; + } +} + +// Minimum details to identify a Google Cloud resource +message GcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// Minimum details to identify a Google Cloud resource for a backup. +message BackupGcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_alloydb.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_alloydb.proto new file mode 100644 index 000000000000..f43963293d3f --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_alloydb.proto @@ -0,0 +1,112 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultAlloyDBProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "alloydb.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" + plural: "clusters" + singular: "cluster" +}; + +// AlloyDBClusterDataSourceProperties represents the properties of a +// AlloyDB cluster resource that are stored in the DataSource. +// . +message AlloyDBClusterDataSourceProperties { + // Output only. Name of the AlloyDB cluster backed up by the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } + ]; + + // Output only. Point in time recovery windows. + // The order is guaranteed to be ascending by start time. + repeated AlloyDbPitrWindow pitr_windows = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The cluster UID of the AlloyDB cluster backed up by the + // datasource. + string cluster_uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AlloyDBClusterDataSourceReferenceProperties represents the properties of an +// AlloyDB cluster that are stored in the DataSourceReference. +message AlloyDBClusterDataSourceReferenceProperties { + // Output only. Name of the AlloyDB cluster backed up by the datasource. + // Format: + // projects/{project}/locations/{location}/clusters/{cluster} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } + ]; +} + +// Point in time recovery window for an AlloyDB cluster. +message AlloyDbPitrWindow { + // Output only. The start time of the PITR window. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time of the PITR window. It is not set if the + // corresponding Backup Plan Association is active. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Log retention days for the PITR window. + int64 log_retention_days = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AlloyDbClusterBackupProperties represents AlloyDB cluster +// backup properties. +// . +message AlloyDbClusterBackupProperties { + // An optional text description for the backup. + optional string description = 1; + + // Output only. Storage usage of this particular backup + int64 stored_bytes = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The chain id of this backup. Backups belonging to the same + // chain are sharing the same chain id. This property is calculated and + // maintained by BackupDR. + string chain_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PostgreSQL major version of the AlloyDB cluster when the + // 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/google/cloud/backupdr/v1beta/backupvault_ba.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_ba.proto new file mode 100644 index 000000000000..7e43bac3e048 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_ba.proto @@ -0,0 +1,49 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultBaProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// BackupApplianceBackupProperties represents BackupDR backup appliance's +// properties. +message BackupApplianceBackupProperties { + // Output only. The numeric generation ID of the backup (monotonically + // increasing). + optional int32 generation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this backup object was finalized (if none, + // backup is not finalized). + optional google.protobuf.Timestamp finalize_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The earliest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_start_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The latest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_end_time = 4 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto new file mode 100644 index 000000000000..36d0adcb88ba --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto @@ -0,0 +1,146 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultCloudSqlProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "sqladmin.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" +}; + +// CloudSqlInstanceDataSourceProperties represents the properties of a +// Cloud SQL resource that are stored in the DataSource. +message CloudSqlInstanceDataSourceProperties { + // Output only. Name of the Cloud SQL instance backed up by the datasource. + // Format: + // projects/{project}/instances/{instance} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The installed database version of the Cloud SQL instance. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceBackupProperties represents Cloud SQL Instance +// Backup properties. +message CloudSqlInstanceBackupProperties { + // Output only. The installed database version of the Cloud SQL instance + // when the backup was taken. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the backup is a final backup. + bool final_backup = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The source instance of the backup. + // Format: + // projects/{project}/instances/{instance} + string source_instance = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance delete timestamp. + google.protobuf.Timestamp instance_delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceDataSourceReferenceProperties represents the properties of a +// Cloud SQL resource that are stored in the DataSourceReference. +message CloudSqlInstanceDataSourceReferenceProperties { + // Output only. Name of the Cloud SQL instance backed up by the datasource. + // Format: + // projects/{project}/instances/{instance} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The installed database version of the Cloud SQL instance. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceInitializationConfig contains the configuration for +// initializing a Cloud SQL instance. +message CloudSqlInstanceInitializationConfig { + // The edition of the Cloud SQL instance. For details, see + // https://cloud.google.com/sql/docs/editions-intro. + enum Edition { + // Unspecified edition. + EDITION_UNSPECIFIED = 0; + + // Enterprise edition. + ENTERPRISE = 1; + + // Enterprise Plus edition. + ENTERPRISE_PLUS = 2; + } + + // Required. The edition of the Cloud SQL instance. + Edition edition = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Cloud SQL instance's BPA properties. +message CloudSqlInstanceBackupPlanAssociationProperties { + // Output only. The time when the instance was created. + google.protobuf.Timestamp instance_create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_disk.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_disk.proto new file mode 100644 index 000000000000..bcd62219c853 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_disk.proto @@ -0,0 +1,280 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_gce.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultDiskProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/StoragePool" + pattern: "projects/{project}/zones/{zone}/storagePools/{storage_pool}" +}; + +// DiskTargetEnvironment represents the target environment for the disk. +message DiskTargetEnvironment { + // Required. Target project for the disk. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target zone for the disk. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the disk restore. + optional bool use_project_service_account = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// RegionDiskTargetEnvironment represents the target environment for the disk. +message RegionDiskTargetEnvironment { + // Required. Target project for the disk. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target region for the disk. + string region = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target URLs of the replica zones for the disk. + repeated string replica_zones = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the disk restore. + optional bool use_project_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DiskRestoreProperties represents the properties of a Disk restore. +message DiskRestoreProperties { + // The supported access modes of the disk. + enum AccessMode { + // The default AccessMode, means the disk can be attached to single instance + // in RW mode. + READ_WRITE_SINGLE = 0; + + // The AccessMode means the disk can be attached to multiple instances in RW + // mode. + READ_WRITE_MANY = 1; + + // The AccessMode means the disk can be attached to multiple instances in RO + // mode. + READ_ONLY_MANY = 2; + } + + // Architecture of the source disk. + enum Architecture { + // Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0; + + // Disks with architecture X86_64 + X86_64 = 1; + + // Disks with architecture ARM64 + ARM64 = 2; + } + + // Specifies the source of the restore. + // This is required for selective or cross-workload restores. + oneof source_options { + // Options for creating a disk from a source Compute Instance backup. + RestoreDiskFromInstanceOptions instance_backup_source = 19; + } + + // Required. Name of the disk. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The size of the disk in GB. + optional int64 size_gb = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of publicly available licenses that are applicable to this + // backup. This is applicable if the original image had licenses attached, + // e.g. Windows image + repeated string licenses = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable in the guest operating system. This + // is applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts the disk using a + // customer-supplied encryption key or a customer-managed encryption key. + optional CustomerEncryptionKey disk_encryption_key = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Physical block size of the persistent disk, in bytes. + // If not present in a request, a default value is used. + // Currently, the supported size is 4096. + optional int64 physical_block_size_bytes = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates how many IOPS to provision for the disk. This sets the + // number of I/O operations per second that the disk can handle. + optional int64 provisioned_iops = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates how much throughput to provision for the disk. This + // sets the number of throughput MB per second that the disk can handle. + optional int64 provisioned_throughput = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether this disk is using confidential compute mode. + // Encryption with a Cloud KMS key is required to enable this option. + optional bool enable_confidential_compute = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The storage pool in which the new disk is created. You can + // provide this as a partial or full URL to the resource. + optional string storage_pool = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "compute.googleapis.com/StoragePool" + } + ]; + + // Optional. The access mode of the disk. + optional AccessMode access_mode = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The architecture of the source disk. Valid values are + // ARM64 or X86_64. + optional Architecture architecture = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource policies applied to this disk. + repeated string resource_policy = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Required. URL of the disk type resource describing which disk type to use + // to create the disk. + optional string type = 16 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Labels to apply to this disk. These can be modified later using + // setLabels method. Label values can be empty. + map labels = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource manager tags to be bound to the disk. + map resource_manager_tags = 18 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for creating a disk from a source Compute Instance backup. +message RestoreDiskFromInstanceOptions { + // Required: The disk to be restored from the instance backup. + oneof source_disk { + // The device name of the disk to restore from the VM backup. + string source_device_name = 1; + + // Set to true to restore the boot disk from the instance backup. + // This field should only be set to true if selected. + bool boot_disk = 2; + } +} + +// DiskBackupProperties represents the properties of a Disk backup. +message DiskBackupProperties { + // Architecture of the source disk. + enum Architecture { + // Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0; + + // Disks with architecture X86_64 + X86_64 = 1; + + // Disks with architecture ARM64 + ARM64 = 2; + } + + // A description of the source disk. + optional string description = 1; + + // A list of publicly available licenses that are applicable to this backup. + // This is applicable if the original image had licenses attached, e.g. + // Windows image. + repeated string licenses = 2; + + // A list of guest OS features that are applicable to this backup. + repeated GuestOsFeature guest_os_feature = 3; + + // The architecture of the source disk. Valid values are + // ARM64 or X86_64. + optional Architecture architecture = 4; + + // The URL of the type of the disk. + optional string type = 5; + + // Size(in GB) of the source disk. + optional int64 size_gb = 6; + + // Region and zone are mutually exclusive fields. + // The URL of the region of the source disk. + optional string region = 7; + + // The URL of the Zone where the source disk. + optional string zone = 8; + + // The URL of the Zones where the source disk should be replicated. + repeated string replica_zones = 9; + + // The source disk used to create this backup. + optional string source_disk = 10; + + // The access mode of the source disk. + optional string access_mode = 11; + + // The number of IOPS provisioned for the source disk. + optional int64 provisioned_iops = 12; + + // The number of throughput provisioned for the source disk. + optional int64 provisioned_throughput = 13; + + // The physical block size of the source disk. + optional int64 physical_block_size_bytes = 14; + + // Indicates whether the source disk is using confidential compute mode. + optional bool enable_confidential_compute = 15; + + // The storage pool of the source disk. + optional string storage_pool = 16; + + // The labels of the source disk. + map labels = 17; + + // Optional. Defines if the guest flush is enabled for the source disk. + // Default value is false. + bool guest_flush = 18 [(google.api.field_behavior) = OPTIONAL]; +} + +// DiskDataSourceProperties represents the properties of a +// Disk resource that are stored in the DataSource. +// . +message DiskDataSourceProperties { + // Name of the disk backed up by the datasource. + string name = 1; + + // The description of the disk. + string description = 2; + + // The type of the disk. + string type = 3; + + // The size of the disk in GB. + int64 size_gb = 4; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_gce.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_gce.proto new file mode 100644 index 000000000000..9c1b1b347948 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/backupvault_gce.proto @@ -0,0 +1,967 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultGceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// Specifies whether the virtual machine instance will be shut down on key +// revocation. It is currently used in instance, instance properties and GMI +// protos +enum KeyRevocationActionType { + // Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + + // Indicates user chose no operation. + NONE = 1; + + // Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2; +} + +// ComputeInstanceBackupProperties represents Compute Engine instance backup +// properties. +message ComputeInstanceBackupProperties { + // An optional text description for the instances that are created from these + // properties. + optional string description = 1; + + // A list of tags to apply to the instances that are created from these + // properties. The tags identify valid sources or targets for network + // firewalls. The setTags method can modify this list of tags. Each tag within + // the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + optional Tags tags = 2; + + // The machine type to use for instances that are created from these + // properties. + optional string machine_type = 3; + + // Enables instances created based on these properties to send packets with + // source IP addresses other than their own and receive packets with + // destination IP addresses other than their own. If these instances will be + // used as an IP gateway or it will be set as the next-hop in a Route + // resource, specify `true`. If unsure, leave this set to `false`. See the + // https://cloud.google.com/vpc/docs/using-routes#canipforward + // documentation for more information. + optional bool can_ip_forward = 4; + + // An array of network access configurations for this interface. + repeated NetworkInterface network_interface = 5; + + // An array of disks that are associated with the instances that are created + // from these properties. + repeated AttachedDisk disk = 6; + + // The metadata key/value pairs to assign to instances that are created from + // these properties. These pairs can consist of custom metadata or predefined + // keys. See https://cloud.google.com/compute/docs/metadata/overview for more + // information. + optional Metadata metadata = 7; + + // A list of service accounts with specified scopes. Access tokens for these + // service accounts are available to the instances that are created from + // these properties. Use metadata queries to obtain the access tokens for + // these instances. + repeated ServiceAccount service_account = 8; + + // Specifies the scheduling options for the instances that are created from + // these properties. + optional Scheduling scheduling = 9; + + // A list of guest accelerator cards' type and count to use for instances + // created from these properties. + repeated AcceleratorConfig guest_accelerator = 10; + + // Minimum cpu/platform to be used by instances. The instance may be + // scheduled on the specified or newer cpu/platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + // For more information, read + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + optional string min_cpu_platform = 11; + + // KeyRevocationActionType of the instance. Supported options are "STOP" and + // "NONE". The default value is "NONE" if it is not specified. + optional KeyRevocationActionType key_revocation_action_type = 12; + + // The source instance used to create this backup. This can be a partial or + // full URL to the resource. For example, the following are valid values: + // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + // -projects/project/zones/zone/instances/instance + optional string source_instance = 13; + + // Labels to apply to instances that are created from these properties. + map labels = 14; + + // Optional. Indicates whether to perform a guest flush operation before + // taking a compute backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceRestoreProperties represents Compute Engine instance +// properties to be overridden during restore. +message ComputeInstanceRestoreProperties { + // The private IPv6 google access type for the VMs. + enum InstancePrivateIpv6GoogleAccess { + // Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // Each network interface inherits PrivateIpv6GoogleAccess from its + // subnetwork. + INHERIT_FROM_SUBNETWORK = 1; + + // Outbound private IPv6 access from VMs in this subnet to Google services. + // If specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + + // Bidirectional private IPv6 access to/from Google services. If + // specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + } + + // Required. Name of the compute instance. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Controls for advanced machine-related behavior features. + optional AdvancedMachineFeatures advanced_machine_features = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allows this instance to send and receive packets with + // non-matching destination or source IPs. + optional bool can_ip_forward = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls Confidential compute options on the instance + optional ConfidentialInstanceConfig confidential_instance_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the resource should be protected against deletion. + optional bool deletion_protection = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. Source regional persistent + // disks will be restored with default replica zones if not specified. + repeated AttachedDisk disks = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables display device for the instance. + optional DisplayDevice display_device = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of the type and count of accelerator cards attached to the + // instance. + repeated AcceleratorConfig guest_accelerators = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the hostname of the instance. The specified hostname + // must be RFC1035 compliant. If hostname is not specified, the default + // hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + // DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + // DNS. + optional string hostname = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts suspended data for an instance with a + // customer-managed encryption key. + optional CustomerEncryptionKey instance_encryption_key = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. KeyRevocationActionType of the instance. + optional KeyRevocationActionType key_revocation_action_type = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to apply to this instance. + map labels = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full or partial URL of the machine type resource to use for this + // instance. + optional string machine_type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This includes custom metadata and predefined keys. + optional Metadata metadata = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum CPU platform to use for this instance. + optional string min_cpu_platform = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of network configurations for this instance. These + // specify how interfaces are configured to interact with other network + // services, such as connecting to the internet. Multiple interfaces are + // supported per instance. Required to restore in different project or region. + repeated NetworkInterface network_interfaces = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configure network performance such as egress bandwidth tier. + optional NetworkPerformanceConfig network_performance_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Input only. Additional params passed with the request, but not persisted + // as part of resource payload. + optional InstanceParams params = 19 + [(google.api.field_behavior) = INPUT_ONLY]; + + // Optional. The private IPv6 google access type for the VM. + // If not specified, use INHERIT_FROM_SUBNETWORK as default. + optional InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the reservations that this instance can consume from. + optional AllocationAffinity allocation_affinity = 21 [ + json_name = "reservationAffinity", + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Resource policies applied to this instance. + // By default, no resource policies will be applied. + repeated string resource_policies = 22 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sets the scheduling options for this instance. + optional Scheduling scheduling = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of service accounts, with their specified scopes, + // authorized for this instance. Only one service account per VM instance is + // supported. + repeated ServiceAccount service_accounts = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Tags to apply to this instance. Tags are used to identify valid + // sources or targets for network firewalls and are specified by the client + // during instance creation. + optional Tags tags = 26 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceTargetEnvironment represents Compute Engine target +// environment to be used during restore. +message ComputeInstanceTargetEnvironment { + // Required. Target project for the Compute Engine instance. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zone of the Compute Engine instance. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the Compute Engine + // instance restore. + optional bool use_project_service_account = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceDataSourceProperties represents the properties of a +// ComputeEngine resource that are stored in the DataSource. +message ComputeInstanceDataSourceProperties { + // Name of the compute instance backed up by the datasource. + string name = 1; + + // The description of the Compute Engine instance. + string description = 2; + + // The machine type of the instance. + string machine_type = 3; + + // The total number of disks attached to the Instance. + int64 total_disk_count = 4; + + // The sum of all the disk sizes. + int64 total_disk_size_gb = 5; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // Optional. Whether to enable nested virtualization or not (default is + // false). + optional bool enable_nested_virtualization = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number + // of threads supported per core by the underlying processor is + // assumed. + optional int32 threads_per_core = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of physical cores to expose to an instance. Multiply + // by the number of threads per core to compute the total number of virtual + // CPUs to expose to the instance. If unset, the number of cores is + // inferred from the instance's nominal CPU count and the underlying + // platform's SMT width. + optional int32 visible_core_count = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable UEFI networking for instance creation. + optional bool enable_uefi_networking = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Confidential Instance options. +message ConfidentialInstanceConfig { + // Optional. Defines whether the instance should have confidential compute + // enabled. + optional bool enable_confidential_compute = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Display Device options +message DisplayDevice { + // Optional. Enables display for the Compute Engine VM + optional bool enable_display = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Network performance configuration. +message NetworkPerformanceConfig { + // Network performance tier. + enum Tier { + // This value is unused. + TIER_UNSPECIFIED = 0; + + // Default network performance config. + DEFAULT = 1; + + // Tier 1 network performance config. + TIER_1 = 2; + } + + // Optional. The tier of the total egress bandwidth. + optional Tier total_egress_bandwidth_tier = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional instance params. +message InstanceParams { + // Optional. Resource manager tags to be bound to the instance. + map resource_manager_tags = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Feature type of the Guest OS. +message GuestOsFeature { + // List of the Feature Types. + enum FeatureType { + // Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0; + + // VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1; + + // WINDOWS feature type. + WINDOWS = 2; + + // MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3; + + // UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4; + + // SECURE_BOOT feature type. + SECURE_BOOT = 5; + + // GVNIC feature type. + GVNIC = 6; + + // SEV_CAPABLE feature type. + SEV_CAPABLE = 7; + + // BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8; + + // SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9; + + // SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10; + + // SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11; + + // TDX_CAPABLE feature type. + TDX_CAPABLE = 12; + + // IDPF feature type. + IDPF = 13; + + // SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14; + } + + // The ID of a supported feature. + optional FeatureType type = 1; +} + +// Specifies the reservations that this instance can consume from. +message AllocationAffinity { + // Indicates whether to consume from a reservation or not. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any allocation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Specifies the type of reservation from which this instance can + // consume + optional Type consume_allocation_type = 1 [ + json_name = "consumeReservationType", + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Corresponds to the label key of a reservation resource. + optional string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of a reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A specification of the type and number of accelerator cards attached to the +// instance. +message AcceleratorConfig { + // Optional. Full or partial URL of the accelerator type resource to attach to + // this instance. + optional string accelerator_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of the guest accelerator cards exposed to this + // instance. + optional int32 accelerator_count = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A customer-supplied encryption key. +message CustomerEncryptionKey { + // The key to use for encryption. + oneof key { + // Optional. Specifies a 256-bit customer-supplied + // encryption key. + string raw_key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RSA-wrapped 2048-bit + // customer-supplied encryption key to either encrypt or decrypt this + // resource. + string rsa_encrypted_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the encryption key that is stored in Google Cloud + // KMS. + string kms_key_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The service account being used for the encryption request for the + // given KMS key. If absent, the Compute Engine default service account is + // used. + optional string kms_key_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A key/value pair to be used for storing metadata. +message Entry { + // Optional. Key for the metadata entry. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Value for the metadata entry. These are free-form strings, and + // only have meaning as interpreted by the image running in the instance. The + // only restriction placed on values is that their size must be less than + // or equal to 262144 bytes (256 KiB). + optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A metadata key/value entry. +message Metadata { + // Optional. Array of key/value pairs. The total size of all keys and values + // must be less than 512 KB. + repeated Entry items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A network interface resource attached to an instance. +// s +message NetworkInterface { + // Stack type for this network interface. + enum StackType { + // Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0; + + // The network interface will be assigned IPv4 address. + IPV4_ONLY = 1; + + // The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2; + } + + // IPv6 access type for this network interface. + enum Ipv6AccessType { + // IPv6 access type not set. Means this network interface hasn't been + // turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + + // This network interface can have internal IPv6. + INTERNAL = 1; + + // This network interface can have external IPv6. + EXTERNAL = 2; + } + + // Nic type for this network interface. + enum NicType { + // Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Optional. URL of the VPC network resource for this instance. + optional string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the Subnetwork resource for this instance. + optional string subnetwork = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An IPv4 internal IP address to assign to the instance for this + // network interface. If not specified by the user, an unused internal IP is + // assigned by the system. + optional string ip_address = 3 [ + json_name = "networkIP", + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. An IPv6 internal network address for this network interface. To + // use a static internal IP address, it must be unused and in the same region + // as the instance's zone. If not specified, Google Cloud will automatically + // assign an internal IPv6 address from the instance's subnetwork. + optional string ipv6_address = 4 [ + (google.api.field_info).format = IPV6, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The prefix length of the primary internal IPv6 range. + optional int32 internal_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. [Output Only] The name of the network interface, which is + // generated by the server. + optional string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An array of configurations for this interface. Currently, only + // one access config,ONE_TO_ONE_NAT is supported. If there are no + // accessConfigs specified, then this instance will have + // no external internet access. + repeated AccessConfig access_configs = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of IPv6 access configurations for this interface. + // Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + // is no ipv6AccessConfig specified, then this instance will + // have no external IPv6 Internet access. + repeated AccessConfig ipv6_access_configs = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of alias IP ranges for this network interface. + // You can only specify this field for network interfaces in VPC networks. + repeated AliasIpRange alias_ip_ranges = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // The stack type for this network interface. + optional StackType stack_type = 10; + + // Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + // IP can be accessed from the Internet. This field is always inherited from + // its subnetwork. + optional Ipv6AccessType ipv6_access_type = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The networking queue count that's specified by users for the + // network interface. Both Rx and Tx queues will be set to this number. It'll + // be empty if not specified by the users. + optional int32 queue_count = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC + // or VirtioNet. + optional NicType nic_type = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the network attachment that this interface should + // connect to in the following format: + // projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. + optional string network_attachment = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An access configuration attached to an instance's network interface. +// Only one access config per instance is supported. +message AccessConfig { + // The type of configuration. + enum AccessType { + // Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0; + + // ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1; + + // Direct IPv6 access. + DIRECT_IPV6 = 2; + } + + // Network tier property used by addresses, instances and forwarding rules. + enum NetworkTier { + // Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0; + + // High quality, Google-grade network tier, support for all networking + // products. + PREMIUM = 1; + + // Public internet quality, only limited support for other networking + // products. + STANDARD = 2; + } + + // Optional. In accessConfigs (IPv4), the + // default and only option is ONE_TO_ONE_NAT. In + // ipv6AccessConfigs, the default and only option is + // DIRECT_IPV6. + optional AccessType type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of this access configuration. + optional string name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IP address of this access configuration. + optional string external_ip = 3 + [json_name = "natIP", (google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IPv6 address of this access configuration. + optional string external_ipv6 = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix length of the external IPv6 range. + optional int32 external_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether a public DNS 'PTR' record should be created to + // map the external IP address of the instance to a DNS domain name. + optional bool set_public_ptr = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The DNS domain name for the public PTR record. + optional string public_ptr_domain_name = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This signifies the networking tier used for configuring this + // access + optional NetworkTier network_tier = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An alias IP range attached to an instance's network interface. +message AliasIpRange { + // Optional. The IP alias ranges to allocate for this interface. + optional string ip_cidr_range = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a subnetwork secondary IP range from which to + // allocate an IP alias range. If not specified, the primary range of the + // subnetwork is used. + optional string subnetwork_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Sets the scheduling options for an Instance. +message Scheduling { + // Node Affinity: the configuration of desired nodes onto which this Instance + // could be scheduled. + message NodeAffinity { + // Defines the type of node selections. + enum Operator { + // Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0; + + // Requires Compute Engine to seek for matched nodes. + IN = 1; + + // Requires Compute Engine to avoid certain nodes. + NOT_IN = 2; + } + + // Optional. Corresponds to the label key of Node resource. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the operation of node selection. + optional Operator operator = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of Node resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the maintenance behavior for this instance= + enum OnHostMaintenance { + // Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + + // Tells Compute Engine to terminate and (optionally) restart the instance + // away from the maintenance activity. + TERMINATE = 1; + + // Default, Allows Compute Engine to automatically migrate instances + // out of the way of maintenance events. + MIGRATE = 1000; + } + + // Defines the provisioning model for an instance. + enum ProvisioningModel { + // Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0; + + // Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1; + + // Heavily discounted, no guaranteed runtime. + SPOT = 2; + } + + // Defines the supported termination actions for an instance. + enum InstanceTerminationAction { + // Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + + // Delete the VM. + DELETE = 1; + + // Stop the VM without storing in-memory content. default action. + STOP = 2; + } + + // Optional. Defines the maintenance behavior for this instance. + optional OnHostMaintenance on_host_maintenance = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the instance should be automatically restarted + // if it is terminated by Compute Engine (not terminated by a user). + optional bool automatic_restart = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines whether the instance is preemptible. + optional bool preemptible = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of node affinity and anti-affinity configurations. + // Overrides reservationAffinity. + repeated NodeAffinity node_affinities = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum number of virtual CPUs this instance will consume + // when running on a sole-tenant node. + optional int32 min_node_cpus = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the provisioning model of the instance. + optional ProvisioningModel provisioning_model = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the termination action for the instance. + optional InstanceTerminationAction instance_termination_action = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + // while recovery of the Local Ssd state is attempted. Its value should be in + // between 0 and 168 hours with hour granularity and the default value being 1 + // hour. + optional SchedulingDuration local_ssd_recovery_timeout = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A SchedulingDuration represents a fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". Range is approximately 10,000 years. +message SchedulingDuration { + // Optional. Span of time at a resolution of a second. + optional int64 seconds = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Span of time that's a fraction of a second at nanosecond + // resolution. + optional int32 nanos = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A service account. +message ServiceAccount { + // Optional. Email address of the service account. + optional string email = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of scopes to be made available for this service account. + repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of instance tags. +message Tags { + // Optional. An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + repeated string items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An instance-attached disk resource. +message AttachedDisk { + // Specifies the parameters to initialize this disk. + message InitializeParams { + // Optional. Specifies the disk name. If not specified, the default is to + // use the name of the instance. + optional string disk_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URL of the zone where the disk should be created. + // Required for each regional disk associated with the instance. + repeated string replica_zones = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // List of the Disk Types. + enum DiskType { + // Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0; + + // A scratch disk type. + SCRATCH = 1; + + // A persistent disk type. + PERSISTENT = 2; + } + + // List of the Disk Modes. + enum DiskMode { + // Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0; + + // Attaches this disk in read-write mode. Only one + // virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1; + + // Attaches this disk in read-only mode. Multiple virtual machines can use + // a disk in read-only mode at a time. + READ_ONLY = 2; + + // The disk is locked for administrative reasons. Nobody else + // can use the disk. This mode is used (for example) when taking + // a snapshot of a disk to prevent mounting the disk while it is + // being snapshotted. + LOCKED = 3; + } + + // List of the Disk Interfaces. + enum DiskInterface { + // Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0; + + // SCSI Disk Interface. + SCSI = 1; + + // NVME Disk Interface. + NVME = 2; + + // NVDIMM Disk Interface. + NVDIMM = 3; + + // ISCSI Disk Interface. + ISCSI = 4; + } + + // List of the states of the Disk. + enum DiskSavedState { + // Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0; + + // Disk state has been preserved. + PRESERVED = 1; + } + + // Optional. Specifies the parameters to initialize this disk. + optional InitializeParams initialize_params = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is used as an identifier for the disks. This is the unique + // name has to provided to modify disk parameters like disk_name and + // replica_zones (in case of RePDs) + optional string device_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the resource. + optional string kind = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the type of the disk. + optional DiskType disk_type_deprecated = 6 [deprecated = true]; + + // Optional. The mode in which to attach this disk. + optional DiskMode mode = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a valid partial or full URL to an existing Persistent + // Disk resource. + optional string source = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A zero-based index to this disk, where 0 is reserved for the + // boot disk. + optional int64 index = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates that this is a boot disk. The virtual machine will use + // the first partition of the disk for its root filesystem. + optional bool boot = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the disk will be auto-deleted when the instance + // is deleted (but not when the disk is detached from the instance). + optional bool auto_delete = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Any valid publicly visible licenses. + repeated string license = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the disk interface to use for attaching this disk. + optional DiskInterface disk_interface = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable on the guest operating system. + // Applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts or decrypts a disk using a customer-supplied + // encryption key. + optional CustomerEncryptionKey disk_encryption_key = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the disk in GB. + optional int64 disk_size_gb = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. The state of the disk. + optional DiskSavedState saved_state = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Output only. The URI of the disk type resource. For example: + // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + optional string disk_type = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Specifies the type of the disk. + optional DiskType type = 19 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/bindingmatchingresource.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/bindingmatchingresource.proto new file mode 100644 index 000000000000..076ed92fb0ee --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/bindingmatchingresource.proto @@ -0,0 +1,181 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BindingMatchingResourceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// Request message for getting a BindingMatchingResource. +message GetBindingMatchingResourceRequest { + // Required. The name of the matching resource to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BindingMatchingResource" + } + ]; +} + +// Request message for List BindingMatchingResources. +message ListBindingMatchingResourcesRequest { + // Required. The project, location, auto protection policy and binding for + // which to retrieve `BindingMatchingResources` information. Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + // In Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BindingMatchingResource" + } + ]; + + // Optional. The maximum number of `BindingMatchingResources` to return in a + // single response. The default page size is 100 and maximum page size is 200. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token] + // received from a previous `ListBindingMatchingResources` call. Provide this + // to retrieve the subsequent page in a multi-page list of results. When + // paginating, all other parameters provided to `ListBindingMatchingResources` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BindingMatchingResources`. +message ListBindingMatchingResourcesResponse { + // The list of `BindingMatchingResources` in the project,location for the + // specified binding. + repeated BindingMatchingResource matching_resources = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token] + // in a subsequent `ListBindingMatchingResources` call to retrieve the next + // page of results. If this field is omitted or empty, then there are no more + // results to return. + string next_page_token = 2; +} + +// BindingMatchingResource contains the details of a resource that matches the +// criteria of a binding. +message BindingMatchingResource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BindingMatchingResource" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}" + plural: "bindingMatchingResources" + singular: "bindingMatchingResource" + }; + + // Identifier. The resource name of the `BindingMatchingResource`. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. Resource name of the workload that matches the + // criteria of the binding. + // + // The format can be either a relative resource name (e.g., + // `projects/my-project/zones/us-central1-a/instances/my-instance`) or a + // schemeless full resource name (e.g., + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`). + string resource = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The timestamp when the resource was last evaluated for + // protection. + google.protobuf.Timestamp last_evaluation_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The auto protection details of the resource from the current + // binding's perspective. + AutoProtectionDetails auto_protection_details = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AutoProtectionDetails contains the protection details of a resource from the +// current binding's perspective. +message AutoProtectionDetails { + // Enum for protection state of the resource. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Resource is protected. + PROTECTED = 1; + + // Resource protection failed. + PROTECTION_FAILED = 2; + + // Resource is being unprotected. + UNPROTECTING = 3; + + // Resource unprotection failed. + UNPROTECTION_FAILED = 4; + } + + // Output only. Protection state of the resource from the current binding's + // perspective. Output only. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of backup plan association linked to the + // resource, if any. Format: + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string backup_plan_association = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Output only. Resource name of the datasource linked to the resource, if + // any. Format: + // projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId} + string data_source = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Output only. Error during last sync for protection/unprotection, if any. + google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/datasourcereference.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/datasourcereference.proto new file mode 100644 index 000000000000..ff4a391e7f80 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/datasourcereference.proto @@ -0,0 +1,255 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "DataSourceReferenceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// DataSourceReference is a reference to a DataSource resource. +message DataSourceReference { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSourceReference" + pattern: "projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}" + plural: "dataSourceReferences" + singular: "dataSourceReference" + }; + + // Identifier. The resource name of the DataSourceReference. + // Format: + // projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The resource name of the DataSource. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource} + string data_source = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Output only. The time when the DataSourceReference was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The backup configuration state of the DataSource. + BackupConfigState data_source_backup_config_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of backups in the DataSource. + int64 data_source_backup_count = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information of backup configuration on the DataSource. + DataSourceBackupConfigInfo data_source_backup_config_info = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google Cloud resource that the DataSource is associated + // with. + DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources for the + // referenced datasource. + optional int64 total_stored_bytes = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information of backup configuration on the DataSource. +message DataSourceBackupConfigInfo { + // Output only. The status of the last backup in this DataSource + BackupConfigInfo.LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last successful backup to this DataSource. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The Google Cloud resource that the DataSource is associated with. +message DataSourceGcpResourceInfo { + // The properties of the Google Cloud resource. + oneof resource_properties { + // Output only. The properties of the Cloud SQL instance. + CloudSqlInstanceDataSourceReferenceProperties + cloud_sql_instance_properties = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The properties of the AlloyDB cluster. + AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the Google Cloud resource. + // Ex: projects/{project}/zones/{zone}/instances/{instance} + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the Google Cloud resource. + // Ex: compute.googleapis.com/Instance + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location of the Google Cloud resource. + // Ex: //"global"/"unspecified" + string location = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for the GetDataSourceReference method. +message GetDataSourceReferenceRequest { + // Required. The name of the DataSourceReference to retrieve. + // Format: + // projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSourceReference" + } + ]; +} + +// Request for the ListDataSourceReferences method. +message ListDataSourceReferencesRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSourceReference" + } + ]; + + // Optional. The maximum number of DataSourceReferences to return. The service + // may return fewer than this value. If unspecified, at most 50 + // DataSourceReferences will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataSourceReferences` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDataSourceReferences` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. + // + // The following field and operator combinations are supported: + // + // * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + // * data_source_gcp_resource_info.type with `=`, `!=` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // + // * data_source + // * data_source_gcp_resource_info.gcp_resourcename + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the ListDataSourceReferences method. +message ListDataSourceReferencesResponse { + // The DataSourceReferences from the specified parent. + repeated DataSourceReference data_source_references = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the FetchDataSourceReferencesForResourceType method. +message FetchDataSourceReferencesForResourceTypeRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSourceReference" + } + ]; + + // Required. The type of the Google Cloud resource. + // Ex: sql.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of DataSourceReferences to return. The service + // may return fewer than this value. If unspecified, at most 50 + // DataSourceReferences will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchDataSourceReferencesForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchDataSourceReferencesForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * data_source + // * data_source_gcp_resource_info.gcp_resourcename + // * data_source_backup_config_state + // * data_source_backup_count + // * data_source_backup_config_info.last_backup_state + // * data_source_gcp_resource_info.gcp_resourcename + // * data_source_gcp_resource_info.type + // * data_source_gcp_resource_info.location + // * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchDataSourceReferencesForResourceType method. +message FetchDataSourceReferencesForResourceTypeResponse { + // The DataSourceReferences from the specified parent. + repeated DataSourceReference data_source_references = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/protection_summary.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/protection_summary.proto new file mode 100644 index 000000000000..48980ea53f91 --- /dev/null +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1beta/protection_summary.proto @@ -0,0 +1,324 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.backupdr.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "ProtectionSummaryProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// The Protection Summary service. +service BackupDrProtectionSummary { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-backupdr," + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ResourceBackupConfigs. + rpc ListResourceBackupConfigs(ListResourceBackupConfigsRequest) + returns (ListResourceBackupConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/resourceBackupConfigs" + }; + option (google.api.method_signature) = "parent"; + } + +} + +// Request for ListResourceBackupConfigs. +message ListResourceBackupConfigsRequest { + // Required. The project and location for which to retrieve resource backup + // configs. Format: 'projects/{project_id}/locations/{location}'. In Google + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will use 100 as default. Maximum value is + // 500 and values above 500 will be coerced to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListResourceBackupConfigs. +message ListResourceBackupConfigsResponse { + // The list of ResourceBackupConfigs for the specified scope. + repeated ResourceBackupConfig resource_backup_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// ResourceBackupConfig represents a resource along with its backup +// configurations. +message ResourceBackupConfig { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ResourceBackupConfig" + pattern: "projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}" + plural: "resourceBackupConfigs" + singular: "resourceBackupConfig" + }; + + // The type of the cloud resource. + enum ResourceType { + // Resource type not set. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // Cloud SQL instance. + CLOUD_SQL_INSTANCE = 1; + + // Compute Engine VM. + COMPUTE_ENGINE_VM = 2; + + // Compute Engine Disk. + COMPUTE_ENGINE_DISK = 3; + + // Compute Engine Regional Disk. + COMPUTE_ENGINE_REGIONAL_DISK = 4; + } + + // Identifier. The resource name of the ResourceBackupConfig. + // Format: + // projects/{project}/locations/{location}/resourceBackupConfigs/{uid} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The unique identifier of the resource backup config. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the cloud resource that this configuration applies to. Supported + // resource types are + // [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType]. + string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The human friendly name of the target resource. + string target_resource_display_name = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the target resource. + ResourceType target_resource_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with the target resource. + map target_resource_labels = 6; + + // Backup configurations applying to the target resource, including those + // targeting its related/child resources. For example, backup configuration + // applicable to Compute Engine disks will be populated in this field for a + // Compute Engine VM which has the disk associated. + repeated BackupConfigDetails backup_configs_details = 7; + + // Output only. Whether the target resource is configured for backup. This is + // true if the backup_configs_details is not empty. + bool backup_configured = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the target resource is protected by a backup vault. + // This is true if the backup_configs_details is not empty and any of the + // [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details] + // has a backup configuration with + // [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault] + // set. + bool vaulted = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupConfigDetails has information about how the resource is configured +// for backups and about the most recent backup taken for this configuration. +message BackupConfigDetails { + // Type of the backup configuration. + // This enum may receive new values in the future. + enum Type { + // Backup config type is unspecified. + TYPE_UNSPECIFIED = 0; + + // Backup config is Cloud SQL instance's automated backup config. + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1; + + // Backup config is Compute Engine Resource Policy. + COMPUTE_ENGINE_RESOURCE_POLICY = 2; + + // Backup config is Google Cloud Backup and DR's Backup Plan. + BACKUPDR_BACKUP_PLAN = 3; + + // Backup config is Google Cloud Backup and DR's Template. + BACKUPDR_TEMPLATE = 4; + } + + // The state tells whether the backup config is active or not. + enum State { + // Backup config state not set. + STATE_UNSPECIFIED = 0; + + // The config is in an active state protecting the resource + ACTIVE = 1; + + // The config is currently not protecting the resource. Either because it is + // disabled or the owning project has been deleted without cleanup of the + // actual resource. + INACTIVE = 2; + + // The config still exists but because of some error state it is not + // protecting the resource. Like the source project is deleted. For eg. + // PlanAssociation, BackupPlan is deleted. + ERROR = 3; + } + + // The plan specific config. This depends on the value of + // [BackupConfigDetails.type][google.cloud.backupdr.v1beta.BackupConfigDetails.type]. + // For type=BACKUPDR_BACKUP_PLAN, backup_dr_plan_config would be populated to + // capture information related to Google Cloud Backup and DR's Backup Plans. + // For type=BACKUPDR_TEMPLATE, backup_dr_template_config would be populated to + // capture information related to Google Cloud Backup and DR's Template + // details. + oneof plan_specific_config { + // Google Cloud Backup and DR's Backup Plan specific data. + BackupDrPlanConfig backup_dr_plan_config = 10; + + // Google Cloud Backup and DR's Template specific data. + BackupDrTemplateConfig backup_dr_template_config = 11; + } + + // Output only. The full resource name of the backup config source resource. + // For example, + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}" + // or + // "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}". + string backup_config_source = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the backup config source resource. + string backup_config_source_display_name = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the backup config resource. + Type type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the backup config resource. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Point in time recovery settings of the backup configuration + // resource. + PitrSettings pitr_settings = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the latest successful backup created via this + // backup configuration. + google.protobuf.Timestamp latest_successful_backup_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the resource that is applicable for the backup configuration. Example: + // "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}" + string applicable_resource = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the backup vault that will store the backups generated through this + // backup configuration. Example: + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}" + string backup_vault = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The locations where the backups are to be stored. + repeated BackupLocation backup_locations = 12; +} + +// Point in time recovery settings of the backup configuration resource. +message PitrSettings { + // Output only. Number of days to retain the backup. + int32 retention_days = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Provides additional information about Google Cloud Backup and DR's Template +// backup configuration. +message BackupDrTemplateConfig { + // Output only. The URI of the BackupDr template resource for the first party + // identity users. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the BackupDr template resource for the third party + // identity users. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupDrPlanConfig has additional information about Google Cloud Backup and +// DR's Plan backup configuration. +message BackupDrPlanConfig { + // Backup rules of the backup plan resource. + repeated BackupDrPlanRule backup_dr_plan_rules = 1; +} + +// BackupDrPlanRule has rule specific information of the backup plan resource. +message BackupDrPlanRule { + // Output only. Unique Id of the backup rule. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the latest successful backup created via this + // backup rule. + google.protobuf.Timestamp last_successful_backup_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupLocation represents a cloud location where a backup can be stored. +message BackupLocation { + // The type of the location. + enum Type { + // Location type is unspecified. + TYPE_UNSPECIFIED = 0; + + // Location type is zonal. + ZONAL = 1; + + // Location type is regional. + REGIONAL = 2; + + // Location type is multi regional. + MULTI_REGIONAL = 3; + } + + // Output only. The type of the location. + Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The id of the cloud location. Example: "us-central1" + string location_id = 2 [(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 742b375e0ea6..484c30934ec2 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -17021,6 +17021,21075 @@ export namespace google { } } } + + /** Namespace v1beta. */ + namespace v1beta { + + /** Properties of an AppliedAutoProtectionPolicy. */ + interface IAppliedAutoProtectionPolicy { + + /** AppliedAutoProtectionPolicy name */ + name?: (string|null); + + /** AppliedAutoProtectionPolicy sourceBinding */ + sourceBinding?: (string|null); + + /** AppliedAutoProtectionPolicy criteria */ + criteria?: (google.cloud.backupdr.v1beta.ICriteria|null); + + /** AppliedAutoProtectionPolicy backupPlanDetails */ + backupPlanDetails?: (google.cloud.backupdr.v1beta.IBackupPlanDetail[]|null); + + /** AppliedAutoProtectionPolicy updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AppliedAutoProtectionPolicy createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AppliedAutoProtectionPolicy bindingEvaluationSummary */ + bindingEvaluationSummary?: (google.cloud.backupdr.v1beta.IBindingEvaluationSummary|null); + + /** AppliedAutoProtectionPolicy status */ + status?: (google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State|keyof typeof google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State|null); + } + + /** Represents an AppliedAutoProtectionPolicy. */ + class AppliedAutoProtectionPolicy implements IAppliedAutoProtectionPolicy { + + /** + * Constructs a new AppliedAutoProtectionPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy); + + /** AppliedAutoProtectionPolicy name. */ + public name: string; + + /** AppliedAutoProtectionPolicy sourceBinding. */ + public sourceBinding: string; + + /** AppliedAutoProtectionPolicy criteria. */ + public criteria?: (google.cloud.backupdr.v1beta.ICriteria|null); + + /** AppliedAutoProtectionPolicy backupPlanDetails. */ + public backupPlanDetails: google.cloud.backupdr.v1beta.IBackupPlanDetail[]; + + /** AppliedAutoProtectionPolicy updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AppliedAutoProtectionPolicy createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AppliedAutoProtectionPolicy bindingEvaluationSummary. */ + public bindingEvaluationSummary?: (google.cloud.backupdr.v1beta.IBindingEvaluationSummary|null); + + /** AppliedAutoProtectionPolicy status. */ + public status: (google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State|keyof typeof google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State); + + /** + * Creates a new AppliedAutoProtectionPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AppliedAutoProtectionPolicy instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy): google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; + + /** + * Encodes the specified AppliedAutoProtectionPolicy message. Does not implicitly {@link google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.verify|verify} messages. + * @param message AppliedAutoProtectionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppliedAutoProtectionPolicy message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.verify|verify} messages. + * @param message AppliedAutoProtectionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppliedAutoProtectionPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppliedAutoProtectionPolicy + * @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.v1beta.AppliedAutoProtectionPolicy; + + /** + * Decodes an AppliedAutoProtectionPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppliedAutoProtectionPolicy + * @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.v1beta.AppliedAutoProtectionPolicy; + + /** + * Verifies an AppliedAutoProtectionPolicy 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 AppliedAutoProtectionPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppliedAutoProtectionPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; + + /** + * Creates a plain object from an AppliedAutoProtectionPolicy message. Also converts values to other types if specified. + * @param message AppliedAutoProtectionPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppliedAutoProtectionPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppliedAutoProtectionPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AppliedAutoProtectionPolicy { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETION_INITIATED = 3 + } + } + + /** Properties of a ListAppliedAutoProtectionPoliciesRequest. */ + interface IListAppliedAutoProtectionPoliciesRequest { + + /** ListAppliedAutoProtectionPoliciesRequest parent */ + parent?: (string|null); + + /** ListAppliedAutoProtectionPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListAppliedAutoProtectionPoliciesRequest pageToken */ + pageToken?: (string|null); + + /** ListAppliedAutoProtectionPoliciesRequest filter */ + filter?: (string|null); + + /** ListAppliedAutoProtectionPoliciesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAppliedAutoProtectionPoliciesRequest. */ + class ListAppliedAutoProtectionPoliciesRequest implements IListAppliedAutoProtectionPoliciesRequest { + + /** + * Constructs a new ListAppliedAutoProtectionPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest); + + /** ListAppliedAutoProtectionPoliciesRequest parent. */ + public parent: string; + + /** ListAppliedAutoProtectionPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListAppliedAutoProtectionPoliciesRequest pageToken. */ + public pageToken: string; + + /** ListAppliedAutoProtectionPoliciesRequest filter. */ + public filter: string; + + /** ListAppliedAutoProtectionPoliciesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAppliedAutoProtectionPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAppliedAutoProtectionPoliciesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest): google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; + + /** + * Encodes the specified ListAppliedAutoProtectionPoliciesRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.verify|verify} messages. + * @param message ListAppliedAutoProtectionPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAppliedAutoProtectionPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.verify|verify} messages. + * @param message ListAppliedAutoProtectionPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAppliedAutoProtectionPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAppliedAutoProtectionPoliciesRequest + * @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.v1beta.ListAppliedAutoProtectionPoliciesRequest; + + /** + * Decodes a ListAppliedAutoProtectionPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAppliedAutoProtectionPoliciesRequest + * @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.v1beta.ListAppliedAutoProtectionPoliciesRequest; + + /** + * Verifies a ListAppliedAutoProtectionPoliciesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAppliedAutoProtectionPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAppliedAutoProtectionPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; + + /** + * Creates a plain object from a ListAppliedAutoProtectionPoliciesRequest message. Also converts values to other types if specified. + * @param message ListAppliedAutoProtectionPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAppliedAutoProtectionPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAppliedAutoProtectionPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAppliedAutoProtectionPoliciesResponse. */ + interface IListAppliedAutoProtectionPoliciesResponse { + + /** ListAppliedAutoProtectionPoliciesResponse appliedAutoProtectionPolicies */ + appliedAutoProtectionPolicies?: (google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[]|null); + + /** ListAppliedAutoProtectionPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAppliedAutoProtectionPoliciesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAppliedAutoProtectionPoliciesResponse. */ + class ListAppliedAutoProtectionPoliciesResponse implements IListAppliedAutoProtectionPoliciesResponse { + + /** + * Constructs a new ListAppliedAutoProtectionPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse); + + /** ListAppliedAutoProtectionPoliciesResponse appliedAutoProtectionPolicies. */ + public appliedAutoProtectionPolicies: google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[]; + + /** ListAppliedAutoProtectionPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAppliedAutoProtectionPoliciesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAppliedAutoProtectionPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAppliedAutoProtectionPoliciesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse): google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; + + /** + * Encodes the specified ListAppliedAutoProtectionPoliciesResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.verify|verify} messages. + * @param message ListAppliedAutoProtectionPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAppliedAutoProtectionPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.verify|verify} messages. + * @param message ListAppliedAutoProtectionPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAppliedAutoProtectionPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAppliedAutoProtectionPoliciesResponse + * @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.v1beta.ListAppliedAutoProtectionPoliciesResponse; + + /** + * Decodes a ListAppliedAutoProtectionPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAppliedAutoProtectionPoliciesResponse + * @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.v1beta.ListAppliedAutoProtectionPoliciesResponse; + + /** + * Verifies a ListAppliedAutoProtectionPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAppliedAutoProtectionPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAppliedAutoProtectionPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; + + /** + * Creates a plain object from a ListAppliedAutoProtectionPoliciesResponse message. Also converts values to other types if specified. + * @param message ListAppliedAutoProtectionPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAppliedAutoProtectionPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAppliedAutoProtectionPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoProtectionPolicy. */ + interface IAutoProtectionPolicy { + + /** AutoProtectionPolicy name */ + name?: (string|null); + + /** AutoProtectionPolicy description */ + description?: (string|null); + + /** AutoProtectionPolicy backupPlanDetails */ + backupPlanDetails?: (google.cloud.backupdr.v1beta.IBackupPlanDetail[]|null); + + /** AutoProtectionPolicy criteria */ + criteria?: (google.cloud.backupdr.v1beta.ICriteria|null); + + /** AutoProtectionPolicy state */ + state?: (google.cloud.backupdr.v1beta.AutoProtectionPolicy.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionPolicy.State|null); + + /** AutoProtectionPolicy etag */ + etag?: (string|null); + + /** AutoProtectionPolicy bindingSummary */ + bindingSummary?: (google.cloud.backupdr.v1beta.IBindingSummary|null); + + /** AutoProtectionPolicy policyEvaluationSummary */ + policyEvaluationSummary?: (google.cloud.backupdr.v1beta.IPolicyEvaluationSummary|null); + + /** AutoProtectionPolicy createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicy updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AutoProtectionPolicy. */ + class AutoProtectionPolicy implements IAutoProtectionPolicy { + + /** + * Constructs a new AutoProtectionPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAutoProtectionPolicy); + + /** AutoProtectionPolicy name. */ + public name: string; + + /** AutoProtectionPolicy description. */ + public description: string; + + /** AutoProtectionPolicy backupPlanDetails. */ + public backupPlanDetails: google.cloud.backupdr.v1beta.IBackupPlanDetail[]; + + /** AutoProtectionPolicy criteria. */ + public criteria?: (google.cloud.backupdr.v1beta.ICriteria|null); + + /** AutoProtectionPolicy state. */ + public state: (google.cloud.backupdr.v1beta.AutoProtectionPolicy.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionPolicy.State); + + /** AutoProtectionPolicy etag. */ + public etag: string; + + /** AutoProtectionPolicy bindingSummary. */ + public bindingSummary?: (google.cloud.backupdr.v1beta.IBindingSummary|null); + + /** AutoProtectionPolicy policyEvaluationSummary. */ + public policyEvaluationSummary?: (google.cloud.backupdr.v1beta.IPolicyEvaluationSummary|null); + + /** AutoProtectionPolicy createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicy updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new AutoProtectionPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoProtectionPolicy instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAutoProtectionPolicy): google.cloud.backupdr.v1beta.AutoProtectionPolicy; + + /** + * Encodes the specified AutoProtectionPolicy message. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionPolicy.verify|verify} messages. + * @param message AutoProtectionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAutoProtectionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoProtectionPolicy message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionPolicy.verify|verify} messages. + * @param message AutoProtectionPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAutoProtectionPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoProtectionPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoProtectionPolicy + * @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.v1beta.AutoProtectionPolicy; + + /** + * Decodes an AutoProtectionPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoProtectionPolicy + * @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.v1beta.AutoProtectionPolicy; + + /** + * Verifies an AutoProtectionPolicy 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 AutoProtectionPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoProtectionPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AutoProtectionPolicy; + + /** + * Creates a plain object from an AutoProtectionPolicy message. Also converts values to other types if specified. + * @param message AutoProtectionPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AutoProtectionPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoProtectionPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoProtectionPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutoProtectionPolicy { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + UPDATING = 3, + DELETING = 4 + } + } + + /** Properties of a BackupPlanDetail. */ + interface IBackupPlanDetail { + + /** BackupPlanDetail resourceType */ + resourceType?: (string|null); + + /** BackupPlanDetail backupPlan */ + backupPlan?: (string|null); + } + + /** Represents a BackupPlanDetail. */ + class BackupPlanDetail implements IBackupPlanDetail { + + /** + * Constructs a new BackupPlanDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupPlanDetail); + + /** BackupPlanDetail resourceType. */ + public resourceType: string; + + /** BackupPlanDetail backupPlan. */ + public backupPlan: string; + + /** + * Creates a new BackupPlanDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanDetail instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupPlanDetail): google.cloud.backupdr.v1beta.BackupPlanDetail; + + /** + * Encodes the specified BackupPlanDetail message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanDetail.verify|verify} messages. + * @param message BackupPlanDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupPlanDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanDetail message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanDetail.verify|verify} messages. + * @param message BackupPlanDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupPlanDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanDetail + * @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.v1beta.BackupPlanDetail; + + /** + * Decodes a BackupPlanDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanDetail + * @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.v1beta.BackupPlanDetail; + + /** + * Verifies a BackupPlanDetail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupPlanDetail; + + /** + * Creates a plain object from a BackupPlanDetail message. Also converts values to other types if specified. + * @param message BackupPlanDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupPlanDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Criteria. */ + interface ICriteria { + + /** Criteria matchingConditions */ + matchingConditions?: (google.cloud.backupdr.v1beta.IMatchingCondition[]|null); + } + + /** Represents a Criteria. */ + class Criteria implements ICriteria { + + /** + * Constructs a new Criteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICriteria); + + /** Criteria matchingConditions. */ + public matchingConditions: google.cloud.backupdr.v1beta.IMatchingCondition[]; + + /** + * Creates a new Criteria instance using the specified properties. + * @param [properties] Properties to set + * @returns Criteria instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICriteria): google.cloud.backupdr.v1beta.Criteria; + + /** + * Encodes the specified Criteria message. Does not implicitly {@link google.cloud.backupdr.v1beta.Criteria.verify|verify} messages. + * @param message Criteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Criteria message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Criteria.verify|verify} messages. + * @param message Criteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Criteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Criteria + * @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.v1beta.Criteria; + + /** + * Decodes a Criteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Criteria + * @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.v1beta.Criteria; + + /** + * Verifies a Criteria message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Criteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Criteria + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Criteria; + + /** + * Creates a plain object from a Criteria message. Also converts values to other types if specified. + * @param message Criteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Criteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Criteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Criteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MatchingCondition. */ + interface IMatchingCondition { + + /** MatchingCondition labelCondition */ + labelCondition?: (google.cloud.backupdr.v1beta.IKeyValuePair|null); + } + + /** Represents a MatchingCondition. */ + class MatchingCondition implements IMatchingCondition { + + /** + * Constructs a new MatchingCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IMatchingCondition); + + /** MatchingCondition labelCondition. */ + public labelCondition?: (google.cloud.backupdr.v1beta.IKeyValuePair|null); + + /** MatchingCondition condition. */ + public condition?: "labelCondition"; + + /** + * Creates a new MatchingCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns MatchingCondition instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IMatchingCondition): google.cloud.backupdr.v1beta.MatchingCondition; + + /** + * Encodes the specified MatchingCondition message. Does not implicitly {@link google.cloud.backupdr.v1beta.MatchingCondition.verify|verify} messages. + * @param message MatchingCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IMatchingCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MatchingCondition message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.MatchingCondition.verify|verify} messages. + * @param message MatchingCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IMatchingCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MatchingCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MatchingCondition + * @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.v1beta.MatchingCondition; + + /** + * Decodes a MatchingCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MatchingCondition + * @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.v1beta.MatchingCondition; + + /** + * Verifies a MatchingCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MatchingCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MatchingCondition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.MatchingCondition; + + /** + * Creates a plain object from a MatchingCondition message. Also converts values to other types if specified. + * @param message MatchingCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.MatchingCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MatchingCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MatchingCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PolicyEvaluationSummary. */ + interface IPolicyEvaluationSummary { + + /** PolicyEvaluationSummary matchingResourceCount */ + matchingResourceCount?: (number|Long|string|null); + + /** PolicyEvaluationSummary protectedResourceCount */ + protectedResourceCount?: (number|Long|string|null); + + /** PolicyEvaluationSummary failedResourceCount */ + failedResourceCount?: (number|Long|string|null); + } + + /** Represents a PolicyEvaluationSummary. */ + class PolicyEvaluationSummary implements IPolicyEvaluationSummary { + + /** + * Constructs a new PolicyEvaluationSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IPolicyEvaluationSummary); + + /** PolicyEvaluationSummary matchingResourceCount. */ + public matchingResourceCount: (number|Long|string); + + /** PolicyEvaluationSummary protectedResourceCount. */ + public protectedResourceCount: (number|Long|string); + + /** PolicyEvaluationSummary failedResourceCount. */ + public failedResourceCount: (number|Long|string); + + /** + * Creates a new PolicyEvaluationSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyEvaluationSummary instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IPolicyEvaluationSummary): google.cloud.backupdr.v1beta.PolicyEvaluationSummary; + + /** + * Encodes the specified PolicyEvaluationSummary message. Does not implicitly {@link google.cloud.backupdr.v1beta.PolicyEvaluationSummary.verify|verify} messages. + * @param message PolicyEvaluationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IPolicyEvaluationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyEvaluationSummary message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.PolicyEvaluationSummary.verify|verify} messages. + * @param message PolicyEvaluationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IPolicyEvaluationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyEvaluationSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyEvaluationSummary + * @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.v1beta.PolicyEvaluationSummary; + + /** + * Decodes a PolicyEvaluationSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyEvaluationSummary + * @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.v1beta.PolicyEvaluationSummary; + + /** + * Verifies a PolicyEvaluationSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyEvaluationSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyEvaluationSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.PolicyEvaluationSummary; + + /** + * Creates a plain object from a PolicyEvaluationSummary message. Also converts values to other types if specified. + * @param message PolicyEvaluationSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.PolicyEvaluationSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyEvaluationSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyEvaluationSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingSummary. */ + interface IBindingSummary { + + /** BindingSummary projectCount */ + projectCount?: (number|Long|string|null); + } + + /** Represents a BindingSummary. */ + class BindingSummary implements IBindingSummary { + + /** + * Constructs a new BindingSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBindingSummary); + + /** BindingSummary projectCount. */ + public projectCount: (number|Long|string); + + /** + * Creates a new BindingSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingSummary instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBindingSummary): google.cloud.backupdr.v1beta.BindingSummary; + + /** + * Encodes the specified BindingSummary message. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingSummary.verify|verify} messages. + * @param message BindingSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingSummary message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingSummary.verify|verify} messages. + * @param message BindingSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBindingSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingSummary + * @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.v1beta.BindingSummary; + + /** + * Decodes a BindingSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingSummary + * @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.v1beta.BindingSummary; + + /** + * Verifies a BindingSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BindingSummary; + + /** + * Creates a plain object from a BindingSummary message. Also converts values to other types if specified. + * @param message BindingSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BindingSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KeyValuePair. */ + interface IKeyValuePair { + + /** KeyValuePair key */ + key?: (string|null); + + /** KeyValuePair values */ + values?: (string[]|null); + } + + /** Represents a KeyValuePair. */ + class KeyValuePair implements IKeyValuePair { + + /** + * Constructs a new KeyValuePair. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IKeyValuePair); + + /** KeyValuePair key. */ + public key: string; + + /** KeyValuePair values. */ + public values: string[]; + + /** + * Creates a new KeyValuePair instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyValuePair instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IKeyValuePair): google.cloud.backupdr.v1beta.KeyValuePair; + + /** + * Encodes the specified KeyValuePair message. Does not implicitly {@link google.cloud.backupdr.v1beta.KeyValuePair.verify|verify} messages. + * @param message KeyValuePair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IKeyValuePair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyValuePair message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.KeyValuePair.verify|verify} messages. + * @param message KeyValuePair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IKeyValuePair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyValuePair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyValuePair + * @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.v1beta.KeyValuePair; + + /** + * Decodes a KeyValuePair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyValuePair + * @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.v1beta.KeyValuePair; + + /** + * Verifies a KeyValuePair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyValuePair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyValuePair + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.KeyValuePair; + + /** + * Creates a plain object from a KeyValuePair message. Also converts values to other types if specified. + * @param message KeyValuePair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.KeyValuePair, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyValuePair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyValuePair + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAutoProtectionPolicyRequest. */ + interface ICreateAutoProtectionPolicyRequest { + + /** CreateAutoProtectionPolicyRequest parent */ + parent?: (string|null); + + /** CreateAutoProtectionPolicyRequest autoProtectionPolicyId */ + autoProtectionPolicyId?: (string|null); + + /** CreateAutoProtectionPolicyRequest autoProtectionPolicy */ + autoProtectionPolicy?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicy|null); + } + + /** Represents a CreateAutoProtectionPolicyRequest. */ + class CreateAutoProtectionPolicyRequest implements ICreateAutoProtectionPolicyRequest { + + /** + * Constructs a new CreateAutoProtectionPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest); + + /** CreateAutoProtectionPolicyRequest parent. */ + public parent: string; + + /** CreateAutoProtectionPolicyRequest autoProtectionPolicyId. */ + public autoProtectionPolicyId: string; + + /** CreateAutoProtectionPolicyRequest autoProtectionPolicy. */ + public autoProtectionPolicy?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicy|null); + + /** + * Creates a new CreateAutoProtectionPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAutoProtectionPolicyRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest): google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; + + /** + * Encodes the specified CreateAutoProtectionPolicyRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.verify|verify} messages. + * @param message CreateAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAutoProtectionPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.verify|verify} messages. + * @param message CreateAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAutoProtectionPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAutoProtectionPolicyRequest + * @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.v1beta.CreateAutoProtectionPolicyRequest; + + /** + * Decodes a CreateAutoProtectionPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAutoProtectionPolicyRequest + * @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.v1beta.CreateAutoProtectionPolicyRequest; + + /** + * Verifies a CreateAutoProtectionPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAutoProtectionPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAutoProtectionPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; + + /** + * Creates a plain object from a CreateAutoProtectionPolicyRequest message. Also converts values to other types if specified. + * @param message CreateAutoProtectionPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAutoProtectionPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAutoProtectionPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAutoProtectionPolicyRequest. */ + interface IGetAutoProtectionPolicyRequest { + + /** GetAutoProtectionPolicyRequest name */ + name?: (string|null); + } + + /** Represents a GetAutoProtectionPolicyRequest. */ + class GetAutoProtectionPolicyRequest implements IGetAutoProtectionPolicyRequest { + + /** + * Constructs a new GetAutoProtectionPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest); + + /** GetAutoProtectionPolicyRequest name. */ + public name: string; + + /** + * Creates a new GetAutoProtectionPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutoProtectionPolicyRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest): google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; + + /** + * Encodes the specified GetAutoProtectionPolicyRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.verify|verify} messages. + * @param message GetAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutoProtectionPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.verify|verify} messages. + * @param message GetAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutoProtectionPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutoProtectionPolicyRequest + * @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.v1beta.GetAutoProtectionPolicyRequest; + + /** + * Decodes a GetAutoProtectionPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutoProtectionPolicyRequest + * @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.v1beta.GetAutoProtectionPolicyRequest; + + /** + * Verifies a GetAutoProtectionPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutoProtectionPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutoProtectionPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; + + /** + * Creates a plain object from a GetAutoProtectionPolicyRequest message. Also converts values to other types if specified. + * @param message GetAutoProtectionPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutoProtectionPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutoProtectionPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAutoProtectionPolicyRequest. */ + interface IUpdateAutoProtectionPolicyRequest { + + /** UpdateAutoProtectionPolicyRequest autoProtectionPolicy */ + autoProtectionPolicy?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicy|null); + + /** UpdateAutoProtectionPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAutoProtectionPolicyRequest. */ + class UpdateAutoProtectionPolicyRequest implements IUpdateAutoProtectionPolicyRequest { + + /** + * Constructs a new UpdateAutoProtectionPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest); + + /** UpdateAutoProtectionPolicyRequest autoProtectionPolicy. */ + public autoProtectionPolicy?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicy|null); + + /** UpdateAutoProtectionPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAutoProtectionPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAutoProtectionPolicyRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest): google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; + + /** + * Encodes the specified UpdateAutoProtectionPolicyRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.verify|verify} messages. + * @param message UpdateAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAutoProtectionPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.verify|verify} messages. + * @param message UpdateAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAutoProtectionPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAutoProtectionPolicyRequest + * @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.v1beta.UpdateAutoProtectionPolicyRequest; + + /** + * Decodes an UpdateAutoProtectionPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAutoProtectionPolicyRequest + * @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.v1beta.UpdateAutoProtectionPolicyRequest; + + /** + * Verifies an UpdateAutoProtectionPolicyRequest 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 UpdateAutoProtectionPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAutoProtectionPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; + + /** + * Creates a plain object from an UpdateAutoProtectionPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateAutoProtectionPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAutoProtectionPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAutoProtectionPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAutoProtectionPolicyRequest. */ + interface IDeleteAutoProtectionPolicyRequest { + + /** DeleteAutoProtectionPolicyRequest name */ + name?: (string|null); + + /** DeleteAutoProtectionPolicyRequest etag */ + etag?: (string|null); + } + + /** Represents a DeleteAutoProtectionPolicyRequest. */ + class DeleteAutoProtectionPolicyRequest implements IDeleteAutoProtectionPolicyRequest { + + /** + * Constructs a new DeleteAutoProtectionPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest); + + /** DeleteAutoProtectionPolicyRequest name. */ + public name: string; + + /** DeleteAutoProtectionPolicyRequest etag. */ + public etag: string; + + /** + * Creates a new DeleteAutoProtectionPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAutoProtectionPolicyRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest): google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; + + /** + * Encodes the specified DeleteAutoProtectionPolicyRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.verify|verify} messages. + * @param message DeleteAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAutoProtectionPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.verify|verify} messages. + * @param message DeleteAutoProtectionPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAutoProtectionPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAutoProtectionPolicyRequest + * @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.v1beta.DeleteAutoProtectionPolicyRequest; + + /** + * Decodes a DeleteAutoProtectionPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAutoProtectionPolicyRequest + * @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.v1beta.DeleteAutoProtectionPolicyRequest; + + /** + * Verifies a DeleteAutoProtectionPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAutoProtectionPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAutoProtectionPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; + + /** + * Creates a plain object from a DeleteAutoProtectionPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteAutoProtectionPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAutoProtectionPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAutoProtectionPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutoProtectionPoliciesRequest. */ + interface IListAutoProtectionPoliciesRequest { + + /** ListAutoProtectionPoliciesRequest parent */ + parent?: (string|null); + + /** ListAutoProtectionPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListAutoProtectionPoliciesRequest pageToken */ + pageToken?: (string|null); + + /** ListAutoProtectionPoliciesRequest filter */ + filter?: (string|null); + + /** ListAutoProtectionPoliciesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAutoProtectionPoliciesRequest. */ + class ListAutoProtectionPoliciesRequest implements IListAutoProtectionPoliciesRequest { + + /** + * Constructs a new ListAutoProtectionPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest); + + /** ListAutoProtectionPoliciesRequest parent. */ + public parent: string; + + /** ListAutoProtectionPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListAutoProtectionPoliciesRequest pageToken. */ + public pageToken: string; + + /** ListAutoProtectionPoliciesRequest filter. */ + public filter: string; + + /** ListAutoProtectionPoliciesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAutoProtectionPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutoProtectionPoliciesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest): google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; + + /** + * Encodes the specified ListAutoProtectionPoliciesRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.verify|verify} messages. + * @param message ListAutoProtectionPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutoProtectionPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.verify|verify} messages. + * @param message ListAutoProtectionPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutoProtectionPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutoProtectionPoliciesRequest + * @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.v1beta.ListAutoProtectionPoliciesRequest; + + /** + * Decodes a ListAutoProtectionPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutoProtectionPoliciesRequest + * @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.v1beta.ListAutoProtectionPoliciesRequest; + + /** + * Verifies a ListAutoProtectionPoliciesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutoProtectionPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutoProtectionPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; + + /** + * Creates a plain object from a ListAutoProtectionPoliciesRequest message. Also converts values to other types if specified. + * @param message ListAutoProtectionPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutoProtectionPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutoProtectionPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutoProtectionPoliciesResponse. */ + interface IListAutoProtectionPoliciesResponse { + + /** ListAutoProtectionPoliciesResponse autoProtectionPolicies */ + autoProtectionPolicies?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicy[]|null); + + /** ListAutoProtectionPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAutoProtectionPoliciesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAutoProtectionPoliciesResponse. */ + class ListAutoProtectionPoliciesResponse implements IListAutoProtectionPoliciesResponse { + + /** + * Constructs a new ListAutoProtectionPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse); + + /** ListAutoProtectionPoliciesResponse autoProtectionPolicies. */ + public autoProtectionPolicies: google.cloud.backupdr.v1beta.IAutoProtectionPolicy[]; + + /** ListAutoProtectionPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAutoProtectionPoliciesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAutoProtectionPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutoProtectionPoliciesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse): google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; + + /** + * Encodes the specified ListAutoProtectionPoliciesResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.verify|verify} messages. + * @param message ListAutoProtectionPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutoProtectionPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.verify|verify} messages. + * @param message ListAutoProtectionPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutoProtectionPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutoProtectionPoliciesResponse + * @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.v1beta.ListAutoProtectionPoliciesResponse; + + /** + * Decodes a ListAutoProtectionPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutoProtectionPoliciesResponse + * @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.v1beta.ListAutoProtectionPoliciesResponse; + + /** + * Verifies a ListAutoProtectionPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutoProtectionPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutoProtectionPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; + + /** + * Creates a plain object from a ListAutoProtectionPoliciesResponse message. Also converts values to other types if specified. + * @param message ListAutoProtectionPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutoProtectionPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutoProtectionPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoProtectionPolicyBinding. */ + interface IAutoProtectionPolicyBinding { + + /** AutoProtectionPolicyBinding name */ + name?: (string|null); + + /** AutoProtectionPolicyBinding description */ + description?: (string|null); + + /** AutoProtectionPolicyBinding state */ + state?: (google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State|null); + + /** AutoProtectionPolicyBinding scope */ + scope?: (string|null); + + /** AutoProtectionPolicyBinding bindingEvaluationSummary */ + bindingEvaluationSummary?: (google.cloud.backupdr.v1beta.IBindingEvaluationSummary|null); + + /** AutoProtectionPolicyBinding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicyBinding updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicyBinding etag */ + etag?: (string|null); + } + + /** Represents an AutoProtectionPolicyBinding. */ + class AutoProtectionPolicyBinding implements IAutoProtectionPolicyBinding { + + /** + * Constructs a new AutoProtectionPolicyBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding); + + /** AutoProtectionPolicyBinding name. */ + public name: string; + + /** AutoProtectionPolicyBinding description. */ + public description: string; + + /** AutoProtectionPolicyBinding state. */ + public state: (google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State); + + /** AutoProtectionPolicyBinding scope. */ + public scope: string; + + /** AutoProtectionPolicyBinding bindingEvaluationSummary. */ + public bindingEvaluationSummary?: (google.cloud.backupdr.v1beta.IBindingEvaluationSummary|null); + + /** AutoProtectionPolicyBinding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicyBinding updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** AutoProtectionPolicyBinding etag. */ + public etag: string; + + /** + * Creates a new AutoProtectionPolicyBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoProtectionPolicyBinding instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding): google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; + + /** + * Encodes the specified AutoProtectionPolicyBinding message. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.verify|verify} messages. + * @param message AutoProtectionPolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoProtectionPolicyBinding message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.verify|verify} messages. + * @param message AutoProtectionPolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoProtectionPolicyBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoProtectionPolicyBinding + * @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.v1beta.AutoProtectionPolicyBinding; + + /** + * Decodes an AutoProtectionPolicyBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoProtectionPolicyBinding + * @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.v1beta.AutoProtectionPolicyBinding; + + /** + * Verifies an AutoProtectionPolicyBinding 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 AutoProtectionPolicyBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoProtectionPolicyBinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; + + /** + * Creates a plain object from an AutoProtectionPolicyBinding message. Also converts values to other types if specified. + * @param message AutoProtectionPolicyBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoProtectionPolicyBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoProtectionPolicyBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutoProtectionPolicyBinding { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETION_INITIATED = 3 + } + } + + /** Properties of a BindingEvaluationSummary. */ + interface IBindingEvaluationSummary { + + /** BindingEvaluationSummary matchingResourceCount */ + matchingResourceCount?: (number|Long|string|null); + + /** BindingEvaluationSummary protectedResourceCount */ + protectedResourceCount?: (number|Long|string|null); + + /** BindingEvaluationSummary failedResourceCount */ + failedResourceCount?: (number|Long|string|null); + } + + /** Represents a BindingEvaluationSummary. */ + class BindingEvaluationSummary implements IBindingEvaluationSummary { + + /** + * Constructs a new BindingEvaluationSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBindingEvaluationSummary); + + /** BindingEvaluationSummary matchingResourceCount. */ + public matchingResourceCount: (number|Long|string); + + /** BindingEvaluationSummary protectedResourceCount. */ + public protectedResourceCount: (number|Long|string); + + /** BindingEvaluationSummary failedResourceCount. */ + public failedResourceCount: (number|Long|string); + + /** + * Creates a new BindingEvaluationSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingEvaluationSummary instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBindingEvaluationSummary): google.cloud.backupdr.v1beta.BindingEvaluationSummary; + + /** + * Encodes the specified BindingEvaluationSummary message. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingEvaluationSummary.verify|verify} messages. + * @param message BindingEvaluationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBindingEvaluationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingEvaluationSummary message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingEvaluationSummary.verify|verify} messages. + * @param message BindingEvaluationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBindingEvaluationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingEvaluationSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingEvaluationSummary + * @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.v1beta.BindingEvaluationSummary; + + /** + * Decodes a BindingEvaluationSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingEvaluationSummary + * @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.v1beta.BindingEvaluationSummary; + + /** + * Verifies a BindingEvaluationSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingEvaluationSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingEvaluationSummary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BindingEvaluationSummary; + + /** + * Creates a plain object from a BindingEvaluationSummary message. Also converts values to other types if specified. + * @param message BindingEvaluationSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BindingEvaluationSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingEvaluationSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingEvaluationSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAutoProtectionPolicyBindingRequest. */ + interface ICreateAutoProtectionPolicyBindingRequest { + + /** CreateAutoProtectionPolicyBindingRequest parent */ + parent?: (string|null); + + /** CreateAutoProtectionPolicyBindingRequest autoProtectionPolicyBindingId */ + autoProtectionPolicyBindingId?: (string|null); + + /** CreateAutoProtectionPolicyBindingRequest autoProtectionPolicyBinding */ + autoProtectionPolicyBinding?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding|null); + } + + /** Represents a CreateAutoProtectionPolicyBindingRequest. */ + class CreateAutoProtectionPolicyBindingRequest implements ICreateAutoProtectionPolicyBindingRequest { + + /** + * Constructs a new CreateAutoProtectionPolicyBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest); + + /** CreateAutoProtectionPolicyBindingRequest parent. */ + public parent: string; + + /** CreateAutoProtectionPolicyBindingRequest autoProtectionPolicyBindingId. */ + public autoProtectionPolicyBindingId: string; + + /** CreateAutoProtectionPolicyBindingRequest autoProtectionPolicyBinding. */ + public autoProtectionPolicyBinding?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding|null); + + /** + * Creates a new CreateAutoProtectionPolicyBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAutoProtectionPolicyBindingRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest): google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; + + /** + * Encodes the specified CreateAutoProtectionPolicyBindingRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message CreateAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAutoProtectionPolicyBindingRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message CreateAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAutoProtectionPolicyBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAutoProtectionPolicyBindingRequest + * @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.v1beta.CreateAutoProtectionPolicyBindingRequest; + + /** + * Decodes a CreateAutoProtectionPolicyBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAutoProtectionPolicyBindingRequest + * @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.v1beta.CreateAutoProtectionPolicyBindingRequest; + + /** + * Verifies a CreateAutoProtectionPolicyBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAutoProtectionPolicyBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAutoProtectionPolicyBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; + + /** + * Creates a plain object from a CreateAutoProtectionPolicyBindingRequest message. Also converts values to other types if specified. + * @param message CreateAutoProtectionPolicyBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAutoProtectionPolicyBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAutoProtectionPolicyBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAutoProtectionPolicyBindingRequest. */ + interface IGetAutoProtectionPolicyBindingRequest { + + /** GetAutoProtectionPolicyBindingRequest name */ + name?: (string|null); + } + + /** Represents a GetAutoProtectionPolicyBindingRequest. */ + class GetAutoProtectionPolicyBindingRequest implements IGetAutoProtectionPolicyBindingRequest { + + /** + * Constructs a new GetAutoProtectionPolicyBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest); + + /** GetAutoProtectionPolicyBindingRequest name. */ + public name: string; + + /** + * Creates a new GetAutoProtectionPolicyBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAutoProtectionPolicyBindingRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest): google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; + + /** + * Encodes the specified GetAutoProtectionPolicyBindingRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message GetAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAutoProtectionPolicyBindingRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message GetAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAutoProtectionPolicyBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAutoProtectionPolicyBindingRequest + * @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.v1beta.GetAutoProtectionPolicyBindingRequest; + + /** + * Decodes a GetAutoProtectionPolicyBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAutoProtectionPolicyBindingRequest + * @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.v1beta.GetAutoProtectionPolicyBindingRequest; + + /** + * Verifies a GetAutoProtectionPolicyBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAutoProtectionPolicyBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAutoProtectionPolicyBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; + + /** + * Creates a plain object from a GetAutoProtectionPolicyBindingRequest message. Also converts values to other types if specified. + * @param message GetAutoProtectionPolicyBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAutoProtectionPolicyBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAutoProtectionPolicyBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutoProtectionPolicyBindingsRequest. */ + interface IListAutoProtectionPolicyBindingsRequest { + + /** ListAutoProtectionPolicyBindingsRequest parent */ + parent?: (string|null); + + /** ListAutoProtectionPolicyBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListAutoProtectionPolicyBindingsRequest pageToken */ + pageToken?: (string|null); + + /** ListAutoProtectionPolicyBindingsRequest filter */ + filter?: (string|null); + + /** ListAutoProtectionPolicyBindingsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListAutoProtectionPolicyBindingsRequest. */ + class ListAutoProtectionPolicyBindingsRequest implements IListAutoProtectionPolicyBindingsRequest { + + /** + * Constructs a new ListAutoProtectionPolicyBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest); + + /** ListAutoProtectionPolicyBindingsRequest parent. */ + public parent: string; + + /** ListAutoProtectionPolicyBindingsRequest pageSize. */ + public pageSize: number; + + /** ListAutoProtectionPolicyBindingsRequest pageToken. */ + public pageToken: string; + + /** ListAutoProtectionPolicyBindingsRequest filter. */ + public filter: string; + + /** ListAutoProtectionPolicyBindingsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListAutoProtectionPolicyBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutoProtectionPolicyBindingsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest): google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; + + /** + * Encodes the specified ListAutoProtectionPolicyBindingsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.verify|verify} messages. + * @param message ListAutoProtectionPolicyBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutoProtectionPolicyBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.verify|verify} messages. + * @param message ListAutoProtectionPolicyBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutoProtectionPolicyBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutoProtectionPolicyBindingsRequest + * @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.v1beta.ListAutoProtectionPolicyBindingsRequest; + + /** + * Decodes a ListAutoProtectionPolicyBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutoProtectionPolicyBindingsRequest + * @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.v1beta.ListAutoProtectionPolicyBindingsRequest; + + /** + * Verifies a ListAutoProtectionPolicyBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutoProtectionPolicyBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutoProtectionPolicyBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; + + /** + * Creates a plain object from a ListAutoProtectionPolicyBindingsRequest message. Also converts values to other types if specified. + * @param message ListAutoProtectionPolicyBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutoProtectionPolicyBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutoProtectionPolicyBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAutoProtectionPolicyBindingsResponse. */ + interface IListAutoProtectionPolicyBindingsResponse { + + /** ListAutoProtectionPolicyBindingsResponse autoProtectionPolicyBindings */ + autoProtectionPolicyBindings?: (google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[]|null); + + /** ListAutoProtectionPolicyBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListAutoProtectionPolicyBindingsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListAutoProtectionPolicyBindingsResponse. */ + class ListAutoProtectionPolicyBindingsResponse implements IListAutoProtectionPolicyBindingsResponse { + + /** + * Constructs a new ListAutoProtectionPolicyBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse); + + /** ListAutoProtectionPolicyBindingsResponse autoProtectionPolicyBindings. */ + public autoProtectionPolicyBindings: google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[]; + + /** ListAutoProtectionPolicyBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListAutoProtectionPolicyBindingsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListAutoProtectionPolicyBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAutoProtectionPolicyBindingsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse): google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; + + /** + * Encodes the specified ListAutoProtectionPolicyBindingsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.verify|verify} messages. + * @param message ListAutoProtectionPolicyBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAutoProtectionPolicyBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.verify|verify} messages. + * @param message ListAutoProtectionPolicyBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAutoProtectionPolicyBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAutoProtectionPolicyBindingsResponse + * @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.v1beta.ListAutoProtectionPolicyBindingsResponse; + + /** + * Decodes a ListAutoProtectionPolicyBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAutoProtectionPolicyBindingsResponse + * @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.v1beta.ListAutoProtectionPolicyBindingsResponse; + + /** + * Verifies a ListAutoProtectionPolicyBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAutoProtectionPolicyBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAutoProtectionPolicyBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; + + /** + * Creates a plain object from a ListAutoProtectionPolicyBindingsResponse message. Also converts values to other types if specified. + * @param message ListAutoProtectionPolicyBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAutoProtectionPolicyBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAutoProtectionPolicyBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateDeleteAutoProtectionPolicyBindingRequest. */ + interface IInitiateDeleteAutoProtectionPolicyBindingRequest { + + /** InitiateDeleteAutoProtectionPolicyBindingRequest name */ + name?: (string|null); + } + + /** Represents an InitiateDeleteAutoProtectionPolicyBindingRequest. */ + class InitiateDeleteAutoProtectionPolicyBindingRequest implements IInitiateDeleteAutoProtectionPolicyBindingRequest { + + /** + * Constructs a new InitiateDeleteAutoProtectionPolicyBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest); + + /** InitiateDeleteAutoProtectionPolicyBindingRequest name. */ + public name: string; + + /** + * Creates a new InitiateDeleteAutoProtectionPolicyBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateDeleteAutoProtectionPolicyBindingRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest): google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; + + /** + * Encodes the specified InitiateDeleteAutoProtectionPolicyBindingRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message InitiateDeleteAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateDeleteAutoProtectionPolicyBindingRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest.verify|verify} messages. + * @param message InitiateDeleteAutoProtectionPolicyBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateDeleteAutoProtectionPolicyBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateDeleteAutoProtectionPolicyBindingRequest + * @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.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; + + /** + * Decodes an InitiateDeleteAutoProtectionPolicyBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateDeleteAutoProtectionPolicyBindingRequest + * @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.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; + + /** + * Verifies an InitiateDeleteAutoProtectionPolicyBindingRequest 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 InitiateDeleteAutoProtectionPolicyBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateDeleteAutoProtectionPolicyBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; + + /** + * Creates a plain object from an InitiateDeleteAutoProtectionPolicyBindingRequest message. Also converts values to other types if specified. + * @param message InitiateDeleteAutoProtectionPolicyBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateDeleteAutoProtectionPolicyBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateDeleteAutoProtectionPolicyBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a BackupDR */ + class BackupDR extends $protobuf.rpc.Service { + + /** + * Constructs a new BackupDR service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BackupDR service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BackupDR; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse + */ + public listManagementServers(request: google.cloud.backupdr.v1beta.IListManagementServersRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListManagementServersCallback): void; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @returns Promise + */ + public listManagementServers(request: google.cloud.backupdr.v1beta.IListManagementServersRequest): Promise; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ManagementServer + */ + public getManagementServer(request: google.cloud.backupdr.v1beta.IGetManagementServerRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetManagementServerCallback): void; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @returns Promise + */ + public getManagementServer(request: google.cloud.backupdr.v1beta.IGetManagementServerRequest): Promise; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createManagementServer(request: google.cloud.backupdr.v1beta.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateManagementServerCallback): void; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @returns Promise + */ + public createManagementServer(request: google.cloud.backupdr.v1beta.ICreateManagementServerRequest): Promise; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteManagementServer(request: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteManagementServerCallback): void; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @returns Promise + */ + public deleteManagementServer(request: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest): Promise; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupVault(request: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateBackupVaultCallback): void; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise + */ + public createBackupVault(request: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest): Promise; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + */ + public listBackupVaults(request: google.cloud.backupdr.v1beta.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBackupVaultsCallback): void; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise + */ + public listBackupVaults(request: google.cloud.backupdr.v1beta.IListBackupVaultsRequest): Promise; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.FetchUsableBackupVaultsCallback): void; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @returns Promise + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest): Promise; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupVault + */ + public getBackupVault(request: google.cloud.backupdr.v1beta.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBackupVaultCallback): void; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise + */ + public getBackupVault(request: google.cloud.backupdr.v1beta.IGetBackupVaultRequest): Promise; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupVault(request: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateBackupVaultCallback): void; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise + */ + public updateBackupVault(request: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest): Promise; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupVault(request: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteBackupVaultCallback): void; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise + */ + public deleteBackupVault(request: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest): Promise; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse + */ + public listDataSources(request: google.cloud.backupdr.v1beta.IListDataSourcesRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListDataSourcesCallback): void; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise + */ + public listDataSources(request: google.cloud.backupdr.v1beta.IListDataSourcesRequest): Promise; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource + */ + public getDataSource(request: google.cloud.backupdr.v1beta.IGetDataSourceRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetDataSourceCallback): void; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.backupdr.v1beta.IGetDataSourceRequest): Promise; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataSource(request: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateDataSourceCallback): void; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @returns Promise + */ + public updateDataSource(request: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest): Promise; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.cloud.backupdr.v1beta.IListBackupsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.backupdr.v1beta.IListBackupsRequest): Promise; + + /** + * Calls FetchBackupsForResourceType. + * @param request FetchBackupsForResourceTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchBackupsForResourceTypeResponse + */ + public fetchBackupsForResourceType(request: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, callback: google.cloud.backupdr.v1beta.BackupDR.FetchBackupsForResourceTypeCallback): void; + + /** + * Calls FetchBackupsForResourceType. + * @param request FetchBackupsForResourceTypeRequest message or plain object + * @returns Promise + */ + public fetchBackupsForResourceType(request: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest): Promise; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public getBackup(request: google.cloud.backupdr.v1beta.IGetBackupRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.cloud.backupdr.v1beta.IGetBackupRequest): Promise; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackup(request: google.cloud.backupdr.v1beta.IUpdateBackupRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateBackupCallback): void; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.backupdr.v1beta.IUpdateBackupRequest): Promise; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.backupdr.v1beta.IDeleteBackupRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.backupdr.v1beta.IDeleteBackupRequest): Promise; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreBackup(request: google.cloud.backupdr.v1beta.IRestoreBackupRequest, callback: google.cloud.backupdr.v1beta.BackupDR.RestoreBackupCallback): void; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @returns Promise + */ + public restoreBackup(request: google.cloud.backupdr.v1beta.IRestoreBackupRequest): Promise; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlan(request: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateBackupPlanCallback): void; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @returns Promise + */ + public createBackupPlan(request: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest): Promise; + + /** + * Calls UpdateBackupPlan. + * @param request UpdateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupPlan(request: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateBackupPlanCallback): void; + + /** + * Calls UpdateBackupPlan. + * @param request UpdateBackupPlanRequest message or plain object + * @returns Promise + */ + public updateBackupPlan(request: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest): Promise; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlan + */ + public getBackupPlan(request: google.cloud.backupdr.v1beta.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBackupPlanCallback): void; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @returns Promise + */ + public getBackupPlan(request: google.cloud.backupdr.v1beta.IGetBackupPlanRequest): Promise; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse + */ + public listBackupPlans(request: google.cloud.backupdr.v1beta.IListBackupPlansRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBackupPlansCallback): void; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @returns Promise + */ + public listBackupPlans(request: google.cloud.backupdr.v1beta.IListBackupPlansRequest): Promise; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteBackupPlanCallback): void; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @returns Promise + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest): Promise; + + /** + * Calls GetBackupPlanRevision. + * @param request GetBackupPlanRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanRevision + */ + public getBackupPlanRevision(request: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBackupPlanRevisionCallback): void; + + /** + * Calls GetBackupPlanRevision. + * @param request GetBackupPlanRevisionRequest message or plain object + * @returns Promise + */ + public getBackupPlanRevision(request: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest): Promise; + + /** + * Calls ListBackupPlanRevisions. + * @param request ListBackupPlanRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanRevisionsResponse + */ + public listBackupPlanRevisions(request: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBackupPlanRevisionsCallback): void; + + /** + * Calls ListBackupPlanRevisions. + * @param request ListBackupPlanRevisionsRequest message or plain object + * @returns Promise + */ + public listBackupPlanRevisions(request: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest): Promise; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateBackupPlanAssociationCallback): void; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest): Promise; + + /** + * Calls UpdateBackupPlanAssociation. + * @param request UpdateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateBackupPlanAssociationCallback): void; + + /** + * Calls UpdateBackupPlanAssociation. + * @param request UpdateBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public updateBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest): Promise; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBackupPlanAssociationCallback): void; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest): Promise; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBackupPlanAssociationsCallback): void; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @returns Promise + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest): Promise; + + /** + * Calls FetchBackupPlanAssociationsForResourceType. + * @param request FetchBackupPlanAssociationsForResourceTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchBackupPlanAssociationsForResourceTypeResponse + */ + public fetchBackupPlanAssociationsForResourceType(request: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, callback: google.cloud.backupdr.v1beta.BackupDR.FetchBackupPlanAssociationsForResourceTypeCallback): void; + + /** + * Calls FetchBackupPlanAssociationsForResourceType. + * @param request FetchBackupPlanAssociationsForResourceTypeRequest message or plain object + * @returns Promise + */ + public fetchBackupPlanAssociationsForResourceType(request: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest): Promise; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteBackupPlanAssociationCallback): void; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest): Promise; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public triggerBackup(request: google.cloud.backupdr.v1beta.ITriggerBackupRequest, callback: google.cloud.backupdr.v1beta.BackupDR.TriggerBackupCallback): void; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @returns Promise + */ + public triggerBackup(request: google.cloud.backupdr.v1beta.ITriggerBackupRequest): Promise; + + /** + * Calls GetDataSourceReference. + * @param request GetDataSourceReferenceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSourceReference + */ + public getDataSourceReference(request: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetDataSourceReferenceCallback): void; + + /** + * Calls GetDataSourceReference. + * @param request GetDataSourceReferenceRequest message or plain object + * @returns Promise + */ + public getDataSourceReference(request: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest): Promise; + + /** + * Calls ListDataSourceReferences. + * @param request ListDataSourceReferencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourceReferencesResponse + */ + public listDataSourceReferences(request: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListDataSourceReferencesCallback): void; + + /** + * Calls ListDataSourceReferences. + * @param request ListDataSourceReferencesRequest message or plain object + * @returns Promise + */ + public listDataSourceReferences(request: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest): Promise; + + /** + * Calls FetchDataSourceReferencesForResourceType. + * @param request FetchDataSourceReferencesForResourceTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchDataSourceReferencesForResourceTypeResponse + */ + public fetchDataSourceReferencesForResourceType(request: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, callback: google.cloud.backupdr.v1beta.BackupDR.FetchDataSourceReferencesForResourceTypeCallback): void; + + /** + * Calls FetchDataSourceReferencesForResourceType. + * @param request FetchDataSourceReferencesForResourceTypeRequest message or plain object + * @returns Promise + */ + public fetchDataSourceReferencesForResourceType(request: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest): Promise; + + /** + * Calls InitializeService. + * @param request InitializeServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public initializeService(request: google.cloud.backupdr.v1beta.IInitializeServiceRequest, callback: google.cloud.backupdr.v1beta.BackupDR.InitializeServiceCallback): void; + + /** + * Calls InitializeService. + * @param request InitializeServiceRequest message or plain object + * @returns Promise + */ + public initializeService(request: google.cloud.backupdr.v1beta.IInitializeServiceRequest): Promise; + + /** + * Calls CreateAutoProtectionPolicy. + * @param request CreateAutoProtectionPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateAutoProtectionPolicyCallback): void; + + /** + * Calls CreateAutoProtectionPolicy. + * @param request CreateAutoProtectionPolicyRequest message or plain object + * @returns Promise + */ + public createAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest): Promise; + + /** + * Calls ListAutoProtectionPolicies. + * @param request ListAutoProtectionPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAutoProtectionPoliciesResponse + */ + public listAutoProtectionPolicies(request: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListAutoProtectionPoliciesCallback): void; + + /** + * Calls ListAutoProtectionPolicies. + * @param request ListAutoProtectionPoliciesRequest message or plain object + * @returns Promise + */ + public listAutoProtectionPolicies(request: google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest): Promise; + + /** + * Calls GetAutoProtectionPolicy. + * @param request GetAutoProtectionPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutoProtectionPolicy + */ + public getAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetAutoProtectionPolicyCallback): void; + + /** + * Calls GetAutoProtectionPolicy. + * @param request GetAutoProtectionPolicyRequest message or plain object + * @returns Promise + */ + public getAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest): Promise; + + /** + * Calls UpdateAutoProtectionPolicy. + * @param request UpdateAutoProtectionPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, callback: google.cloud.backupdr.v1beta.BackupDR.UpdateAutoProtectionPolicyCallback): void; + + /** + * Calls UpdateAutoProtectionPolicy. + * @param request UpdateAutoProtectionPolicyRequest message or plain object + * @returns Promise + */ + public updateAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest): Promise; + + /** + * Calls DeleteAutoProtectionPolicy. + * @param request DeleteAutoProtectionPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, callback: google.cloud.backupdr.v1beta.BackupDR.DeleteAutoProtectionPolicyCallback): void; + + /** + * Calls DeleteAutoProtectionPolicy. + * @param request DeleteAutoProtectionPolicyRequest message or plain object + * @returns Promise + */ + public deleteAutoProtectionPolicy(request: google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest): Promise; + + /** + * Calls CreateAutoProtectionPolicyBinding. + * @param request CreateAutoProtectionPolicyBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, callback: google.cloud.backupdr.v1beta.BackupDR.CreateAutoProtectionPolicyBindingCallback): void; + + /** + * Calls CreateAutoProtectionPolicyBinding. + * @param request CreateAutoProtectionPolicyBindingRequest message or plain object + * @returns Promise + */ + public createAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest): Promise; + + /** + * Calls GetAutoProtectionPolicyBinding. + * @param request GetAutoProtectionPolicyBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutoProtectionPolicyBinding + */ + public getAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetAutoProtectionPolicyBindingCallback): void; + + /** + * Calls GetAutoProtectionPolicyBinding. + * @param request GetAutoProtectionPolicyBindingRequest message or plain object + * @returns Promise + */ + public getAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest): Promise; + + /** + * Calls ListAutoProtectionPolicyBindings. + * @param request ListAutoProtectionPolicyBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAutoProtectionPolicyBindingsResponse + */ + public listAutoProtectionPolicyBindings(request: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListAutoProtectionPolicyBindingsCallback): void; + + /** + * Calls ListAutoProtectionPolicyBindings. + * @param request ListAutoProtectionPolicyBindingsRequest message or plain object + * @returns Promise + */ + public listAutoProtectionPolicyBindings(request: google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest): Promise; + + /** + * Calls ListAppliedAutoProtectionPolicies. + * @param request ListAppliedAutoProtectionPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAppliedAutoProtectionPoliciesResponse + */ + public listAppliedAutoProtectionPolicies(request: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListAppliedAutoProtectionPoliciesCallback): void; + + /** + * Calls ListAppliedAutoProtectionPolicies. + * @param request ListAppliedAutoProtectionPoliciesRequest message or plain object + * @returns Promise + */ + public listAppliedAutoProtectionPolicies(request: google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest): Promise; + + /** + * Calls InitiateDeleteAutoProtectionPolicyBinding. + * @param request InitiateDeleteAutoProtectionPolicyBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public initiateDeleteAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, callback: google.cloud.backupdr.v1beta.BackupDR.InitiateDeleteAutoProtectionPolicyBindingCallback): void; + + /** + * Calls InitiateDeleteAutoProtectionPolicyBinding. + * @param request InitiateDeleteAutoProtectionPolicyBindingRequest message or plain object + * @returns Promise + */ + public initiateDeleteAutoProtectionPolicyBinding(request: google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest): Promise; + + /** + * Calls GetBindingMatchingResource. + * @param request GetBindingMatchingResourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BindingMatchingResource + */ + public getBindingMatchingResource(request: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, callback: google.cloud.backupdr.v1beta.BackupDR.GetBindingMatchingResourceCallback): void; + + /** + * Calls GetBindingMatchingResource. + * @param request GetBindingMatchingResourceRequest message or plain object + * @returns Promise + */ + public getBindingMatchingResource(request: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest): Promise; + + /** + * Calls ListBindingMatchingResources. + * @param request ListBindingMatchingResourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBindingMatchingResourcesResponse + */ + public listBindingMatchingResources(request: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, callback: google.cloud.backupdr.v1beta.BackupDR.ListBindingMatchingResourcesCallback): void; + + /** + * Calls ListBindingMatchingResources. + * @param request ListBindingMatchingResourcesRequest message or plain object + * @returns Promise + */ + public listBindingMatchingResources(request: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest): Promise; + } + + namespace BackupDR { + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listManagementServers}. + * @param error Error, if any + * @param [response] ListManagementServersResponse + */ + type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListManagementServersResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getManagementServer}. + * @param error Error, if any + * @param [response] ManagementServer + */ + type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ManagementServer) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse + */ + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|fetchUsableBackupVaults}. + * @param error Error, if any + * @param [response] FetchUsableBackupVaultsResponse + */ + type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault + */ + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.BackupVault) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListDataSourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.DataSource) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|fetchBackupsForResourceType}. + * @param error Error, if any + * @param [response] FetchBackupsForResourceTypeResponse + */ + type FetchBackupsForResourceTypeCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.Backup) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|restoreBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBackupPlan}. + * @param error Error, if any + * @param [response] BackupPlan + */ + type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.BackupPlan) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBackupPlans}. + * @param error Error, if any + * @param [response] ListBackupPlansResponse + */ + type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBackupPlansResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBackupPlanRevision}. + * @param error Error, if any + * @param [response] BackupPlanRevision + */ + type GetBackupPlanRevisionCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.BackupPlanRevision) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBackupPlanRevisions}. + * @param error Error, if any + * @param [response] ListBackupPlanRevisionsResponse + */ + type ListBackupPlanRevisionsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBackupPlanAssociation}. + * @param error Error, if any + * @param [response] BackupPlanAssociation + */ + type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.BackupPlanAssociation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBackupPlanAssociations}. + * @param error Error, if any + * @param [response] ListBackupPlanAssociationsResponse + */ + type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|fetchBackupPlanAssociationsForResourceType}. + * @param error Error, if any + * @param [response] FetchBackupPlanAssociationsForResourceTypeResponse + */ + type FetchBackupPlanAssociationsForResourceTypeCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|triggerBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getDataSourceReference}. + * @param error Error, if any + * @param [response] DataSourceReference + */ + type GetDataSourceReferenceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.DataSourceReference) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listDataSourceReferences}. + * @param error Error, if any + * @param [response] ListDataSourceReferencesResponse + */ + type ListDataSourceReferencesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|fetchDataSourceReferencesForResourceType}. + * @param error Error, if any + * @param [response] FetchDataSourceReferencesForResourceTypeResponse + */ + type FetchDataSourceReferencesForResourceTypeCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|initializeService}. + * @param error Error, if any + * @param [response] Operation + */ + type InitializeServiceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createAutoProtectionPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAutoProtectionPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listAutoProtectionPolicies}. + * @param error Error, if any + * @param [response] ListAutoProtectionPoliciesResponse + */ + type ListAutoProtectionPoliciesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getAutoProtectionPolicy}. + * @param error Error, if any + * @param [response] AutoProtectionPolicy + */ + type GetAutoProtectionPolicyCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.AutoProtectionPolicy) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|updateAutoProtectionPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAutoProtectionPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|deleteAutoProtectionPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAutoProtectionPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|createAutoProtectionPolicyBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAutoProtectionPolicyBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getAutoProtectionPolicyBinding}. + * @param error Error, if any + * @param [response] AutoProtectionPolicyBinding + */ + type GetAutoProtectionPolicyBindingCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listAutoProtectionPolicyBindings}. + * @param error Error, if any + * @param [response] ListAutoProtectionPolicyBindingsResponse + */ + type ListAutoProtectionPolicyBindingsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listAppliedAutoProtectionPolicies}. + * @param error Error, if any + * @param [response] ListAppliedAutoProtectionPoliciesResponse + */ + type ListAppliedAutoProtectionPoliciesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|initiateDeleteAutoProtectionPolicyBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type InitiateDeleteAutoProtectionPolicyBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|getBindingMatchingResource}. + * @param error Error, if any + * @param [response] BindingMatchingResource + */ + type GetBindingMatchingResourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.BindingMatchingResource) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDR|listBindingMatchingResources}. + * @param error Error, if any + * @param [response] ListBindingMatchingResourcesResponse + */ + type ListBindingMatchingResourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) => void; + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig network */ + network?: (string|null); + + /** NetworkConfig peeringMode */ + peeringMode?: (google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.INetworkConfig); + + /** NetworkConfig network. */ + public network: string; + + /** NetworkConfig peeringMode. */ + public peeringMode: (google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.INetworkConfig): google.cloud.backupdr.v1beta.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @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.v1beta.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @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.v1beta.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** PeeringMode enum. */ + enum PeeringMode { + PEERING_MODE_UNSPECIFIED = 0, + PRIVATE_SERVICE_ACCESS = 1 + } + } + + /** Properties of a ManagementURI. */ + interface IManagementURI { + + /** ManagementURI webUi */ + webUi?: (string|null); + + /** ManagementURI api */ + api?: (string|null); + } + + /** Represents a ManagementURI. */ + class ManagementURI implements IManagementURI { + + /** + * Constructs a new ManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IManagementURI); + + /** ManagementURI webUi. */ + public webUi: string; + + /** ManagementURI api. */ + public api: string; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IManagementURI): google.cloud.backupdr.v1beta.ManagementURI; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1beta.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementURI + * @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.v1beta.ManagementURI; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementURI + * @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.v1beta.ManagementURI; + + /** + * Verifies a ManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ManagementURI; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @param message ManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedManagementURI. */ + interface IWorkforceIdentityBasedManagementURI { + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); + } + + /** Represents a WorkforceIdentityBasedManagementURI. */ + class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI); + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ + public firstPartyManagementUri: string; + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedManagementURI + * @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.v1beta.WorkforceIdentityBasedManagementURI; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedManagementURI + * @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.v1beta.WorkforceIdentityBasedManagementURI; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI; + + /** + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ + interface IWorkforceIdentityBasedOAuth2ClientID { + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ + firstPartyOauth2ClientId?: (string|null); + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ + thirdPartyOauth2ClientId?: (string|null); + } + + /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ + class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { + + /** + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID); + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ + public firstPartyOauth2ClientId: string; + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ + public thirdPartyOauth2ClientId: string; + + /** + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedOAuth2ClientID instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedOAuth2ClientID + * @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.v1beta.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedOAuth2ClientID + * @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.v1beta.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedOAuth2ClientID + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedOAuth2ClientID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManagementServer. */ + interface IManagementServer { + + /** ManagementServer name */ + name?: (string|null); + + /** ManagementServer description */ + description?: (string|null); + + /** ManagementServer labels */ + labels?: ({ [k: string]: string }|null); + + /** ManagementServer createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type */ + type?: (google.cloud.backupdr.v1beta.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1beta.ManagementServer.InstanceType|null); + + /** ManagementServer managementUri */ + managementUri?: (google.cloud.backupdr.v1beta.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri */ + workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state */ + state?: (google.cloud.backupdr.v1beta.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1beta.ManagementServer.InstanceState|null); + + /** ManagementServer networks */ + networks?: (google.cloud.backupdr.v1beta.INetworkConfig[]|null); + + /** ManagementServer etag */ + etag?: (string|null); + + /** ManagementServer oauth2ClientId */ + oauth2ClientId?: (string|null); + + /** ManagementServer workforceIdentityBasedOauth2ClientId */ + workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri */ + baProxyUri?: (string[]|null); + + /** ManagementServer satisfiesPzs */ + satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a ManagementServer. */ + class ManagementServer implements IManagementServer { + + /** + * Constructs a new ManagementServer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IManagementServer); + + /** ManagementServer name. */ + public name: string; + + /** ManagementServer description. */ + public description: string; + + /** ManagementServer labels. */ + public labels: { [k: string]: string }; + + /** ManagementServer createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type. */ + public type: (google.cloud.backupdr.v1beta.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1beta.ManagementServer.InstanceType); + + /** ManagementServer managementUri. */ + public managementUri?: (google.cloud.backupdr.v1beta.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri. */ + public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1beta.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state. */ + public state: (google.cloud.backupdr.v1beta.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1beta.ManagementServer.InstanceState); + + /** ManagementServer networks. */ + public networks: google.cloud.backupdr.v1beta.INetworkConfig[]; + + /** ManagementServer etag. */ + public etag: string; + + /** ManagementServer oauth2ClientId. */ + public oauth2ClientId: string; + + /** ManagementServer workforceIdentityBasedOauth2ClientId. */ + public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1beta.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri. */ + public baProxyUri: string[]; + + /** ManagementServer satisfiesPzs. */ + public satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** + * Creates a new ManagementServer instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementServer instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IManagementServer): google.cloud.backupdr.v1beta.ManagementServer; + + /** + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1beta.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementServer + * @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.v1beta.ManagementServer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementServer + * @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.v1beta.ManagementServer; + + /** + * Verifies a ManagementServer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementServer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ManagementServer; + + /** + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @param message ManagementServer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementServer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementServer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ManagementServer { + + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + BACKUP_RESTORE = 1 + } + + /** InstanceState enum. */ + enum InstanceState { + INSTANCE_STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + REPAIRING = 5, + MAINTENANCE = 6, + ERROR = 7 + } + } + + /** Properties of a ListManagementServersRequest. */ + interface IListManagementServersRequest { + + /** ListManagementServersRequest parent */ + parent?: (string|null); + + /** ListManagementServersRequest pageSize */ + pageSize?: (number|null); + + /** ListManagementServersRequest pageToken */ + pageToken?: (string|null); + + /** ListManagementServersRequest filter */ + filter?: (string|null); + + /** ListManagementServersRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListManagementServersRequest. */ + class ListManagementServersRequest implements IListManagementServersRequest { + + /** + * Constructs a new ListManagementServersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListManagementServersRequest); + + /** ListManagementServersRequest parent. */ + public parent: string; + + /** ListManagementServersRequest pageSize. */ + public pageSize: number; + + /** ListManagementServersRequest pageToken. */ + public pageToken: string; + + /** ListManagementServersRequest filter. */ + public filter?: (string|null); + + /** ListManagementServersRequest orderBy. */ + public orderBy?: (string|null); + + /** + * Creates a new ListManagementServersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListManagementServersRequest): google.cloud.backupdr.v1beta.ListManagementServersRequest; + + /** + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersRequest + * @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.v1beta.ListManagementServersRequest; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersRequest + * @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.v1beta.ListManagementServersRequest; + + /** + * Verifies a ListManagementServersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListManagementServersRequest; + + /** + * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. + * @param message ListManagementServersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListManagementServersResponse. */ + interface IListManagementServersResponse { + + /** ListManagementServersResponse managementServers */ + managementServers?: (google.cloud.backupdr.v1beta.IManagementServer[]|null); + + /** ListManagementServersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListManagementServersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListManagementServersResponse. */ + class ListManagementServersResponse implements IListManagementServersResponse { + + /** + * Constructs a new ListManagementServersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListManagementServersResponse); + + /** ListManagementServersResponse managementServers. */ + public managementServers: google.cloud.backupdr.v1beta.IManagementServer[]; + + /** ListManagementServersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListManagementServersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListManagementServersResponse): google.cloud.backupdr.v1beta.ListManagementServersResponse; + + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersResponse + * @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.v1beta.ListManagementServersResponse; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersResponse + * @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.v1beta.ListManagementServersResponse; + + /** + * Verifies a ListManagementServersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListManagementServersResponse; + + /** + * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. + * @param message ListManagementServersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetManagementServerRequest. */ + interface IGetManagementServerRequest { + + /** GetManagementServerRequest name */ + name?: (string|null); + } + + /** Represents a GetManagementServerRequest. */ + class GetManagementServerRequest implements IGetManagementServerRequest { + + /** + * Constructs a new GetManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetManagementServerRequest); + + /** GetManagementServerRequest name. */ + public name: string; + + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetManagementServerRequest): google.cloud.backupdr.v1beta.GetManagementServerRequest; + + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetManagementServerRequest + * @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.v1beta.GetManagementServerRequest; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetManagementServerRequest + * @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.v1beta.GetManagementServerRequest; + + /** + * Verifies a GetManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetManagementServerRequest; + + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @param message GetManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateManagementServerRequest. */ + interface ICreateManagementServerRequest { + + /** CreateManagementServerRequest parent */ + parent?: (string|null); + + /** CreateManagementServerRequest managementServerId */ + managementServerId?: (string|null); + + /** CreateManagementServerRequest managementServer */ + managementServer?: (google.cloud.backupdr.v1beta.IManagementServer|null); + + /** CreateManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateManagementServerRequest. */ + class CreateManagementServerRequest implements ICreateManagementServerRequest { + + /** + * Constructs a new CreateManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateManagementServerRequest); + + /** CreateManagementServerRequest parent. */ + public parent: string; + + /** CreateManagementServerRequest managementServerId. */ + public managementServerId: string; + + /** CreateManagementServerRequest managementServer. */ + public managementServer?: (google.cloud.backupdr.v1beta.IManagementServer|null); + + /** CreateManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateManagementServerRequest): google.cloud.backupdr.v1beta.CreateManagementServerRequest; + + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateManagementServerRequest + * @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.v1beta.CreateManagementServerRequest; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateManagementServerRequest + * @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.v1beta.CreateManagementServerRequest; + + /** + * Verifies a CreateManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateManagementServerRequest; + + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @param message CreateManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteManagementServerRequest. */ + interface IDeleteManagementServerRequest { + + /** DeleteManagementServerRequest name */ + name?: (string|null); + + /** DeleteManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteManagementServerRequest. */ + class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + + /** + * Constructs a new DeleteManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest); + + /** DeleteManagementServerRequest name. */ + public name: string; + + /** DeleteManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest): google.cloud.backupdr.v1beta.DeleteManagementServerRequest; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteManagementServerRequest + * @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.v1beta.DeleteManagementServerRequest; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteManagementServerRequest + * @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.v1beta.DeleteManagementServerRequest; + + /** + * Verifies a DeleteManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteManagementServerRequest; + + /** + * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. + * @param message DeleteManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitializeServiceRequest. */ + interface IInitializeServiceRequest { + + /** InitializeServiceRequest cloudSqlInstanceInitializationConfig */ + cloudSqlInstanceInitializationConfig?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig|null); + + /** InitializeServiceRequest name */ + name?: (string|null); + + /** InitializeServiceRequest resourceType */ + resourceType?: (string|null); + + /** InitializeServiceRequest requestId */ + requestId?: (string|null); + + /** InitializeServiceRequest backupPlanLocation */ + backupPlanLocation?: (string|null); + + /** InitializeServiceRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an InitializeServiceRequest. */ + class InitializeServiceRequest implements IInitializeServiceRequest { + + /** + * Constructs a new InitializeServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IInitializeServiceRequest); + + /** InitializeServiceRequest cloudSqlInstanceInitializationConfig. */ + public cloudSqlInstanceInitializationConfig?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig|null); + + /** InitializeServiceRequest name. */ + public name: string; + + /** InitializeServiceRequest resourceType. */ + public resourceType: string; + + /** InitializeServiceRequest requestId. */ + public requestId: string; + + /** InitializeServiceRequest backupPlanLocation. */ + public backupPlanLocation: string; + + /** InitializeServiceRequest validateOnly. */ + public validateOnly: boolean; + + /** InitializeServiceRequest initializationConfig. */ + public initializationConfig?: "cloudSqlInstanceInitializationConfig"; + + /** + * Creates a new InitializeServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeServiceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IInitializeServiceRequest): google.cloud.backupdr.v1beta.InitializeServiceRequest; + + /** + * Encodes the specified InitializeServiceRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.InitializeServiceRequest.verify|verify} messages. + * @param message InitializeServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IInitializeServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeServiceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.InitializeServiceRequest.verify|verify} messages. + * @param message InitializeServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IInitializeServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeServiceRequest + * @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.v1beta.InitializeServiceRequest; + + /** + * Decodes an InitializeServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeServiceRequest + * @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.v1beta.InitializeServiceRequest; + + /** + * Verifies an InitializeServiceRequest 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 InitializeServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.InitializeServiceRequest; + + /** + * Creates a plain object from an InitializeServiceRequest message. Also converts values to other types if specified. + * @param message InitializeServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.InitializeServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitializeServiceResponse. */ + interface IInitializeServiceResponse { + + /** InitializeServiceResponse backupVaultName */ + backupVaultName?: (string|null); + + /** InitializeServiceResponse backupPlanName */ + backupPlanName?: (string|null); + } + + /** Represents an InitializeServiceResponse. */ + class InitializeServiceResponse implements IInitializeServiceResponse { + + /** + * Constructs a new InitializeServiceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IInitializeServiceResponse); + + /** InitializeServiceResponse backupVaultName. */ + public backupVaultName: string; + + /** InitializeServiceResponse backupPlanName. */ + public backupPlanName: string; + + /** + * Creates a new InitializeServiceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeServiceResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IInitializeServiceResponse): google.cloud.backupdr.v1beta.InitializeServiceResponse; + + /** + * Encodes the specified InitializeServiceResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.InitializeServiceResponse.verify|verify} messages. + * @param message InitializeServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IInitializeServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeServiceResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.InitializeServiceResponse.verify|verify} messages. + * @param message InitializeServiceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IInitializeServiceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeServiceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeServiceResponse + * @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.v1beta.InitializeServiceResponse; + + /** + * Decodes an InitializeServiceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeServiceResponse + * @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.v1beta.InitializeServiceResponse; + + /** + * Verifies an InitializeServiceResponse 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 InitializeServiceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeServiceResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.InitializeServiceResponse; + + /** + * Creates a plain object from an InitializeServiceResponse message. Also converts values to other types if specified. + * @param message InitializeServiceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.InitializeServiceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeServiceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeServiceResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + + /** OperationMetadata additionalInfo */ + additionalInfo?: ({ [k: string]: string }|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** OperationMetadata additionalInfo. */ + public additionalInfo: { [k: string]: string }; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IOperationMetadata): google.cloud.backupdr.v1beta.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1beta.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @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.v1beta.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @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.v1beta.OperationMetadata; + + /** + * Verifies an OperationMetadata 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlan. */ + interface IBackupPlan { + + /** BackupPlan diskBackupPlanProperties */ + diskBackupPlanProperties?: (google.cloud.backupdr.v1beta.IDiskBackupPlanProperties|null); + + /** BackupPlan computeInstanceBackupPlanProperties */ + computeInstanceBackupPlanProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties|null); + + /** BackupPlan name */ + name?: (string|null); + + /** BackupPlan description */ + description?: (string|null); + + /** BackupPlan labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPlan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules */ + backupRules?: (google.cloud.backupdr.v1beta.IBackupRule[]|null); + + /** BackupPlan maxCustomOnDemandRetentionDays */ + maxCustomOnDemandRetentionDays?: (number|null); + + /** BackupPlan state */ + state?: (google.cloud.backupdr.v1beta.BackupPlan.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlan.State|null); + + /** BackupPlan resourceType */ + resourceType?: (string|null); + + /** BackupPlan etag */ + etag?: (string|null); + + /** BackupPlan backupVault */ + backupVault?: (string|null); + + /** BackupPlan backupVaultServiceAccount */ + backupVaultServiceAccount?: (string|null); + + /** BackupPlan logRetentionDays */ + logRetentionDays?: (number|Long|string|null); + + /** BackupPlan supportedResourceTypes */ + supportedResourceTypes?: (string[]|null); + + /** BackupPlan revisionId */ + revisionId?: (string|null); + + /** BackupPlan revisionName */ + revisionName?: (string|null); + } + + /** Represents a BackupPlan. */ + class BackupPlan implements IBackupPlan { + + /** + * Constructs a new BackupPlan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupPlan); + + /** BackupPlan diskBackupPlanProperties. */ + public diskBackupPlanProperties?: (google.cloud.backupdr.v1beta.IDiskBackupPlanProperties|null); + + /** BackupPlan computeInstanceBackupPlanProperties. */ + public computeInstanceBackupPlanProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties|null); + + /** BackupPlan name. */ + public name: string; + + /** BackupPlan description. */ + public description: string; + + /** BackupPlan labels. */ + public labels: { [k: string]: string }; + + /** BackupPlan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules. */ + public backupRules: google.cloud.backupdr.v1beta.IBackupRule[]; + + /** BackupPlan maxCustomOnDemandRetentionDays. */ + public maxCustomOnDemandRetentionDays: number; + + /** BackupPlan state. */ + public state: (google.cloud.backupdr.v1beta.BackupPlan.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlan.State); + + /** BackupPlan resourceType. */ + public resourceType: string; + + /** BackupPlan etag. */ + public etag: string; + + /** BackupPlan backupVault. */ + public backupVault: string; + + /** BackupPlan backupVaultServiceAccount. */ + public backupVaultServiceAccount: string; + + /** BackupPlan logRetentionDays. */ + public logRetentionDays: (number|Long|string); + + /** BackupPlan supportedResourceTypes. */ + public supportedResourceTypes: string[]; + + /** BackupPlan revisionId. */ + public revisionId: string; + + /** BackupPlan revisionName. */ + public revisionName: string; + + /** BackupPlan resourceProperties. */ + public resourceProperties?: ("diskBackupPlanProperties"|"computeInstanceBackupPlanProperties"); + + /** + * Creates a new BackupPlan instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlan instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupPlan): google.cloud.backupdr.v1beta.BackupPlan; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlan + * @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.v1beta.BackupPlan; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlan + * @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.v1beta.BackupPlan; + + /** + * Verifies a BackupPlan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupPlan; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @param message BackupPlan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlan { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4, + UPDATING = 5 + } + } + + /** Properties of a BackupRule. */ + interface IBackupRule { + + /** BackupRule standardSchedule */ + standardSchedule?: (google.cloud.backupdr.v1beta.IStandardSchedule|null); + + /** BackupRule ruleId */ + ruleId?: (string|null); + + /** BackupRule backupRetentionDays */ + backupRetentionDays?: (number|null); + } + + /** Represents a BackupRule. */ + class BackupRule implements IBackupRule { + + /** + * Constructs a new BackupRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupRule); + + /** BackupRule standardSchedule. */ + public standardSchedule?: (google.cloud.backupdr.v1beta.IStandardSchedule|null); + + /** BackupRule ruleId. */ + public ruleId: string; + + /** BackupRule backupRetentionDays. */ + public backupRetentionDays: number; + + /** BackupRule backupScheduleOneof. */ + public backupScheduleOneof?: "standardSchedule"; + + /** + * Creates a new BackupRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRule instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupRule): google.cloud.backupdr.v1beta.BackupRule; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRule + * @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.v1beta.BackupRule; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRule + * @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.v1beta.BackupRule; + + /** + * Verifies a BackupRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupRule; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @param message BackupRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardSchedule. */ + interface IStandardSchedule { + + /** StandardSchedule recurrenceType */ + recurrenceType?: (google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType|null); + + /** StandardSchedule hourlyFrequency */ + hourlyFrequency?: (number|null); + + /** StandardSchedule daysOfWeek */ + daysOfWeek?: (google.type.DayOfWeek[]|null); + + /** StandardSchedule daysOfMonth */ + daysOfMonth?: (number[]|null); + + /** StandardSchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.backupdr.v1beta.IWeekDayOfMonth|null); + + /** StandardSchedule months */ + months?: (google.type.Month[]|null); + + /** StandardSchedule backupWindow */ + backupWindow?: (google.cloud.backupdr.v1beta.IBackupWindow|null); + + /** StandardSchedule timeZone */ + timeZone?: (string|null); + } + + /** Represents a StandardSchedule. */ + class StandardSchedule implements IStandardSchedule { + + /** + * Constructs a new StandardSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IStandardSchedule); + + /** StandardSchedule recurrenceType. */ + public recurrenceType: (google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType); + + /** StandardSchedule hourlyFrequency. */ + public hourlyFrequency: number; + + /** StandardSchedule daysOfWeek. */ + public daysOfWeek: google.type.DayOfWeek[]; + + /** StandardSchedule daysOfMonth. */ + public daysOfMonth: number[]; + + /** StandardSchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.backupdr.v1beta.IWeekDayOfMonth|null); + + /** StandardSchedule months. */ + public months: google.type.Month[]; + + /** StandardSchedule backupWindow. */ + public backupWindow?: (google.cloud.backupdr.v1beta.IBackupWindow|null); + + /** StandardSchedule timeZone. */ + public timeZone: string; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardSchedule instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IStandardSchedule): google.cloud.backupdr.v1beta.StandardSchedule; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1beta.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardSchedule + * @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.v1beta.StandardSchedule; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardSchedule + * @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.v1beta.StandardSchedule; + + /** + * Verifies a StandardSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.StandardSchedule; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @param message StandardSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StandardSchedule { + + /** RecurrenceType enum. */ + enum RecurrenceType { + RECURRENCE_TYPE_UNSPECIFIED = 0, + HOURLY = 1, + DAILY = 2, + WEEKLY = 3, + MONTHLY = 4, + YEARLY = 5 + } + } + + /** Properties of a BackupWindow. */ + interface IBackupWindow { + + /** BackupWindow startHourOfDay */ + startHourOfDay?: (number|null); + + /** BackupWindow endHourOfDay */ + endHourOfDay?: (number|null); + } + + /** Represents a BackupWindow. */ + class BackupWindow implements IBackupWindow { + + /** + * Constructs a new BackupWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupWindow); + + /** BackupWindow startHourOfDay. */ + public startHourOfDay: number; + + /** BackupWindow endHourOfDay. */ + public endHourOfDay: number; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupWindow): google.cloud.backupdr.v1beta.BackupWindow; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupWindow + * @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.v1beta.BackupWindow; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupWindow + * @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.v1beta.BackupWindow; + + /** + * Verifies a BackupWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupWindow; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @param message BackupWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOfMonth */ + weekOfMonth?: (google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOfMonth. */ + public weekOfMonth: (google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth); + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IWeekDayOfMonth): google.cloud.backupdr.v1beta.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1beta.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @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.v1beta.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @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.v1beta.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WeekDayOfMonth { + + /** WeekOfMonth enum. */ + enum WeekOfMonth { + WEEK_OF_MONTH_UNSPECIFIED = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, + LAST = 5 + } + } + + /** Properties of a CreateBackupPlanRequest. */ + interface ICreateBackupPlanRequest { + + /** CreateBackupPlanRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanRequest backupPlanId */ + backupPlanId?: (string|null); + + /** CreateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanRequest. */ + class CreateBackupPlanRequest implements ICreateBackupPlanRequest { + + /** + * Constructs a new CreateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest); + + /** CreateBackupPlanRequest parent. */ + public parent: string; + + /** CreateBackupPlanRequest backupPlanId. */ + public backupPlanId: string; + + /** CreateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest): google.cloud.backupdr.v1beta.CreateBackupPlanRequest; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanRequest + * @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.v1beta.CreateBackupPlanRequest; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanRequest + * @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.v1beta.CreateBackupPlanRequest; + + /** + * Verifies a CreateBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateBackupPlanRequest; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansRequest. */ + interface IListBackupPlansRequest { + + /** ListBackupPlansRequest parent */ + parent?: (string|null); + + /** ListBackupPlansRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlansRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlansRequest filter */ + filter?: (string|null); + + /** ListBackupPlansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPlansRequest. */ + class ListBackupPlansRequest implements IListBackupPlansRequest { + + /** + * Constructs a new ListBackupPlansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlansRequest); + + /** ListBackupPlansRequest parent. */ + public parent: string; + + /** ListBackupPlansRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlansRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlansRequest filter. */ + public filter: string; + + /** ListBackupPlansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlansRequest): google.cloud.backupdr.v1beta.ListBackupPlansRequest; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansRequest + * @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.v1beta.ListBackupPlansRequest; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansRequest + * @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.v1beta.ListBackupPlansRequest; + + /** + * Verifies a ListBackupPlansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlansRequest; + + /** + * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. + * @param message ListBackupPlansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansResponse. */ + interface IListBackupPlansResponse { + + /** ListBackupPlansResponse backupPlans */ + backupPlans?: (google.cloud.backupdr.v1beta.IBackupPlan[]|null); + + /** ListBackupPlansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlansResponse. */ + class ListBackupPlansResponse implements IListBackupPlansResponse { + + /** + * Constructs a new ListBackupPlansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlansResponse); + + /** ListBackupPlansResponse backupPlans. */ + public backupPlans: google.cloud.backupdr.v1beta.IBackupPlan[]; + + /** ListBackupPlansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlansResponse): google.cloud.backupdr.v1beta.ListBackupPlansResponse; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansResponse + * @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.v1beta.ListBackupPlansResponse; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansResponse + * @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.v1beta.ListBackupPlansResponse; + + /** + * Verifies a ListBackupPlansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlansResponse; + + /** + * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. + * @param message ListBackupPlansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanRequest. */ + interface IGetBackupPlanRequest { + + /** GetBackupPlanRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRequest. */ + class GetBackupPlanRequest implements IGetBackupPlanRequest { + + /** + * Constructs a new GetBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanRequest); + + /** GetBackupPlanRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanRequest): google.cloud.backupdr.v1beta.GetBackupPlanRequest; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRequest + * @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.v1beta.GetBackupPlanRequest; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRequest + * @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.v1beta.GetBackupPlanRequest; + + /** + * Verifies a GetBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBackupPlanRequest; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanRequest. */ + interface IDeleteBackupPlanRequest { + + /** DeleteBackupPlanRequest name */ + name?: (string|null); + + /** DeleteBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanRequest. */ + class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { + + /** + * Constructs a new DeleteBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest); + + /** DeleteBackupPlanRequest name. */ + public name: string; + + /** DeleteBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest): google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanRequest + * @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.v1beta.DeleteBackupPlanRequest; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanRequest + * @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.v1beta.DeleteBackupPlanRequest; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; + + /** + * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupPlanRequest. */ + interface IUpdateBackupPlanRequest { + + /** UpdateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** UpdateBackupPlanRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupPlanRequest. */ + class UpdateBackupPlanRequest implements IUpdateBackupPlanRequest { + + /** + * Constructs a new UpdateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest); + + /** UpdateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** UpdateBackupPlanRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest): google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; + + /** + * Encodes the specified UpdateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.verify|verify} messages. + * @param message UpdateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.verify|verify} messages. + * @param message UpdateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupPlanRequest + * @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.v1beta.UpdateBackupPlanRequest; + + /** + * Decodes an UpdateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupPlanRequest + * @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.v1beta.UpdateBackupPlanRequest; + + /** + * Verifies an UpdateBackupPlanRequest 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 UpdateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; + + /** + * Creates a plain object from an UpdateBackupPlanRequest message. Also converts values to other types if specified. + * @param message UpdateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanRevision. */ + interface IBackupPlanRevision { + + /** BackupPlanRevision name */ + name?: (string|null); + + /** BackupPlanRevision revisionId */ + revisionId?: (string|null); + + /** BackupPlanRevision state */ + state?: (google.cloud.backupdr.v1beta.BackupPlanRevision.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlanRevision.State|null); + + /** BackupPlanRevision backupPlanSnapshot */ + backupPlanSnapshot?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** BackupPlanRevision createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupPlanRevision. */ + class BackupPlanRevision implements IBackupPlanRevision { + + /** + * Constructs a new BackupPlanRevision. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupPlanRevision); + + /** BackupPlanRevision name. */ + public name: string; + + /** BackupPlanRevision revisionId. */ + public revisionId: string; + + /** BackupPlanRevision state. */ + public state: (google.cloud.backupdr.v1beta.BackupPlanRevision.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlanRevision.State); + + /** BackupPlanRevision backupPlanSnapshot. */ + public backupPlanSnapshot?: (google.cloud.backupdr.v1beta.IBackupPlan|null); + + /** BackupPlanRevision createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new BackupPlanRevision instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanRevision instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupPlanRevision): google.cloud.backupdr.v1beta.BackupPlanRevision; + + /** + * Encodes the specified BackupPlanRevision message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanRevision.verify|verify} messages. + * @param message BackupPlanRevision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupPlanRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanRevision message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanRevision.verify|verify} messages. + * @param message BackupPlanRevision message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupPlanRevision, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanRevision message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanRevision + * @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.v1beta.BackupPlanRevision; + + /** + * Decodes a BackupPlanRevision message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanRevision + * @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.v1beta.BackupPlanRevision; + + /** + * Verifies a BackupPlanRevision message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanRevision message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanRevision + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupPlanRevision; + + /** + * Creates a plain object from a BackupPlanRevision message. Also converts values to other types if specified. + * @param message BackupPlanRevision + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupPlanRevision, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanRevision to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanRevision + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanRevision { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a GetBackupPlanRevisionRequest. */ + interface IGetBackupPlanRevisionRequest { + + /** GetBackupPlanRevisionRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRevisionRequest. */ + class GetBackupPlanRevisionRequest implements IGetBackupPlanRevisionRequest { + + /** + * Constructs a new GetBackupPlanRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest); + + /** GetBackupPlanRevisionRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRevisionRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest): google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; + + /** + * Encodes the specified GetBackupPlanRevisionRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.verify|verify} messages. + * @param message GetBackupPlanRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.verify|verify} messages. + * @param message GetBackupPlanRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRevisionRequest + * @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.v1beta.GetBackupPlanRevisionRequest; + + /** + * Decodes a GetBackupPlanRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRevisionRequest + * @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.v1beta.GetBackupPlanRevisionRequest; + + /** + * Verifies a GetBackupPlanRevisionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; + + /** + * Creates a plain object from a GetBackupPlanRevisionRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanRevisionsRequest. */ + interface IListBackupPlanRevisionsRequest { + + /** ListBackupPlanRevisionsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanRevisionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListBackupPlanRevisionsRequest. */ + class ListBackupPlanRevisionsRequest implements IListBackupPlanRevisionsRequest { + + /** + * Constructs a new ListBackupPlanRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest); + + /** ListBackupPlanRevisionsRequest parent. */ + public parent: string; + + /** ListBackupPlanRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanRevisionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListBackupPlanRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanRevisionsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest): google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; + + /** + * Encodes the specified ListBackupPlanRevisionsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.verify|verify} messages. + * @param message ListBackupPlanRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.verify|verify} messages. + * @param message ListBackupPlanRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanRevisionsRequest + * @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.v1beta.ListBackupPlanRevisionsRequest; + + /** + * Decodes a ListBackupPlanRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanRevisionsRequest + * @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.v1beta.ListBackupPlanRevisionsRequest; + + /** + * Verifies a ListBackupPlanRevisionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; + + /** + * Creates a plain object from a ListBackupPlanRevisionsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanRevisionsResponse. */ + interface IListBackupPlanRevisionsResponse { + + /** ListBackupPlanRevisionsResponse backupPlanRevisions */ + backupPlanRevisions?: (google.cloud.backupdr.v1beta.IBackupPlanRevision[]|null); + + /** ListBackupPlanRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanRevisionsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanRevisionsResponse. */ + class ListBackupPlanRevisionsResponse implements IListBackupPlanRevisionsResponse { + + /** + * Constructs a new ListBackupPlanRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse); + + /** ListBackupPlanRevisionsResponse backupPlanRevisions. */ + public backupPlanRevisions: google.cloud.backupdr.v1beta.IBackupPlanRevision[]; + + /** ListBackupPlanRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanRevisionsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanRevisionsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse): google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; + + /** + * Encodes the specified ListBackupPlanRevisionsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.verify|verify} messages. + * @param message ListBackupPlanRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.verify|verify} messages. + * @param message ListBackupPlanRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanRevisionsResponse + * @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.v1beta.ListBackupPlanRevisionsResponse; + + /** + * Decodes a ListBackupPlanRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanRevisionsResponse + * @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.v1beta.ListBackupPlanRevisionsResponse; + + /** + * Verifies a ListBackupPlanRevisionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; + + /** + * Creates a plain object from a ListBackupPlanRevisionsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiskBackupPlanProperties. */ + interface IDiskBackupPlanProperties { + + /** DiskBackupPlanProperties guestFlush */ + guestFlush?: (boolean|null); + } + + /** Represents a DiskBackupPlanProperties. */ + class DiskBackupPlanProperties implements IDiskBackupPlanProperties { + + /** + * Constructs a new DiskBackupPlanProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDiskBackupPlanProperties); + + /** DiskBackupPlanProperties guestFlush. */ + public guestFlush: boolean; + + /** + * Creates a new DiskBackupPlanProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskBackupPlanProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDiskBackupPlanProperties): google.cloud.backupdr.v1beta.DiskBackupPlanProperties; + + /** + * Encodes the specified DiskBackupPlanProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskBackupPlanProperties.verify|verify} messages. + * @param message DiskBackupPlanProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDiskBackupPlanProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiskBackupPlanProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskBackupPlanProperties.verify|verify} messages. + * @param message DiskBackupPlanProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDiskBackupPlanProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiskBackupPlanProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskBackupPlanProperties + * @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.v1beta.DiskBackupPlanProperties; + + /** + * Decodes a DiskBackupPlanProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskBackupPlanProperties + * @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.v1beta.DiskBackupPlanProperties; + + /** + * Verifies a DiskBackupPlanProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiskBackupPlanProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskBackupPlanProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DiskBackupPlanProperties; + + /** + * Creates a plain object from a DiskBackupPlanProperties message. Also converts values to other types if specified. + * @param message DiskBackupPlanProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DiskBackupPlanProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiskBackupPlanProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiskBackupPlanProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceBackupPlanProperties. */ + interface IComputeInstanceBackupPlanProperties { + + /** ComputeInstanceBackupPlanProperties guestFlush */ + guestFlush?: (boolean|null); + } + + /** Represents a ComputeInstanceBackupPlanProperties. */ + class ComputeInstanceBackupPlanProperties implements IComputeInstanceBackupPlanProperties { + + /** + * Constructs a new ComputeInstanceBackupPlanProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties); + + /** ComputeInstanceBackupPlanProperties guestFlush. */ + public guestFlush: boolean; + + /** + * Creates a new ComputeInstanceBackupPlanProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupPlanProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties): google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties; + + /** + * Encodes the specified ComputeInstanceBackupPlanProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.verify|verify} messages. + * @param message ComputeInstanceBackupPlanProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupPlanProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.verify|verify} messages. + * @param message ComputeInstanceBackupPlanProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IComputeInstanceBackupPlanProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupPlanProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupPlanProperties + * @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.v1beta.ComputeInstanceBackupPlanProperties; + + /** + * Decodes a ComputeInstanceBackupPlanProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupPlanProperties + * @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.v1beta.ComputeInstanceBackupPlanProperties; + + /** + * Verifies a ComputeInstanceBackupPlanProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupPlanProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupPlanProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupPlanProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupPlanProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupPlanProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupPlanProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanAssociation. */ + interface IBackupPlanAssociation { + + /** BackupPlanAssociation cloudSqlInstanceBackupPlanAssociationProperties */ + cloudSqlInstanceBackupPlanAssociationProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties|null); + + /** BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties */ + alloydbClusterBackupPlanAssociationProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterBackupPlanAssociationProperties|null); + + /** BackupPlanAssociation name */ + name?: (string|null); + + /** BackupPlanAssociation resourceType */ + resourceType?: (string|null); + + /** BackupPlanAssociation resource */ + resource?: (string|null); + + /** BackupPlanAssociation backupPlan */ + backupPlan?: (string|null); + + /** BackupPlanAssociation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state */ + state?: (google.cloud.backupdr.v1beta.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlanAssociation.State|null); + + /** BackupPlanAssociation rulesConfigInfo */ + rulesConfigInfo?: (google.cloud.backupdr.v1beta.IRuleConfigInfo[]|null); + + /** BackupPlanAssociation dataSource */ + dataSource?: (string|null); + + /** BackupPlanAssociation backupPlanRevisionId */ + backupPlanRevisionId?: (string|null); + + /** BackupPlanAssociation backupPlanRevisionName */ + backupPlanRevisionName?: (string|null); + + /** BackupPlanAssociation autoProtectionPolicyBinding */ + autoProtectionPolicyBinding?: (string|null); + } + + /** Represents a BackupPlanAssociation. */ + class BackupPlanAssociation implements IBackupPlanAssociation { + + /** + * Constructs a new BackupPlanAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupPlanAssociation); + + /** BackupPlanAssociation cloudSqlInstanceBackupPlanAssociationProperties. */ + public cloudSqlInstanceBackupPlanAssociationProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties|null); + + /** BackupPlanAssociation alloydbClusterBackupPlanAssociationProperties. */ + public alloydbClusterBackupPlanAssociationProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterBackupPlanAssociationProperties|null); + + /** BackupPlanAssociation name. */ + public name: string; + + /** BackupPlanAssociation resourceType. */ + public resourceType: string; + + /** BackupPlanAssociation resource. */ + public resource: string; + + /** BackupPlanAssociation backupPlan. */ + public backupPlan: string; + + /** BackupPlanAssociation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state. */ + public state: (google.cloud.backupdr.v1beta.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1beta.BackupPlanAssociation.State); + + /** BackupPlanAssociation rulesConfigInfo. */ + public rulesConfigInfo: google.cloud.backupdr.v1beta.IRuleConfigInfo[]; + + /** BackupPlanAssociation dataSource. */ + public dataSource: string; + + /** BackupPlanAssociation backupPlanRevisionId. */ + public backupPlanRevisionId: string; + + /** BackupPlanAssociation backupPlanRevisionName. */ + public backupPlanRevisionName: string; + + /** BackupPlanAssociation autoProtectionPolicyBinding. */ + public autoProtectionPolicyBinding: string; + + /** BackupPlanAssociation resourceProperties. */ + public resourceProperties?: ("cloudSqlInstanceBackupPlanAssociationProperties"|"alloydbClusterBackupPlanAssociationProperties"); + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanAssociation instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupPlanAssociation): google.cloud.backupdr.v1beta.BackupPlanAssociation; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanAssociation + * @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.v1beta.BackupPlanAssociation; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanAssociation + * @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.v1beta.BackupPlanAssociation; + + /** + * Verifies a BackupPlanAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanAssociation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupPlanAssociation; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @param message BackupPlanAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanAssociation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4, + UPDATING = 5, + PAUSED = 6 + } + } + + /** Properties of a RuleConfigInfo. */ + interface IRuleConfigInfo { + + /** RuleConfigInfo ruleId */ + ruleId?: (string|null); + + /** RuleConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState|null); + + /** RuleConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RuleConfigInfo. */ + class RuleConfigInfo implements IRuleConfigInfo { + + /** + * Constructs a new RuleConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IRuleConfigInfo); + + /** RuleConfigInfo ruleId. */ + public ruleId: string; + + /** RuleConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState); + + /** RuleConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RuleConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IRuleConfigInfo): google.cloud.backupdr.v1beta.RuleConfigInfo; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuleConfigInfo + * @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.v1beta.RuleConfigInfo; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuleConfigInfo + * @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.v1beta.RuleConfigInfo; + + /** + * Verifies a RuleConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuleConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.RuleConfigInfo; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @param message RuleConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuleConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuleConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RuleConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + PERMISSION_DENIED = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a CreateBackupPlanAssociationRequest. */ + interface ICreateBackupPlanAssociationRequest { + + /** CreateBackupPlanAssociationRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ + backupPlanAssociationId?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanAssociationRequest. */ + class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest); + + /** CreateBackupPlanAssociationRequest parent. */ + public parent: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ + public backupPlanAssociationId: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanAssociationRequest + * @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.v1beta.CreateBackupPlanAssociationRequest; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanAssociationRequest + * @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.v1beta.CreateBackupPlanAssociationRequest; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsRequest. */ + interface IListBackupPlanAssociationsRequest { + + /** ListBackupPlanAssociationsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanAssociationsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanAssociationsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlanAssociationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupPlanAssociationsRequest. */ + class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest); + + /** ListBackupPlanAssociationsRequest parent. */ + public parent: string; + + /** ListBackupPlanAssociationsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanAssociationsRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlanAssociationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsRequest + * @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.v1beta.ListBackupPlanAssociationsRequest; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsRequest + * @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.v1beta.ListBackupPlanAssociationsRequest; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsResponse. */ + interface IListBackupPlanAssociationsResponse { + + /** ListBackupPlanAssociationsResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation[]|null); + + /** ListBackupPlanAssociationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanAssociationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanAssociationsResponse. */ + class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse); + + /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1beta.IBackupPlanAssociation[]; + + /** ListBackupPlanAssociationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanAssociationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsResponse + * @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.v1beta.ListBackupPlanAssociationsResponse; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsResponse + * @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.v1beta.ListBackupPlanAssociationsResponse; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; + + /** + * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchBackupPlanAssociationsForResourceTypeRequest. */ + interface IFetchBackupPlanAssociationsForResourceTypeRequest { + + /** FetchBackupPlanAssociationsForResourceTypeRequest parent */ + parent?: (string|null); + + /** FetchBackupPlanAssociationsForResourceTypeRequest resourceType */ + resourceType?: (string|null); + + /** FetchBackupPlanAssociationsForResourceTypeRequest pageSize */ + pageSize?: (number|null); + + /** FetchBackupPlanAssociationsForResourceTypeRequest pageToken */ + pageToken?: (string|null); + + /** FetchBackupPlanAssociationsForResourceTypeRequest filter */ + filter?: (string|null); + + /** FetchBackupPlanAssociationsForResourceTypeRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchBackupPlanAssociationsForResourceTypeRequest. */ + class FetchBackupPlanAssociationsForResourceTypeRequest implements IFetchBackupPlanAssociationsForResourceTypeRequest { + + /** + * Constructs a new FetchBackupPlanAssociationsForResourceTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest); + + /** FetchBackupPlanAssociationsForResourceTypeRequest parent. */ + public parent: string; + + /** FetchBackupPlanAssociationsForResourceTypeRequest resourceType. */ + public resourceType: string; + + /** FetchBackupPlanAssociationsForResourceTypeRequest pageSize. */ + public pageSize: number; + + /** FetchBackupPlanAssociationsForResourceTypeRequest pageToken. */ + public pageToken: string; + + /** FetchBackupPlanAssociationsForResourceTypeRequest filter. */ + public filter: string; + + /** FetchBackupPlanAssociationsForResourceTypeRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchBackupPlanAssociationsForResourceTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupPlanAssociationsForResourceTypeRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest): google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; + + /** + * Encodes the specified FetchBackupPlanAssociationsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupPlanAssociationsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupPlanAssociationsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupPlanAssociationsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupPlanAssociationsForResourceTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupPlanAssociationsForResourceTypeRequest + * @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.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; + + /** + * Decodes a FetchBackupPlanAssociationsForResourceTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupPlanAssociationsForResourceTypeRequest + * @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.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; + + /** + * Verifies a FetchBackupPlanAssociationsForResourceTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchBackupPlanAssociationsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupPlanAssociationsForResourceTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; + + /** + * Creates a plain object from a FetchBackupPlanAssociationsForResourceTypeRequest message. Also converts values to other types if specified. + * @param message FetchBackupPlanAssociationsForResourceTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupPlanAssociationsForResourceTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupPlanAssociationsForResourceTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchBackupPlanAssociationsForResourceTypeResponse. */ + interface IFetchBackupPlanAssociationsForResourceTypeResponse { + + /** FetchBackupPlanAssociationsForResourceTypeResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation[]|null); + + /** FetchBackupPlanAssociationsForResourceTypeResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchBackupPlanAssociationsForResourceTypeResponse. */ + class FetchBackupPlanAssociationsForResourceTypeResponse implements IFetchBackupPlanAssociationsForResourceTypeResponse { + + /** + * Constructs a new FetchBackupPlanAssociationsForResourceTypeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse); + + /** FetchBackupPlanAssociationsForResourceTypeResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1beta.IBackupPlanAssociation[]; + + /** FetchBackupPlanAssociationsForResourceTypeResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchBackupPlanAssociationsForResourceTypeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupPlanAssociationsForResourceTypeResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse): google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; + + /** + * Encodes the specified FetchBackupPlanAssociationsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupPlanAssociationsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupPlanAssociationsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupPlanAssociationsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupPlanAssociationsForResourceTypeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupPlanAssociationsForResourceTypeResponse + * @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.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; + + /** + * Decodes a FetchBackupPlanAssociationsForResourceTypeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupPlanAssociationsForResourceTypeResponse + * @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.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; + + /** + * Verifies a FetchBackupPlanAssociationsForResourceTypeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchBackupPlanAssociationsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupPlanAssociationsForResourceTypeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; + + /** + * Creates a plain object from a FetchBackupPlanAssociationsForResourceTypeResponse message. Also converts values to other types if specified. + * @param message FetchBackupPlanAssociationsForResourceTypeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupPlanAssociationsForResourceTypeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupPlanAssociationsForResourceTypeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanAssociationRequest. */ + interface IGetBackupPlanAssociationRequest { + + /** GetBackupPlanAssociationRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanAssociationRequest. */ + class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest); + + /** GetBackupPlanAssociationRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanAssociationRequest + * @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.v1beta.GetBackupPlanAssociationRequest; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanAssociationRequest + * @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.v1beta.GetBackupPlanAssociationRequest; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanAssociationRequest. */ + interface IDeleteBackupPlanAssociationRequest { + + /** DeleteBackupPlanAssociationRequest name */ + name?: (string|null); + + /** DeleteBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupPlanAssociationRequest autoProtectionPolicyBinding */ + autoProtectionPolicyBinding?: (string|null); + } + + /** Represents a DeleteBackupPlanAssociationRequest. */ + class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest); + + /** DeleteBackupPlanAssociationRequest name. */ + public name: string; + + /** DeleteBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** DeleteBackupPlanAssociationRequest autoProtectionPolicyBinding. */ + public autoProtectionPolicyBinding: string; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanAssociationRequest + * @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.v1beta.DeleteBackupPlanAssociationRequest; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanAssociationRequest + * @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.v1beta.DeleteBackupPlanAssociationRequest; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; + + /** + * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupPlanAssociationRequest. */ + interface IUpdateBackupPlanAssociationRequest { + + /** UpdateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation|null); + + /** UpdateBackupPlanAssociationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupPlanAssociationRequest. */ + class UpdateBackupPlanAssociationRequest implements IUpdateBackupPlanAssociationRequest { + + /** + * Constructs a new UpdateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest); + + /** UpdateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1beta.IBackupPlanAssociation|null); + + /** UpdateBackupPlanAssociationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest): google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; + + /** + * Encodes the specified UpdateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.verify|verify} messages. + * @param message UpdateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.verify|verify} messages. + * @param message UpdateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupPlanAssociationRequest + * @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.v1beta.UpdateBackupPlanAssociationRequest; + + /** + * Decodes an UpdateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupPlanAssociationRequest + * @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.v1beta.UpdateBackupPlanAssociationRequest; + + /** + * Verifies an UpdateBackupPlanAssociationRequest 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 UpdateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; + + /** + * Creates a plain object from an UpdateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message UpdateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerBackupRequest. */ + interface ITriggerBackupRequest { + + /** TriggerBackupRequest name */ + name?: (string|null); + + /** TriggerBackupRequest ruleId */ + ruleId?: (string|null); + + /** TriggerBackupRequest requestId */ + requestId?: (string|null); + + /** TriggerBackupRequest customRetentionDays */ + customRetentionDays?: (number|null); + + /** TriggerBackupRequest labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a TriggerBackupRequest. */ + class TriggerBackupRequest implements ITriggerBackupRequest { + + /** + * Constructs a new TriggerBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ITriggerBackupRequest); + + /** TriggerBackupRequest name. */ + public name: string; + + /** TriggerBackupRequest ruleId. */ + public ruleId: string; + + /** TriggerBackupRequest requestId. */ + public requestId: string; + + /** TriggerBackupRequest customRetentionDays. */ + public customRetentionDays: number; + + /** TriggerBackupRequest labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ITriggerBackupRequest): google.cloud.backupdr.v1beta.TriggerBackupRequest; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerBackupRequest + * @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.v1beta.TriggerBackupRequest; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerBackupRequest + * @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.v1beta.TriggerBackupRequest; + + /** + * Verifies a TriggerBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.TriggerBackupRequest; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @param message TriggerBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDBClusterDataSourceProperties. */ + interface IAlloyDBClusterDataSourceProperties { + + /** AlloyDBClusterDataSourceProperties name */ + name?: (string|null); + + /** AlloyDBClusterDataSourceProperties pitrWindows */ + pitrWindows?: (google.cloud.backupdr.v1beta.IAlloyDbPitrWindow[]|null); + + /** AlloyDBClusterDataSourceProperties clusterUid */ + clusterUid?: (string|null); + } + + /** Represents an AlloyDBClusterDataSourceProperties. */ + class AlloyDBClusterDataSourceProperties implements IAlloyDBClusterDataSourceProperties { + + /** + * Constructs a new AlloyDBClusterDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceProperties); + + /** AlloyDBClusterDataSourceProperties name. */ + public name: string; + + /** AlloyDBClusterDataSourceProperties pitrWindows. */ + public pitrWindows: google.cloud.backupdr.v1beta.IAlloyDbPitrWindow[]; + + /** AlloyDBClusterDataSourceProperties clusterUid. */ + public clusterUid: 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.v1beta.IAlloyDBClusterDataSourceProperties): google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties; + + /** + * Encodes the specified AlloyDBClusterDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.IAlloyDBClusterDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDBClusterDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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 AlloyDBClusterDataSourceReferenceProperties. */ + interface IAlloyDBClusterDataSourceReferenceProperties { + + /** AlloyDBClusterDataSourceReferenceProperties name */ + name?: (string|null); + } + + /** Represents an AlloyDBClusterDataSourceReferenceProperties. */ + class AlloyDBClusterDataSourceReferenceProperties implements IAlloyDBClusterDataSourceReferenceProperties { + + /** + * Constructs a new AlloyDBClusterDataSourceReferenceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties); + + /** AlloyDBClusterDataSourceReferenceProperties name. */ + public name: string; + + /** + * Creates a new AlloyDBClusterDataSourceReferenceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDBClusterDataSourceReferenceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties): google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties; + + /** + * Encodes the specified AlloyDBClusterDataSourceReferenceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.verify|verify} messages. + * @param message AlloyDBClusterDataSourceReferenceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDBClusterDataSourceReferenceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.verify|verify} messages. + * @param message AlloyDBClusterDataSourceReferenceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDBClusterDataSourceReferenceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDBClusterDataSourceReferenceProperties + * @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.v1beta.AlloyDBClusterDataSourceReferenceProperties; + + /** + * Decodes an AlloyDBClusterDataSourceReferenceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDBClusterDataSourceReferenceProperties + * @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.v1beta.AlloyDBClusterDataSourceReferenceProperties; + + /** + * Verifies an AlloyDBClusterDataSourceReferenceProperties 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 AlloyDBClusterDataSourceReferenceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDBClusterDataSourceReferenceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties; + + /** + * Creates a plain object from an AlloyDBClusterDataSourceReferenceProperties message. Also converts values to other types if specified. + * @param message AlloyDBClusterDataSourceReferenceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDBClusterDataSourceReferenceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDBClusterDataSourceReferenceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDbPitrWindow. */ + interface IAlloyDbPitrWindow { + + /** AlloyDbPitrWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** AlloyDbPitrWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** AlloyDbPitrWindow logRetentionDays */ + logRetentionDays?: (number|Long|string|null); + } + + /** Represents an AlloyDbPitrWindow. */ + class AlloyDbPitrWindow implements IAlloyDbPitrWindow { + + /** + * Constructs a new AlloyDbPitrWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAlloyDbPitrWindow); + + /** AlloyDbPitrWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** AlloyDbPitrWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** AlloyDbPitrWindow logRetentionDays. */ + public logRetentionDays: (number|Long|string); + + /** + * Creates a new AlloyDbPitrWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDbPitrWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAlloyDbPitrWindow): google.cloud.backupdr.v1beta.AlloyDbPitrWindow; + + /** + * Encodes the specified AlloyDbPitrWindow message. Does not implicitly {@link google.cloud.backupdr.v1beta.AlloyDbPitrWindow.verify|verify} messages. + * @param message AlloyDbPitrWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAlloyDbPitrWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDbPitrWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AlloyDbPitrWindow.verify|verify} messages. + * @param message AlloyDbPitrWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAlloyDbPitrWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDbPitrWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDbPitrWindow + * @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.v1beta.AlloyDbPitrWindow; + + /** + * Decodes an AlloyDbPitrWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDbPitrWindow + * @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.v1beta.AlloyDbPitrWindow; + + /** + * Verifies an AlloyDbPitrWindow 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 AlloyDbPitrWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDbPitrWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AlloyDbPitrWindow; + + /** + * Creates a plain object from an AlloyDbPitrWindow message. Also converts values to other types if specified. + * @param message AlloyDbPitrWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AlloyDbPitrWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDbPitrWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDbPitrWindow + * @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.v1beta.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.v1beta.IAlloyDbClusterBackupProperties): google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties; + + /** + * Encodes the specified AlloyDbClusterBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.IAlloyDbClusterBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDbClusterBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.IAlloyDBClusterBackupPlanAssociationProperties): google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties; + + /** + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.IAlloyDBClusterBackupPlanAssociationProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDBClusterBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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 { + + /** CloudSqlInstanceDataSourceProperties name */ + name?: (string|null); + + /** CloudSqlInstanceDataSourceProperties databaseInstalledVersion */ + databaseInstalledVersion?: (string|null); + + /** CloudSqlInstanceDataSourceProperties instanceCreateTime */ + instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceDataSourceProperties instanceTier */ + instanceTier?: (string|null); + } + + /** Represents a CloudSqlInstanceDataSourceProperties. */ + class CloudSqlInstanceDataSourceProperties implements ICloudSqlInstanceDataSourceProperties { + + /** + * Constructs a new CloudSqlInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties); + + /** CloudSqlInstanceDataSourceProperties name. */ + public name: string; + + /** CloudSqlInstanceDataSourceProperties databaseInstalledVersion. */ + public databaseInstalledVersion: string; + + /** CloudSqlInstanceDataSourceProperties instanceCreateTime. */ + public instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceDataSourceProperties instanceTier. */ + public instanceTier: string; + + /** + * Creates a new CloudSqlInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties): google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties; + + /** + * Encodes the specified CloudSqlInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.verify|verify} messages. + * @param message CloudSqlInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.verify|verify} messages. + * @param message CloudSqlInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlInstanceDataSourceProperties + * @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.v1beta.CloudSqlInstanceDataSourceProperties; + + /** + * Decodes a CloudSqlInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlInstanceDataSourceProperties + * @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.v1beta.CloudSqlInstanceDataSourceProperties; + + /** + * Verifies a CloudSqlInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties; + + /** + * Creates a plain object from a CloudSqlInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message CloudSqlInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlInstanceBackupProperties. */ + interface ICloudSqlInstanceBackupProperties { + + /** CloudSqlInstanceBackupProperties databaseInstalledVersion */ + databaseInstalledVersion?: (string|null); + + /** CloudSqlInstanceBackupProperties finalBackup */ + finalBackup?: (boolean|null); + + /** CloudSqlInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** CloudSqlInstanceBackupProperties instanceCreateTime */ + instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceBackupProperties instanceTier */ + instanceTier?: (string|null); + + /** CloudSqlInstanceBackupProperties instanceDeleteTime */ + instanceDeleteTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudSqlInstanceBackupProperties. */ + class CloudSqlInstanceBackupProperties implements ICloudSqlInstanceBackupProperties { + + /** + * Constructs a new CloudSqlInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties); + + /** CloudSqlInstanceBackupProperties databaseInstalledVersion. */ + public databaseInstalledVersion: string; + + /** CloudSqlInstanceBackupProperties finalBackup. */ + public finalBackup: boolean; + + /** CloudSqlInstanceBackupProperties sourceInstance. */ + public sourceInstance: string; + + /** CloudSqlInstanceBackupProperties instanceCreateTime. */ + public instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceBackupProperties instanceTier. */ + public instanceTier: string; + + /** CloudSqlInstanceBackupProperties instanceDeleteTime. */ + public instanceDeleteTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CloudSqlInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties): google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties; + + /** + * Encodes the specified CloudSqlInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.verify|verify} messages. + * @param message CloudSqlInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.verify|verify} messages. + * @param message CloudSqlInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlInstanceBackupProperties + * @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.v1beta.CloudSqlInstanceBackupProperties; + + /** + * Decodes a CloudSqlInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlInstanceBackupProperties + * @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.v1beta.CloudSqlInstanceBackupProperties; + + /** + * Verifies a CloudSqlInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties; + + /** + * Creates a plain object from a CloudSqlInstanceBackupProperties message. Also converts values to other types if specified. + * @param message CloudSqlInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlInstanceDataSourceReferenceProperties. */ + interface ICloudSqlInstanceDataSourceReferenceProperties { + + /** CloudSqlInstanceDataSourceReferenceProperties name */ + name?: (string|null); + + /** CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion */ + databaseInstalledVersion?: (string|null); + + /** CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime */ + instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceDataSourceReferenceProperties instanceTier */ + instanceTier?: (string|null); + } + + /** Represents a CloudSqlInstanceDataSourceReferenceProperties. */ + class CloudSqlInstanceDataSourceReferenceProperties implements ICloudSqlInstanceDataSourceReferenceProperties { + + /** + * Constructs a new CloudSqlInstanceDataSourceReferenceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties); + + /** CloudSqlInstanceDataSourceReferenceProperties name. */ + public name: string; + + /** CloudSqlInstanceDataSourceReferenceProperties databaseInstalledVersion. */ + public databaseInstalledVersion: string; + + /** CloudSqlInstanceDataSourceReferenceProperties instanceCreateTime. */ + public instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** CloudSqlInstanceDataSourceReferenceProperties instanceTier. */ + public instanceTier: string; + + /** + * Creates a new CloudSqlInstanceDataSourceReferenceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlInstanceDataSourceReferenceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties): google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties; + + /** + * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * @param message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlInstanceDataSourceReferenceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.verify|verify} messages. + * @param message CloudSqlInstanceDataSourceReferenceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlInstanceDataSourceReferenceProperties + * @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.v1beta.CloudSqlInstanceDataSourceReferenceProperties; + + /** + * Decodes a CloudSqlInstanceDataSourceReferenceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlInstanceDataSourceReferenceProperties + * @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.v1beta.CloudSqlInstanceDataSourceReferenceProperties; + + /** + * Verifies a CloudSqlInstanceDataSourceReferenceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlInstanceDataSourceReferenceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlInstanceDataSourceReferenceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties; + + /** + * Creates a plain object from a CloudSqlInstanceDataSourceReferenceProperties message. Also converts values to other types if specified. + * @param message CloudSqlInstanceDataSourceReferenceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlInstanceDataSourceReferenceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlInstanceDataSourceReferenceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlInstanceInitializationConfig. */ + interface ICloudSqlInstanceInitializationConfig { + + /** CloudSqlInstanceInitializationConfig edition */ + edition?: (google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition|keyof typeof google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition|null); + } + + /** Represents a CloudSqlInstanceInitializationConfig. */ + class CloudSqlInstanceInitializationConfig implements ICloudSqlInstanceInitializationConfig { + + /** + * Constructs a new CloudSqlInstanceInitializationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig); + + /** CloudSqlInstanceInitializationConfig edition. */ + public edition: (google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition|keyof typeof google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition); + + /** + * Creates a new CloudSqlInstanceInitializationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlInstanceInitializationConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig): google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig; + + /** + * Encodes the specified CloudSqlInstanceInitializationConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.verify|verify} messages. + * @param message CloudSqlInstanceInitializationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlInstanceInitializationConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.verify|verify} messages. + * @param message CloudSqlInstanceInitializationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceInitializationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlInstanceInitializationConfig + * @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.v1beta.CloudSqlInstanceInitializationConfig; + + /** + * Decodes a CloudSqlInstanceInitializationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlInstanceInitializationConfig + * @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.v1beta.CloudSqlInstanceInitializationConfig; + + /** + * Verifies a CloudSqlInstanceInitializationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlInstanceInitializationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlInstanceInitializationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig; + + /** + * Creates a plain object from a CloudSqlInstanceInitializationConfig message. Also converts values to other types if specified. + * @param message CloudSqlInstanceInitializationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlInstanceInitializationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlInstanceInitializationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudSqlInstanceInitializationConfig { + + /** Edition enum. */ + enum Edition { + EDITION_UNSPECIFIED = 0, + ENTERPRISE = 1, + ENTERPRISE_PLUS = 2 + } + } + + /** Properties of a CloudSqlInstanceBackupPlanAssociationProperties. */ + interface ICloudSqlInstanceBackupPlanAssociationProperties { + + /** CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime */ + instanceCreateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudSqlInstanceBackupPlanAssociationProperties. */ + class CloudSqlInstanceBackupPlanAssociationProperties implements ICloudSqlInstanceBackupPlanAssociationProperties { + + /** + * Constructs a new CloudSqlInstanceBackupPlanAssociationProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties); + + /** CloudSqlInstanceBackupPlanAssociationProperties instanceCreateTime. */ + public instanceCreateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CloudSqlInstanceBackupPlanAssociationProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlInstanceBackupPlanAssociationProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties): google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties; + + /** + * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * @param message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlInstanceBackupPlanAssociationProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.verify|verify} messages. + * @param message CloudSqlInstanceBackupPlanAssociationProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupPlanAssociationProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlInstanceBackupPlanAssociationProperties + * @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.v1beta.CloudSqlInstanceBackupPlanAssociationProperties; + + /** + * Decodes a CloudSqlInstanceBackupPlanAssociationProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlInstanceBackupPlanAssociationProperties + * @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.v1beta.CloudSqlInstanceBackupPlanAssociationProperties; + + /** + * Verifies a CloudSqlInstanceBackupPlanAssociationProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlInstanceBackupPlanAssociationProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlInstanceBackupPlanAssociationProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties; + + /** + * Creates a plain object from a CloudSqlInstanceBackupPlanAssociationProperties message. Also converts values to other types if specified. + * @param message CloudSqlInstanceBackupPlanAssociationProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlInstanceBackupPlanAssociationProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlInstanceBackupPlanAssociationProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } + + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } + + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration */ + backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault backupRetentionInheritance */ + backupRetentionInheritance?: (google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|null); + + /** BackupVault deletable */ + deletable?: (boolean|null); + + /** BackupVault etag */ + etag?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.backupdr.v1beta.BackupVault.State|keyof typeof google.cloud.backupdr.v1beta.BackupVault.State|null); + + /** BackupVault effectiveTime */ + effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount */ + backupCount?: (number|Long|string|null); + + /** BackupVault serviceAccount */ + serviceAccount?: (string|null); + + /** BackupVault totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** BackupVault uid */ + uid?: (string|null); + + /** BackupVault annotations */ + annotations?: ({ [k: string]: string }|null); + + /** BackupVault accessRestriction */ + accessRestriction?: (google.cloud.backupdr.v1beta.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1beta.BackupVault.AccessRestriction|null); + + /** BackupVault encryptionConfig */ + encryptionConfig?: (google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault description. */ + public description?: (string|null); + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration. */ + public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault backupRetentionInheritance. */ + public backupRetentionInheritance?: (google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|null); + + /** BackupVault deletable. */ + public deletable?: (boolean|null); + + /** BackupVault etag. */ + public etag?: (string|null); + + /** BackupVault state. */ + public state: (google.cloud.backupdr.v1beta.BackupVault.State|keyof typeof google.cloud.backupdr.v1beta.BackupVault.State); + + /** BackupVault effectiveTime. */ + public effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount. */ + public backupCount: (number|Long|string); + + /** BackupVault serviceAccount. */ + public serviceAccount: string; + + /** BackupVault totalStoredBytes. */ + public totalStoredBytes: (number|Long|string); + + /** BackupVault uid. */ + public uid: string; + + /** BackupVault annotations. */ + public annotations: { [k: string]: string }; + + /** BackupVault accessRestriction. */ + public accessRestriction: (google.cloud.backupdr.v1beta.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1beta.BackupVault.AccessRestriction); + + /** BackupVault encryptionConfig. */ + public encryptionConfig?: (google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig|null); + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupVault): google.cloud.backupdr.v1beta.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupVault + * @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.v1beta.BackupVault; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupVault + * @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.v1beta.BackupVault; + + /** + * Verifies a BackupVault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupVault + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupVault; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @param message BackupVault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupVault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupVault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupVault { + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig): google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.BackupVault.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @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.v1beta.BackupVault.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @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.v1beta.BackupVault.EncryptionConfig; + + /** + * Verifies an EncryptionConfig 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 EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupRetentionInheritance enum. */ + enum BackupRetentionInheritance { + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0, + INHERIT_VAULT_RETENTION = 1, + MATCH_BACKUP_EXPIRE_TIME = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4, + UPDATING = 5 + } + + /** AccessRestriction enum. */ + enum AccessRestriction { + ACCESS_RESTRICTION_UNSPECIFIED = 0, + WITHIN_PROJECT = 1, + WITHIN_ORGANIZATION = 2, + UNRESTRICTED = 3, + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource dataSourceGcpResource */ + dataSourceGcpResource?: (google.cloud.backupdr.v1beta.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication */ + dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication|null); + + /** DataSource name */ + name?: (string|null); + + /** DataSource state */ + state?: (google.cloud.backupdr.v1beta.DataSource.State|keyof typeof google.cloud.backupdr.v1beta.DataSource.State|null); + + /** DataSource labels */ + labels?: ({ [k: string]: string }|null); + + /** DataSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount */ + backupCount?: (number|Long|string|null); + + /** DataSource etag */ + etag?: (string|null); + + /** DataSource totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState */ + configState?: (google.cloud.backupdr.v1beta.BackupConfigState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigState|null); + + /** DataSource backupConfigInfo */ + backupConfigInfo?: (google.cloud.backupdr.v1beta.IBackupConfigInfo|null); + + /** DataSource backupBlockedByVaultAccessRestriction */ + backupBlockedByVaultAccessRestriction?: (boolean|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSource); + + /** DataSource dataSourceGcpResource. */ + public dataSourceGcpResource?: (google.cloud.backupdr.v1beta.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication. */ + public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication|null); + + /** DataSource name. */ + public name: string; + + /** DataSource state. */ + public state: (google.cloud.backupdr.v1beta.DataSource.State|keyof typeof google.cloud.backupdr.v1beta.DataSource.State); + + /** DataSource labels. */ + public labels: { [k: string]: string }; + + /** DataSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount. */ + public backupCount?: (number|Long|string|null); + + /** DataSource etag. */ + public etag?: (string|null); + + /** DataSource totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState. */ + public configState: (google.cloud.backupdr.v1beta.BackupConfigState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigState); + + /** DataSource backupConfigInfo. */ + public backupConfigInfo?: (google.cloud.backupdr.v1beta.IBackupConfigInfo|null); + + /** DataSource backupBlockedByVaultAccessRestriction. */ + public backupBlockedByVaultAccessRestriction: boolean; + + /** DataSource sourceResource. */ + public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSource): google.cloud.backupdr.v1beta.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @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.v1beta.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @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.v1beta.DataSource; + + /** + * Verifies a DataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + } + + /** Properties of a BackupConfigInfo. */ + interface IBackupConfigInfo { + + /** BackupConfigInfo gcpBackupConfig */ + gcpBackupConfig?: (google.cloud.backupdr.v1beta.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig */ + backupApplianceBackupConfig?: (google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|null); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + } + + /** Represents a BackupConfigInfo. */ + class BackupConfigInfo implements IBackupConfigInfo { + + /** + * Constructs a new BackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupConfigInfo); + + /** BackupConfigInfo gcpBackupConfig. */ + public gcpBackupConfig?: (google.cloud.backupdr.v1beta.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig. */ + public backupApplianceBackupConfig?: (google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo backupConfig. */ + public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupConfigInfo): google.cloud.backupdr.v1beta.BackupConfigInfo; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigInfo + * @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.v1beta.BackupConfigInfo; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigInfo + * @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.v1beta.BackupConfigInfo; + + /** + * Verifies a BackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupConfigInfo; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @param message BackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + PERMISSION_DENIED = 4 + } + } + + /** Properties of a GcpBackupConfig. */ + interface IGcpBackupConfig { + + /** GcpBackupConfig backupPlan */ + backupPlan?: (string|null); + + /** GcpBackupConfig backupPlanDescription */ + backupPlanDescription?: (string|null); + + /** GcpBackupConfig backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** GcpBackupConfig backupPlanRules */ + backupPlanRules?: (string[]|null); + + /** GcpBackupConfig backupPlanRevisionName */ + backupPlanRevisionName?: (string|null); + + /** GcpBackupConfig backupPlanRevisionId */ + backupPlanRevisionId?: (string|null); + + /** GcpBackupConfig autoProtectionPolicyBinding */ + autoProtectionPolicyBinding?: (string|null); + } + + /** Represents a GcpBackupConfig. */ + class GcpBackupConfig implements IGcpBackupConfig { + + /** + * Constructs a new GcpBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGcpBackupConfig); + + /** GcpBackupConfig backupPlan. */ + public backupPlan: string; + + /** GcpBackupConfig backupPlanDescription. */ + public backupPlanDescription: string; + + /** GcpBackupConfig backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** GcpBackupConfig backupPlanRules. */ + public backupPlanRules: string[]; + + /** GcpBackupConfig backupPlanRevisionName. */ + public backupPlanRevisionName: string; + + /** GcpBackupConfig backupPlanRevisionId. */ + public backupPlanRevisionId: string; + + /** GcpBackupConfig autoProtectionPolicyBinding. */ + public autoProtectionPolicyBinding: string; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGcpBackupConfig): google.cloud.backupdr.v1beta.GcpBackupConfig; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpBackupConfig + * @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.v1beta.GcpBackupConfig; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpBackupConfig + * @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.v1beta.GcpBackupConfig; + + /** + * Verifies a GcpBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GcpBackupConfig; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @param message GcpBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceBackupConfig. */ + interface IBackupApplianceBackupConfig { + + /** BackupApplianceBackupConfig backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceBackupConfig backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig applicationName */ + applicationName?: (string|null); + + /** BackupApplianceBackupConfig hostName */ + hostName?: (string|null); + + /** BackupApplianceBackupConfig sltName */ + sltName?: (string|null); + + /** BackupApplianceBackupConfig slpName */ + slpName?: (string|null); + } + + /** Represents a BackupApplianceBackupConfig. */ + class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { + + /** + * Constructs a new BackupApplianceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig); + + /** BackupApplianceBackupConfig backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceBackupConfig backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceBackupConfig slaId. */ + public slaId: (number|Long|string); + + /** BackupApplianceBackupConfig applicationName. */ + public applicationName: string; + + /** BackupApplianceBackupConfig hostName. */ + public hostName: string; + + /** BackupApplianceBackupConfig sltName. */ + public sltName: string; + + /** BackupApplianceBackupConfig slpName. */ + public slpName: string; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig): google.cloud.backupdr.v1beta.BackupApplianceBackupConfig; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupConfig + * @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.v1beta.BackupApplianceBackupConfig; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupConfig + * @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.v1beta.BackupApplianceBackupConfig; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupApplianceBackupConfig; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @param message BackupApplianceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResource. */ + interface IDataSourceGcpResource { + + /** DataSourceGcpResource computeInstanceDatasourceProperties */ + computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource cloudSqlInstanceDatasourceProperties */ + cloudSqlInstanceDatasourceProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties|null); + + /** DataSourceGcpResource alloyDbClusterDatasourceProperties */ + alloyDbClusterDatasourceProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceProperties|null); + + /** DataSourceGcpResource diskDatasourceProperties */ + diskDatasourceProperties?: (google.cloud.backupdr.v1beta.IDiskDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResource location */ + location?: (string|null); + + /** DataSourceGcpResource type */ + type?: (string|null); + } + + /** Represents a DataSourceGcpResource. */ + class DataSourceGcpResource implements IDataSourceGcpResource { + + /** + * Constructs a new DataSourceGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSourceGcpResource); + + /** DataSourceGcpResource computeInstanceDatasourceProperties. */ + public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource cloudSqlInstanceDatasourceProperties. */ + public cloudSqlInstanceDatasourceProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceProperties|null); + + /** DataSourceGcpResource alloyDbClusterDatasourceProperties. */ + public alloyDbClusterDatasourceProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceProperties|null); + + /** DataSourceGcpResource diskDatasourceProperties. */ + public diskDatasourceProperties?: (google.cloud.backupdr.v1beta.IDiskDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResource location. */ + public location: string; + + /** DataSourceGcpResource type. */ + public type: string; + + /** DataSourceGcpResource gcpResourceProperties. */ + public gcpResourceProperties?: ("computeInstanceDatasourceProperties"|"cloudSqlInstanceDatasourceProperties"|"alloyDbClusterDatasourceProperties"|"diskDatasourceProperties"); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSourceGcpResource): google.cloud.backupdr.v1beta.DataSourceGcpResource; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResource + * @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.v1beta.DataSourceGcpResource; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResource + * @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.v1beta.DataSourceGcpResource; + + /** + * Verifies a DataSourceGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSourceGcpResource; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @param message DataSourceGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupApplianceApplication. */ + interface IDataSourceBackupApplianceApplication { + + /** DataSourceBackupApplianceApplication applicationName */ + applicationName?: (string|null); + + /** DataSourceBackupApplianceApplication backupAppliance */ + backupAppliance?: (string|null); + + /** DataSourceBackupApplianceApplication applianceId */ + applianceId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication type */ + type?: (string|null); + + /** DataSourceBackupApplianceApplication applicationId */ + applicationId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication hostname */ + hostname?: (string|null); + + /** DataSourceBackupApplianceApplication hostId */ + hostId?: (number|Long|string|null); + } + + /** Represents a DataSourceBackupApplianceApplication. */ + class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication); + + /** DataSourceBackupApplianceApplication applicationName. */ + public applicationName: string; + + /** DataSourceBackupApplianceApplication backupAppliance. */ + public backupAppliance: string; + + /** DataSourceBackupApplianceApplication applianceId. */ + public applianceId: (number|Long|string); + + /** DataSourceBackupApplianceApplication type. */ + public type: string; + + /** DataSourceBackupApplianceApplication applicationId. */ + public applicationId: (number|Long|string); + + /** DataSourceBackupApplianceApplication hostname. */ + public hostname: string; + + /** DataSourceBackupApplianceApplication hostId. */ + public hostId: (number|Long|string); + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupApplianceApplication instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupApplianceApplication + * @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.v1beta.DataSourceBackupApplianceApplication; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupApplianceApplication + * @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.v1beta.DataSourceBackupApplianceApplication; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupApplianceApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @param message DataSourceBackupApplianceApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceLockInfo. */ + interface IServiceLockInfo { + + /** ServiceLockInfo operation */ + operation?: (string|null); + } + + /** Represents a ServiceLockInfo. */ + class ServiceLockInfo implements IServiceLockInfo { + + /** + * Constructs a new ServiceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IServiceLockInfo); + + /** ServiceLockInfo operation. */ + public operation: string; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IServiceLockInfo): google.cloud.backupdr.v1beta.ServiceLockInfo; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLockInfo + * @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.v1beta.ServiceLockInfo; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLockInfo + * @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.v1beta.ServiceLockInfo; + + /** + * Verifies a ServiceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ServiceLockInfo; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @param message ServiceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceLockInfo. */ + interface IBackupApplianceLockInfo { + + /** BackupApplianceLockInfo jobName */ + jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage */ + backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceLockInfo lockReason */ + lockReason?: (string|null); + } + + /** Represents a BackupApplianceLockInfo. */ + class BackupApplianceLockInfo implements IBackupApplianceLockInfo { + + /** + * Constructs a new BackupApplianceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupApplianceLockInfo); + + /** BackupApplianceLockInfo jobName. */ + public jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage. */ + public backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId. */ + public slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceLockInfo backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceLockInfo lockReason. */ + public lockReason: string; + + /** BackupApplianceLockInfo lockSource. */ + public lockSource?: ("jobName"|"backupImage"|"slaId"); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupApplianceLockInfo): google.cloud.backupdr.v1beta.BackupApplianceLockInfo; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceLockInfo + * @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.v1beta.BackupApplianceLockInfo; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceLockInfo + * @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.v1beta.BackupApplianceLockInfo; + + /** + * Verifies a BackupApplianceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupApplianceLockInfo; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @param message BackupApplianceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLock. */ + interface IBackupLock { + + /** BackupLock backupApplianceLockInfo */ + backupApplianceLockInfo?: (google.cloud.backupdr.v1beta.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo */ + serviceLockInfo?: (google.cloud.backupdr.v1beta.IServiceLockInfo|null); + + /** BackupLock lockUntilTime */ + lockUntilTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupLock. */ + class BackupLock implements IBackupLock { + + /** + * Constructs a new BackupLock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupLock); + + /** BackupLock backupApplianceLockInfo. */ + public backupApplianceLockInfo?: (google.cloud.backupdr.v1beta.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo. */ + public serviceLockInfo?: (google.cloud.backupdr.v1beta.IServiceLockInfo|null); + + /** BackupLock lockUntilTime. */ + public lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock ClientLockInfo. */ + public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); + + /** + * Creates a new BackupLock instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLock instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupLock): google.cloud.backupdr.v1beta.BackupLock; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLock + * @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.v1beta.BackupLock; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLock + * @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.v1beta.BackupLock; + + /** + * Verifies a BackupLock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupLock; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @param message BackupLock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup computeInstanceBackupProperties */ + computeInstanceBackupProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties|null); + + /** Backup cloudSqlInstanceBackupProperties */ + cloudSqlInstanceBackupProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties */ + backupApplianceBackupProperties?: (google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties|null); + + /** Backup alloyDbBackupProperties */ + alloyDbBackupProperties?: (google.cloud.backupdr.v1beta.IAlloyDbClusterBackupProperties|null); + + /** Backup diskBackupProperties */ + diskBackupProperties?: (google.cloud.backupdr.v1beta.IDiskBackupProperties|null); + + /** Backup gcpBackupPlanInfo */ + gcpBackupPlanInfo?: (google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo|null); + + /** Backup gcpResource */ + gcpResource?: (google.cloud.backupdr.v1beta.IBackupGcpResource|null); + + /** Backup name */ + name?: (string|null); + + /** Backup description */ + description?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup backupRetentionInheritance */ + backupRetentionInheritance?: (google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag */ + etag?: (string|null); + + /** Backup state */ + state?: (google.cloud.backupdr.v1beta.Backup.State|keyof typeof google.cloud.backupdr.v1beta.Backup.State|null); + + /** Backup serviceLocks */ + serviceLocks?: (google.cloud.backupdr.v1beta.IBackupLock[]|null); + + /** Backup backupApplianceLocks */ + backupApplianceLocks?: (google.cloud.backupdr.v1beta.IBackupLock[]|null); + + /** Backup backupType */ + backupType?: (google.cloud.backupdr.v1beta.Backup.BackupType|keyof typeof google.cloud.backupdr.v1beta.Backup.BackupType|null); + + /** Backup resourceSizeBytes */ + resourceSizeBytes?: (number|Long|string|null); + + /** Backup satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Backup satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Backup kmsKeyVersions */ + kmsKeyVersions?: (string[]|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackup); + + /** Backup computeInstanceBackupProperties. */ + public computeInstanceBackupProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties|null); + + /** Backup cloudSqlInstanceBackupProperties. */ + public cloudSqlInstanceBackupProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties. */ + public backupApplianceBackupProperties?: (google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties|null); + + /** Backup alloyDbBackupProperties. */ + public alloyDbBackupProperties?: (google.cloud.backupdr.v1beta.IAlloyDbClusterBackupProperties|null); + + /** Backup diskBackupProperties. */ + public diskBackupProperties?: (google.cloud.backupdr.v1beta.IDiskBackupProperties|null); + + /** Backup gcpBackupPlanInfo. */ + public gcpBackupPlanInfo?: (google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo|null); + + /** Backup gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1beta.IBackupGcpResource|null); + + /** Backup name. */ + public name: string; + + /** Backup description. */ + public description?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup backupRetentionInheritance. */ + public backupRetentionInheritance?: (google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|keyof typeof google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance|null); + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag. */ + public etag?: (string|null); + + /** Backup state. */ + public state: (google.cloud.backupdr.v1beta.Backup.State|keyof typeof google.cloud.backupdr.v1beta.Backup.State); + + /** Backup serviceLocks. */ + public serviceLocks: google.cloud.backupdr.v1beta.IBackupLock[]; + + /** Backup backupApplianceLocks. */ + public backupApplianceLocks: google.cloud.backupdr.v1beta.IBackupLock[]; + + /** Backup backupType. */ + public backupType: (google.cloud.backupdr.v1beta.Backup.BackupType|keyof typeof google.cloud.backupdr.v1beta.Backup.BackupType); + + /** Backup resourceSizeBytes. */ + public resourceSizeBytes: (number|Long|string); + + /** Backup satisfiesPzs. */ + public satisfiesPzs?: (boolean|null); + + /** Backup satisfiesPzi. */ + public satisfiesPzi?: (boolean|null); + + /** Backup kmsKeyVersions. */ + public kmsKeyVersions: string[]; + + /** Backup backupProperties. */ + public backupProperties?: ("computeInstanceBackupProperties"|"cloudSqlInstanceBackupProperties"|"backupApplianceBackupProperties"|"alloyDbBackupProperties"|"diskBackupProperties"); + + /** Backup planInfo. */ + public planInfo?: "gcpBackupPlanInfo"; + + /** Backup sourceResource. */ + public sourceResource?: "gcpResource"; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackup): google.cloud.backupdr.v1beta.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1beta.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @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.v1beta.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @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.v1beta.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** Properties of a GCPBackupPlanInfo. */ + interface IGCPBackupPlanInfo { + + /** GCPBackupPlanInfo backupPlan */ + backupPlan?: (string|null); + + /** GCPBackupPlanInfo backupPlanRuleId */ + backupPlanRuleId?: (string|null); + + /** GCPBackupPlanInfo backupPlanRevisionName */ + backupPlanRevisionName?: (string|null); + + /** GCPBackupPlanInfo backupPlanRevisionId */ + backupPlanRevisionId?: (string|null); + } + + /** Represents a GCPBackupPlanInfo. */ + class GCPBackupPlanInfo implements IGCPBackupPlanInfo { + + /** + * Constructs a new GCPBackupPlanInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo); + + /** GCPBackupPlanInfo backupPlan. */ + public backupPlan: string; + + /** GCPBackupPlanInfo backupPlanRuleId. */ + public backupPlanRuleId: string; + + /** GCPBackupPlanInfo backupPlanRevisionName. */ + public backupPlanRevisionName: string; + + /** GCPBackupPlanInfo backupPlanRevisionId. */ + public backupPlanRevisionId: string; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPBackupPlanInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPBackupPlanInfo + * @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.v1beta.Backup.GCPBackupPlanInfo; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPBackupPlanInfo + * @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.v1beta.Backup.GCPBackupPlanInfo; + + /** + * Verifies a GCPBackupPlanInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPBackupPlanInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @param message GCPBackupPlanInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4, + UPLOADING = 5 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + SCHEDULED = 1, + ON_DEMAND = 2, + ON_DEMAND_OPERATIONAL = 3 + } + } + + /** Properties of a CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1beta.IBackupVault|null); + + /** CreateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** CreateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1beta.IBackupVault|null); + + /** CreateBackupVaultRequest requestId. */ + public requestId: string; + + /** CreateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest): google.cloud.backupdr.v1beta.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupVaultRequest + * @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.v1beta.CreateBackupVaultRequest; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupVaultRequest + * @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.v1beta.CreateBackupVaultRequest; + + /** + * Verifies a CreateBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CreateBackupVaultRequest; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @param message CreateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest view */ + view?: (google.cloud.backupdr.v1beta.BackupVaultView|keyof typeof google.cloud.backupdr.v1beta.BackupVaultView|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest view. */ + public view: (google.cloud.backupdr.v1beta.BackupVaultView|keyof typeof google.cloud.backupdr.v1beta.BackupVaultView); + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupVaultsRequest): google.cloud.backupdr.v1beta.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsRequest + * @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.v1beta.ListBackupVaultsRequest; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsRequest + * @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.v1beta.ListBackupVaultsRequest; + + /** + * Verifies a ListBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupVaultsRequest; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @param message ListBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsResponse. */ + interface IListBackupVaultsResponse { + + /** ListBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1beta.IBackupVault[]|null); + + /** ListBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupVaultsResponse. */ + class ListBackupVaultsResponse implements IListBackupVaultsResponse { + + /** + * Constructs a new ListBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1beta.IBackupVault[]; + + /** ListBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupVaultsResponse): google.cloud.backupdr.v1beta.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsResponse + * @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.v1beta.ListBackupVaultsResponse; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsResponse + * @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.v1beta.ListBackupVaultsResponse; + + /** + * Verifies a ListBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupVaultsResponse; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @param message ListBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsRequest. */ + interface IFetchUsableBackupVaultsRequest { + + /** FetchUsableBackupVaultsRequest parent */ + parent?: (string|null); + + /** FetchUsableBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** FetchUsableBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** FetchUsableBackupVaultsRequest filter */ + filter?: (string|null); + + /** FetchUsableBackupVaultsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchUsableBackupVaultsRequest. */ + class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest); + + /** FetchUsableBackupVaultsRequest parent. */ + public parent: string; + + /** FetchUsableBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** FetchUsableBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** FetchUsableBackupVaultsRequest filter. */ + public filter: string; + + /** FetchUsableBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsRequest + * @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.v1beta.FetchUsableBackupVaultsRequest; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsRequest + * @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.v1beta.FetchUsableBackupVaultsRequest; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; + + /** + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsResponse. */ + interface IFetchUsableBackupVaultsResponse { + + /** FetchUsableBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1beta.IBackupVault[]|null); + + /** FetchUsableBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** FetchUsableBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a FetchUsableBackupVaultsResponse. */ + class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse); + + /** FetchUsableBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1beta.IBackupVault[]; + + /** FetchUsableBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** FetchUsableBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsResponse + * @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.v1beta.FetchUsableBackupVaultsResponse; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsResponse + * @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.v1beta.FetchUsableBackupVaultsResponse; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; + + /** + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchBackupsForResourceTypeRequest. */ + interface IFetchBackupsForResourceTypeRequest { + + /** FetchBackupsForResourceTypeRequest parent */ + parent?: (string|null); + + /** FetchBackupsForResourceTypeRequest resourceType */ + resourceType?: (string|null); + + /** FetchBackupsForResourceTypeRequest pageSize */ + pageSize?: (number|null); + + /** FetchBackupsForResourceTypeRequest pageToken */ + pageToken?: (string|null); + + /** FetchBackupsForResourceTypeRequest filter */ + filter?: (string|null); + + /** FetchBackupsForResourceTypeRequest orderBy */ + orderBy?: (string|null); + + /** FetchBackupsForResourceTypeRequest view */ + view?: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView|null); + } + + /** Represents a FetchBackupsForResourceTypeRequest. */ + class FetchBackupsForResourceTypeRequest implements IFetchBackupsForResourceTypeRequest { + + /** + * Constructs a new FetchBackupsForResourceTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest); + + /** FetchBackupsForResourceTypeRequest parent. */ + public parent: string; + + /** FetchBackupsForResourceTypeRequest resourceType. */ + public resourceType: string; + + /** FetchBackupsForResourceTypeRequest pageSize. */ + public pageSize: number; + + /** FetchBackupsForResourceTypeRequest pageToken. */ + public pageToken: string; + + /** FetchBackupsForResourceTypeRequest filter. */ + public filter: string; + + /** FetchBackupsForResourceTypeRequest orderBy. */ + public orderBy: string; + + /** FetchBackupsForResourceTypeRequest view. */ + public view: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView); + + /** + * Creates a new FetchBackupsForResourceTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupsForResourceTypeRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest): google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupsForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.verify|verify} messages. + * @param message FetchBackupsForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupsForResourceTypeRequest + * @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.v1beta.FetchBackupsForResourceTypeRequest; + + /** + * Decodes a FetchBackupsForResourceTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupsForResourceTypeRequest + * @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.v1beta.FetchBackupsForResourceTypeRequest; + + /** + * Verifies a FetchBackupsForResourceTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchBackupsForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupsForResourceTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeRequest message. Also converts values to other types if specified. + * @param message FetchBackupsForResourceTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupsForResourceTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchBackupsForResourceTypeResponse. */ + interface IFetchBackupsForResourceTypeResponse { + + /** FetchBackupsForResourceTypeResponse backups */ + backups?: (google.cloud.backupdr.v1beta.IBackup[]|null); + + /** FetchBackupsForResourceTypeResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchBackupsForResourceTypeResponse. */ + class FetchBackupsForResourceTypeResponse implements IFetchBackupsForResourceTypeResponse { + + /** + * Constructs a new FetchBackupsForResourceTypeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse); + + /** FetchBackupsForResourceTypeResponse backups. */ + public backups: google.cloud.backupdr.v1beta.IBackup[]; + + /** FetchBackupsForResourceTypeResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchBackupsForResourceTypeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchBackupsForResourceTypeResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse): google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; + + /** + * Encodes the specified FetchBackupsForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchBackupsForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.verify|verify} messages. + * @param message FetchBackupsForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchBackupsForResourceTypeResponse + * @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.v1beta.FetchBackupsForResourceTypeResponse; + + /** + * Decodes a FetchBackupsForResourceTypeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchBackupsForResourceTypeResponse + * @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.v1beta.FetchBackupsForResourceTypeResponse; + + /** + * Verifies a FetchBackupsForResourceTypeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchBackupsForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchBackupsForResourceTypeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; + + /** + * Creates a plain object from a FetchBackupsForResourceTypeResponse message. Also converts values to other types if specified. + * @param message FetchBackupsForResourceTypeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchBackupsForResourceTypeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchBackupsForResourceTypeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + + /** GetBackupVaultRequest view */ + view?: (google.cloud.backupdr.v1beta.BackupVaultView|keyof typeof google.cloud.backupdr.v1beta.BackupVaultView|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** GetBackupVaultRequest view. */ + public view: (google.cloud.backupdr.v1beta.BackupVaultView|keyof typeof google.cloud.backupdr.v1beta.BackupVaultView); + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBackupVaultRequest): google.cloud.backupdr.v1beta.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupVaultRequest + * @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.v1beta.GetBackupVaultRequest; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupVaultRequest + * @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.v1beta.GetBackupVaultRequest; + + /** + * Verifies a GetBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBackupVaultRequest; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @param message GetBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1beta.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** UpdateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateBackupVaultRequest force */ + force?: (boolean|null); + + /** UpdateBackupVaultRequest forceUpdateAccessRestriction */ + forceUpdateAccessRestriction?: (boolean|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1beta.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId. */ + public requestId: string; + + /** UpdateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateBackupVaultRequest force. */ + public force: boolean; + + /** UpdateBackupVaultRequest forceUpdateAccessRestriction. */ + public forceUpdateAccessRestriction: boolean; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest): google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupVaultRequest + * @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.v1beta.UpdateBackupVaultRequest; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupVaultRequest + * @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.v1beta.UpdateBackupVaultRequest; + + /** + * Verifies an UpdateBackupVaultRequest 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @param message UpdateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + + /** DeleteBackupVaultRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupVaultRequest force */ + force?: (boolean|null); + + /** DeleteBackupVaultRequest etag */ + etag?: (string|null); + + /** DeleteBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteBackupVaultRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteBackupVaultRequest ignoreBackupPlanReferences */ + ignoreBackupPlanReferences?: (boolean|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** DeleteBackupVaultRequest requestId. */ + public requestId: string; + + /** DeleteBackupVaultRequest force. */ + public force: boolean; + + /** DeleteBackupVaultRequest etag. */ + public etag: string; + + /** DeleteBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteBackupVaultRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteBackupVaultRequest ignoreBackupPlanReferences. */ + public ignoreBackupPlanReferences: boolean; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest): google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupVaultRequest + * @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.v1beta.DeleteBackupVaultRequest; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupVaultRequest + * @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.v1beta.DeleteBackupVaultRequest; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @param message DeleteBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest filter */ + filter?: (string|null); + + /** ListDataSourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest filter. */ + public filter: string; + + /** ListDataSourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListDataSourcesRequest): google.cloud.backupdr.v1beta.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @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.v1beta.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @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.v1beta.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.backupdr.v1beta.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.backupdr.v1beta.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListDataSourcesResponse): google.cloud.backupdr.v1beta.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @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.v1beta.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @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.v1beta.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetDataSourceRequest): google.cloud.backupdr.v1beta.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @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.v1beta.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @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.v1beta.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataSourceRequest. */ + interface IUpdateDataSourceRequest { + + /** UpdateDataSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource */ + dataSource?: (google.cloud.backupdr.v1beta.IDataSource|null); + + /** UpdateDataSourceRequest requestId */ + requestId?: (string|null); + + /** UpdateDataSourceRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateDataSourceRequest. */ + class UpdateDataSourceRequest implements IUpdateDataSourceRequest { + + /** + * Constructs a new UpdateDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest); + + /** UpdateDataSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource. */ + public dataSource?: (google.cloud.backupdr.v1beta.IDataSource|null); + + /** UpdateDataSourceRequest requestId. */ + public requestId: string; + + /** UpdateDataSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest): google.cloud.backupdr.v1beta.UpdateDataSourceRequest; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataSourceRequest + * @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.v1beta.UpdateDataSourceRequest; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataSourceRequest + * @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.v1beta.UpdateDataSourceRequest; + + /** + * Verifies an UpdateDataSourceRequest 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateDataSourceRequest; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @param message UpdateDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView); + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupsRequest): google.cloud.backupdr.v1beta.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @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.v1beta.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @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.v1beta.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1beta.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1beta.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBackupsResponse): google.cloud.backupdr.v1beta.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @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.v1beta.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @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.v1beta.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1beta.BackupView|keyof typeof google.cloud.backupdr.v1beta.BackupView); + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBackupRequest): google.cloud.backupdr.v1beta.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @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.v1beta.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @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.v1beta.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1beta.IBackup|null); + + /** UpdateBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1beta.IBackup|null); + + /** UpdateBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IUpdateBackupRequest): google.cloud.backupdr.v1beta.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @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.v1beta.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @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.v1beta.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDeleteBackupRequest): google.cloud.backupdr.v1beta.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @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.v1beta.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @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.v1beta.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest diskTargetEnvironment */ + diskTargetEnvironment?: (google.cloud.backupdr.v1beta.IDiskTargetEnvironment|null); + + /** RestoreBackupRequest regionDiskTargetEnvironment */ + regionDiskTargetEnvironment?: (google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest diskRestoreProperties */ + diskRestoreProperties?: (google.cloud.backupdr.v1beta.IDiskRestoreProperties|null); + + /** RestoreBackupRequest name */ + name?: (string|null); + + /** RestoreBackupRequest requestId */ + requestId?: (string|null); + + /** RestoreBackupRequest clearOverridesFieldMask */ + clearOverridesFieldMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { + + /** + * Constructs a new RestoreBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IRestoreBackupRequest); + + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest diskTargetEnvironment. */ + public diskTargetEnvironment?: (google.cloud.backupdr.v1beta.IDiskTargetEnvironment|null); + + /** RestoreBackupRequest regionDiskTargetEnvironment. */ + public regionDiskTargetEnvironment?: (google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest diskRestoreProperties. */ + public diskRestoreProperties?: (google.cloud.backupdr.v1beta.IDiskRestoreProperties|null); + + /** RestoreBackupRequest name. */ + public name: string; + + /** RestoreBackupRequest requestId. */ + public requestId: string; + + /** RestoreBackupRequest clearOverridesFieldMask. */ + public clearOverridesFieldMask?: (google.protobuf.IFieldMask|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: ("computeInstanceTargetEnvironment"|"diskTargetEnvironment"|"regionDiskTargetEnvironment"); + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: ("computeInstanceRestoreProperties"|"diskRestoreProperties"); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IRestoreBackupRequest): google.cloud.backupdr.v1beta.RestoreBackupRequest; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupRequest + * @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.v1beta.RestoreBackupRequest; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupRequest + * @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.v1beta.RestoreBackupRequest; + + /** + * Verifies a RestoreBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.RestoreBackupRequest; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { + + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1beta.ITargetResource|null); + } + + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { + + /** + * Constructs a new RestoreBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IRestoreBackupResponse); + + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1beta.ITargetResource|null); + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IRestoreBackupResponse): google.cloud.backupdr.v1beta.RestoreBackupResponse; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupResponse + * @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.v1beta.RestoreBackupResponse; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupResponse + * @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.v1beta.RestoreBackupResponse; + + /** + * Verifies a RestoreBackupResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.RestoreBackupResponse; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResource. */ + interface ITargetResource { + + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1beta.IGcpResource|null); + } + + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { + + /** + * Constructs a new TargetResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ITargetResource); + + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1beta.IGcpResource|null); + + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; + + /** + * Creates a new TargetResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ITargetResource): google.cloud.backupdr.v1beta.TargetResource; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1beta.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResource + * @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.v1beta.TargetResource; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResource + * @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.v1beta.TargetResource; + + /** + * Verifies a TargetResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.TargetResource; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpResource. */ + interface IGcpResource { + + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** GcpResource location */ + location?: (string|null); + + /** GcpResource type */ + type?: (string|null); + } + + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { + + /** + * Constructs a new GcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGcpResource); + + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** GcpResource location. */ + public location: string; + + /** GcpResource type. */ + public type: string; + + /** + * Creates a new GcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGcpResource): google.cloud.backupdr.v1beta.GcpResource; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1beta.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpResource + * @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.v1beta.GcpResource; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpResource + * @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.v1beta.GcpResource; + + /** + * Verifies a GcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GcpResource; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupGcpResource. */ + interface IBackupGcpResource { + + /** BackupGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** BackupGcpResource location */ + location?: (string|null); + + /** BackupGcpResource type */ + type?: (string|null); + } + + /** Represents a BackupGcpResource. */ + class BackupGcpResource implements IBackupGcpResource { + + /** + * Constructs a new BackupGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupGcpResource); + + /** BackupGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** BackupGcpResource location. */ + public location: string; + + /** BackupGcpResource type. */ + public type: string; + + /** + * Creates a new BackupGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupGcpResource): google.cloud.backupdr.v1beta.BackupGcpResource; + + /** + * Encodes the specified BackupGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupGcpResource.verify|verify} messages. + * @param message BackupGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupGcpResource.verify|verify} messages. + * @param message BackupGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupGcpResource + * @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.v1beta.BackupGcpResource; + + /** + * Decodes a BackupGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupGcpResource + * @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.v1beta.BackupGcpResource; + + /** + * Verifies a BackupGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupGcpResource; + + /** + * Creates a plain object from a BackupGcpResource message. Also converts values to other types if specified. + * @param message BackupGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupGcpResource + * @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 { + + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + + /** + * Constructs a new BackupApplianceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties); + + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties): google.cloud.backupdr.v1beta.BackupApplianceBackupProperties; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupProperties + * @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.v1beta.BackupApplianceBackupProperties; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupProperties + * @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.v1beta.BackupApplianceBackupProperties; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupApplianceBackupProperties; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiskTargetEnvironment. */ + interface IDiskTargetEnvironment { + + /** DiskTargetEnvironment project */ + project?: (string|null); + + /** DiskTargetEnvironment zone */ + zone?: (string|null); + + /** DiskTargetEnvironment useProjectServiceAccount */ + useProjectServiceAccount?: (boolean|null); + } + + /** Represents a DiskTargetEnvironment. */ + class DiskTargetEnvironment implements IDiskTargetEnvironment { + + /** + * Constructs a new DiskTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDiskTargetEnvironment); + + /** DiskTargetEnvironment project. */ + public project: string; + + /** DiskTargetEnvironment zone. */ + public zone: string; + + /** DiskTargetEnvironment useProjectServiceAccount. */ + public useProjectServiceAccount?: (boolean|null); + + /** + * Creates a new DiskTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDiskTargetEnvironment): google.cloud.backupdr.v1beta.DiskTargetEnvironment; + + /** + * Encodes the specified DiskTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskTargetEnvironment.verify|verify} messages. + * @param message DiskTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDiskTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiskTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskTargetEnvironment.verify|verify} messages. + * @param message DiskTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDiskTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiskTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskTargetEnvironment + * @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.v1beta.DiskTargetEnvironment; + + /** + * Decodes a DiskTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskTargetEnvironment + * @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.v1beta.DiskTargetEnvironment; + + /** + * Verifies a DiskTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiskTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DiskTargetEnvironment; + + /** + * Creates a plain object from a DiskTargetEnvironment message. Also converts values to other types if specified. + * @param message DiskTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DiskTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiskTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiskTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegionDiskTargetEnvironment. */ + interface IRegionDiskTargetEnvironment { + + /** RegionDiskTargetEnvironment project */ + project?: (string|null); + + /** RegionDiskTargetEnvironment region */ + region?: (string|null); + + /** RegionDiskTargetEnvironment replicaZones */ + replicaZones?: (string[]|null); + + /** RegionDiskTargetEnvironment useProjectServiceAccount */ + useProjectServiceAccount?: (boolean|null); + } + + /** Represents a RegionDiskTargetEnvironment. */ + class RegionDiskTargetEnvironment implements IRegionDiskTargetEnvironment { + + /** + * Constructs a new RegionDiskTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment); + + /** RegionDiskTargetEnvironment project. */ + public project: string; + + /** RegionDiskTargetEnvironment region. */ + public region: string; + + /** RegionDiskTargetEnvironment replicaZones. */ + public replicaZones: string[]; + + /** RegionDiskTargetEnvironment useProjectServiceAccount. */ + public useProjectServiceAccount?: (boolean|null); + + /** + * Creates a new RegionDiskTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns RegionDiskTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment): google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment; + + /** + * Encodes the specified RegionDiskTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.verify|verify} messages. + * @param message RegionDiskTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegionDiskTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.verify|verify} messages. + * @param message RegionDiskTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IRegionDiskTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegionDiskTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegionDiskTargetEnvironment + * @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.v1beta.RegionDiskTargetEnvironment; + + /** + * Decodes a RegionDiskTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegionDiskTargetEnvironment + * @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.v1beta.RegionDiskTargetEnvironment; + + /** + * Verifies a RegionDiskTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RegionDiskTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegionDiskTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment; + + /** + * Creates a plain object from a RegionDiskTargetEnvironment message. Also converts values to other types if specified. + * @param message RegionDiskTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegionDiskTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegionDiskTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiskRestoreProperties. */ + interface IDiskRestoreProperties { + + /** DiskRestoreProperties instanceBackupSource */ + instanceBackupSource?: (google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions|null); + + /** DiskRestoreProperties name */ + name?: (string|null); + + /** DiskRestoreProperties description */ + description?: (string|null); + + /** DiskRestoreProperties sizeGb */ + sizeGb?: (number|Long|string|null); + + /** DiskRestoreProperties licenses */ + licenses?: (string[]|null); + + /** DiskRestoreProperties guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1beta.IGuestOsFeature[]|null); + + /** DiskRestoreProperties diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** DiskRestoreProperties physicalBlockSizeBytes */ + physicalBlockSizeBytes?: (number|Long|string|null); + + /** DiskRestoreProperties provisionedIops */ + provisionedIops?: (number|Long|string|null); + + /** DiskRestoreProperties provisionedThroughput */ + provisionedThroughput?: (number|Long|string|null); + + /** DiskRestoreProperties enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + + /** DiskRestoreProperties storagePool */ + storagePool?: (string|null); + + /** DiskRestoreProperties accessMode */ + accessMode?: (google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode|keyof typeof google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode|null); + + /** DiskRestoreProperties architecture */ + architecture?: (google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture|keyof typeof google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture|null); + + /** DiskRestoreProperties resourcePolicy */ + resourcePolicy?: (string[]|null); + + /** DiskRestoreProperties type */ + type?: (string|null); + + /** DiskRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** DiskRestoreProperties resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents a DiskRestoreProperties. */ + class DiskRestoreProperties implements IDiskRestoreProperties { + + /** + * Constructs a new DiskRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDiskRestoreProperties); + + /** DiskRestoreProperties instanceBackupSource. */ + public instanceBackupSource?: (google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions|null); + + /** DiskRestoreProperties name. */ + public name?: (string|null); + + /** DiskRestoreProperties description. */ + public description?: (string|null); + + /** DiskRestoreProperties sizeGb. */ + public sizeGb?: (number|Long|string|null); + + /** DiskRestoreProperties licenses. */ + public licenses: string[]; + + /** DiskRestoreProperties guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1beta.IGuestOsFeature[]; + + /** DiskRestoreProperties diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** DiskRestoreProperties physicalBlockSizeBytes. */ + public physicalBlockSizeBytes?: (number|Long|string|null); + + /** DiskRestoreProperties provisionedIops. */ + public provisionedIops?: (number|Long|string|null); + + /** DiskRestoreProperties provisionedThroughput. */ + public provisionedThroughput?: (number|Long|string|null); + + /** DiskRestoreProperties enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** DiskRestoreProperties storagePool. */ + public storagePool?: (string|null); + + /** DiskRestoreProperties accessMode. */ + public accessMode?: (google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode|keyof typeof google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode|null); + + /** DiskRestoreProperties architecture. */ + public architecture?: (google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture|keyof typeof google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture|null); + + /** DiskRestoreProperties resourcePolicy. */ + public resourcePolicy: string[]; + + /** DiskRestoreProperties type. */ + public type?: (string|null); + + /** DiskRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** DiskRestoreProperties resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** DiskRestoreProperties sourceOptions. */ + public sourceOptions?: "instanceBackupSource"; + + /** + * Creates a new DiskRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDiskRestoreProperties): google.cloud.backupdr.v1beta.DiskRestoreProperties; + + /** + * Encodes the specified DiskRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskRestoreProperties.verify|verify} messages. + * @param message DiskRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDiskRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiskRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskRestoreProperties.verify|verify} messages. + * @param message DiskRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDiskRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiskRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskRestoreProperties + * @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.v1beta.DiskRestoreProperties; + + /** + * Decodes a DiskRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskRestoreProperties + * @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.v1beta.DiskRestoreProperties; + + /** + * Verifies a DiskRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiskRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DiskRestoreProperties; + + /** + * Creates a plain object from a DiskRestoreProperties message. Also converts values to other types if specified. + * @param message DiskRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DiskRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiskRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiskRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiskRestoreProperties { + + /** AccessMode enum. */ + enum AccessMode { + READ_WRITE_SINGLE = 0, + READ_WRITE_MANY = 1, + READ_ONLY_MANY = 2 + } + + /** Architecture enum. */ + enum Architecture { + ARCHITECTURE_UNSPECIFIED = 0, + X86_64 = 1, + ARM64 = 2 + } + } + + /** Properties of a RestoreDiskFromInstanceOptions. */ + interface IRestoreDiskFromInstanceOptions { + + /** RestoreDiskFromInstanceOptions sourceDeviceName */ + sourceDeviceName?: (string|null); + + /** RestoreDiskFromInstanceOptions bootDisk */ + bootDisk?: (boolean|null); + } + + /** Represents a RestoreDiskFromInstanceOptions. */ + class RestoreDiskFromInstanceOptions implements IRestoreDiskFromInstanceOptions { + + /** + * Constructs a new RestoreDiskFromInstanceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions); + + /** RestoreDiskFromInstanceOptions sourceDeviceName. */ + public sourceDeviceName?: (string|null); + + /** RestoreDiskFromInstanceOptions bootDisk. */ + public bootDisk?: (boolean|null); + + /** RestoreDiskFromInstanceOptions sourceDisk. */ + public sourceDisk?: ("sourceDeviceName"|"bootDisk"); + + /** + * Creates a new RestoreDiskFromInstanceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreDiskFromInstanceOptions instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions): google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions; + + /** + * Encodes the specified RestoreDiskFromInstanceOptions message. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.verify|verify} messages. + * @param message RestoreDiskFromInstanceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreDiskFromInstanceOptions message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.verify|verify} messages. + * @param message RestoreDiskFromInstanceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IRestoreDiskFromInstanceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreDiskFromInstanceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreDiskFromInstanceOptions + * @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.v1beta.RestoreDiskFromInstanceOptions; + + /** + * Decodes a RestoreDiskFromInstanceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreDiskFromInstanceOptions + * @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.v1beta.RestoreDiskFromInstanceOptions; + + /** + * Verifies a RestoreDiskFromInstanceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreDiskFromInstanceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreDiskFromInstanceOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions; + + /** + * Creates a plain object from a RestoreDiskFromInstanceOptions message. Also converts values to other types if specified. + * @param message RestoreDiskFromInstanceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreDiskFromInstanceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreDiskFromInstanceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiskBackupProperties. */ + interface IDiskBackupProperties { + + /** DiskBackupProperties description */ + description?: (string|null); + + /** DiskBackupProperties licenses */ + licenses?: (string[]|null); + + /** DiskBackupProperties guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1beta.IGuestOsFeature[]|null); + + /** DiskBackupProperties architecture */ + architecture?: (google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture|keyof typeof google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture|null); + + /** DiskBackupProperties type */ + type?: (string|null); + + /** DiskBackupProperties sizeGb */ + sizeGb?: (number|Long|string|null); + + /** DiskBackupProperties region */ + region?: (string|null); + + /** DiskBackupProperties zone */ + zone?: (string|null); + + /** DiskBackupProperties replicaZones */ + replicaZones?: (string[]|null); + + /** DiskBackupProperties sourceDisk */ + sourceDisk?: (string|null); + + /** DiskBackupProperties accessMode */ + accessMode?: (string|null); + + /** DiskBackupProperties provisionedIops */ + provisionedIops?: (number|Long|string|null); + + /** DiskBackupProperties provisionedThroughput */ + provisionedThroughput?: (number|Long|string|null); + + /** DiskBackupProperties physicalBlockSizeBytes */ + physicalBlockSizeBytes?: (number|Long|string|null); + + /** DiskBackupProperties enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + + /** DiskBackupProperties storagePool */ + storagePool?: (string|null); + + /** DiskBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** DiskBackupProperties guestFlush */ + guestFlush?: (boolean|null); + } + + /** Represents a DiskBackupProperties. */ + class DiskBackupProperties implements IDiskBackupProperties { + + /** + * Constructs a new DiskBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDiskBackupProperties); + + /** DiskBackupProperties description. */ + public description?: (string|null); + + /** DiskBackupProperties licenses. */ + public licenses: string[]; + + /** DiskBackupProperties guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1beta.IGuestOsFeature[]; + + /** DiskBackupProperties architecture. */ + public architecture?: (google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture|keyof typeof google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture|null); + + /** DiskBackupProperties type. */ + public type?: (string|null); + + /** DiskBackupProperties sizeGb. */ + public sizeGb?: (number|Long|string|null); + + /** DiskBackupProperties region. */ + public region?: (string|null); + + /** DiskBackupProperties zone. */ + public zone?: (string|null); + + /** DiskBackupProperties replicaZones. */ + public replicaZones: string[]; + + /** DiskBackupProperties sourceDisk. */ + public sourceDisk?: (string|null); + + /** DiskBackupProperties accessMode. */ + public accessMode?: (string|null); + + /** DiskBackupProperties provisionedIops. */ + public provisionedIops?: (number|Long|string|null); + + /** DiskBackupProperties provisionedThroughput. */ + public provisionedThroughput?: (number|Long|string|null); + + /** DiskBackupProperties physicalBlockSizeBytes. */ + public physicalBlockSizeBytes?: (number|Long|string|null); + + /** DiskBackupProperties enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** DiskBackupProperties storagePool. */ + public storagePool?: (string|null); + + /** DiskBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** DiskBackupProperties guestFlush. */ + public guestFlush: boolean; + + /** + * Creates a new DiskBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDiskBackupProperties): google.cloud.backupdr.v1beta.DiskBackupProperties; + + /** + * Encodes the specified DiskBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskBackupProperties.verify|verify} messages. + * @param message DiskBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDiskBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiskBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskBackupProperties.verify|verify} messages. + * @param message DiskBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDiskBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiskBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskBackupProperties + * @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.v1beta.DiskBackupProperties; + + /** + * Decodes a DiskBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskBackupProperties + * @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.v1beta.DiskBackupProperties; + + /** + * Verifies a DiskBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiskBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DiskBackupProperties; + + /** + * Creates a plain object from a DiskBackupProperties message. Also converts values to other types if specified. + * @param message DiskBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DiskBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiskBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiskBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiskBackupProperties { + + /** Architecture enum. */ + enum Architecture { + ARCHITECTURE_UNSPECIFIED = 0, + X86_64 = 1, + ARM64 = 2 + } + } + + /** Properties of a DiskDataSourceProperties. */ + interface IDiskDataSourceProperties { + + /** DiskDataSourceProperties name */ + name?: (string|null); + + /** DiskDataSourceProperties description */ + description?: (string|null); + + /** DiskDataSourceProperties type */ + type?: (string|null); + + /** DiskDataSourceProperties sizeGb */ + sizeGb?: (number|Long|string|null); + } + + /** Represents a DiskDataSourceProperties. */ + class DiskDataSourceProperties implements IDiskDataSourceProperties { + + /** + * Constructs a new DiskDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDiskDataSourceProperties); + + /** DiskDataSourceProperties name. */ + public name: string; + + /** DiskDataSourceProperties description. */ + public description: string; + + /** DiskDataSourceProperties type. */ + public type: string; + + /** DiskDataSourceProperties sizeGb. */ + public sizeGb: (number|Long|string); + + /** + * Creates a new DiskDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns DiskDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDiskDataSourceProperties): google.cloud.backupdr.v1beta.DiskDataSourceProperties; + + /** + * Encodes the specified DiskDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskDataSourceProperties.verify|verify} messages. + * @param message DiskDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDiskDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiskDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DiskDataSourceProperties.verify|verify} messages. + * @param message DiskDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDiskDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiskDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiskDataSourceProperties + * @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.v1beta.DiskDataSourceProperties; + + /** + * Decodes a DiskDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiskDataSourceProperties + * @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.v1beta.DiskDataSourceProperties; + + /** + * Verifies a DiskDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiskDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiskDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DiskDataSourceProperties; + + /** + * Creates a plain object from a DiskDataSourceProperties message. Also converts values to other types if specified. + * @param message DiskDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DiskDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiskDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiskDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 2 + } + + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { + + /** ComputeInstanceBackupProperties description */ + description?: (string|null); + + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1beta.ITags|null); + + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1beta.INetworkInterface[]|null); + + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1beta.IAttachedDisk[]|null); + + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1beta.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1beta.IServiceAccount[]|null); + + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1beta.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1beta.IAcceleratorConfig[]|null); + + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1beta.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1beta.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceBackupProperties guestFlush */ + guestFlush?: (boolean|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties); + + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); + + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1beta.ITags|null); + + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1beta.INetworkInterface[]; + + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1beta.IAttachedDisk[]; + + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1beta.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1beta.IServiceAccount[]; + + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1beta.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1beta.IAcceleratorConfig[]; + + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1beta.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1beta.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceBackupProperties guestFlush. */ + public guestFlush: boolean; + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties): google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupProperties + * @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.v1beta.ComputeInstanceBackupProperties; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupProperties + * @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.v1beta.ComputeInstanceBackupProperties; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { + + /** ComputeInstanceRestoreProperties name */ + name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1beta.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1beta.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1beta.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1beta.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1beta.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1beta.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1beta.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1beta.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1beta.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1beta.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1beta.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1beta.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1beta.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1beta.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1beta.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1beta.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1beta.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1beta.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1beta.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1beta.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1beta.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1beta.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1beta.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1beta.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1beta.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1beta.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1beta.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1beta.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1beta.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1beta.ITags|null); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceRestoreProperties + * @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.v1beta.ComputeInstanceRestoreProperties; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceRestoreProperties + * @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.v1beta.ComputeInstanceRestoreProperties; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputeInstanceRestoreProperties { + + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } + + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { + + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); + + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); + + /** ComputeInstanceTargetEnvironment useProjectServiceAccount */ + useProjectServiceAccount?: (boolean|null); + } + + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment); + + /** ComputeInstanceTargetEnvironment project. */ + public project: string; + + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; + + /** ComputeInstanceTargetEnvironment useProjectServiceAccount. */ + public useProjectServiceAccount?: (boolean|null); + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceTargetEnvironment + * @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.v1beta.ComputeInstanceTargetEnvironment; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceTargetEnvironment + * @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.v1beta.ComputeInstanceTargetEnvironment; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { + + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); + } + + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties); + + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceDataSourceProperties + * @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.v1beta.ComputeInstanceDataSourceProperties; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceDataSourceProperties + * @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.v1beta.ComputeInstanceDataSourceProperties; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAdvancedMachineFeatures): google.cloud.backupdr.v1beta.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1beta.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @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.v1beta.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @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.v1beta.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { + + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + } + + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + + /** + * Constructs a new ConfidentialInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IConfidentialInstanceConfig); + + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialInstanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IConfidentialInstanceConfig): google.cloud.backupdr.v1beta.ConfidentialInstanceConfig; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialInstanceConfig + * @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.v1beta.ConfidentialInstanceConfig; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialInstanceConfig + * @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.v1beta.ConfidentialInstanceConfig; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ConfidentialInstanceConfig; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { + + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); + } + + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { + + /** + * Constructs a new DisplayDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDisplayDevice); + + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayDevice instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDisplayDevice): google.cloud.backupdr.v1beta.DisplayDevice; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1beta.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayDevice + * @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.v1beta.DisplayDevice; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayDevice + * @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.v1beta.DisplayDevice; + + /** + * Verifies a DisplayDevice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DisplayDevice; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier|null); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.INetworkPerformanceConfig): google.cloud.backupdr.v1beta.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @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.v1beta.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @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.v1beta.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } + } + + /** Properties of an InstanceParams. */ + interface IInstanceParams { + + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { + + /** + * Constructs a new InstanceParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IInstanceParams); + + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceParams instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IInstanceParams): google.cloud.backupdr.v1beta.InstanceParams; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1beta.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceParams + * @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.v1beta.InstanceParams; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceParams + * @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.v1beta.InstanceParams; + + /** + * Verifies an InstanceParams 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.InstanceParams; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { + + /** + * Constructs a new GuestOsFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType|null); + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGuestOsFeature): google.cloud.backupdr.v1beta.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1beta.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuestOsFeature + * @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.v1beta.GuestOsFeature; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuestOsFeature + * @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.v1beta.GuestOsFeature; + + /** + * Verifies a GuestOsFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuestOsFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GuestOsFeature; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GuestOsFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GuestOsFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GuestOsFeature { + + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } + + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { + + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1beta.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1beta.AllocationAffinity.Type|null); + + /** AllocationAffinity key */ + key?: (string|null); + + /** AllocationAffinity values */ + values?: (string[]|null); + } + + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { + + /** + * Constructs a new AllocationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAllocationAffinity); + + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1beta.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1beta.AllocationAffinity.Type|null); + + /** AllocationAffinity key. */ + public key?: (string|null); + + /** AllocationAffinity values. */ + public values: string[]; + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAllocationAffinity): google.cloud.backupdr.v1beta.AllocationAffinity; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1beta.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationAffinity + * @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.v1beta.AllocationAffinity; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationAffinity + * @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.v1beta.AllocationAffinity; + + /** + * Verifies an AllocationAffinity 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AllocationAffinity; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationAffinity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAcceleratorConfig): google.cloud.backupdr.v1beta.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @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.v1beta.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @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.v1beta.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { + + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } + + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { + + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ICustomerEncryptionKey); + + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); + + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerEncryptionKey instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ICustomerEncryptionKey): google.cloud.backupdr.v1beta.CustomerEncryptionKey; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1beta.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerEncryptionKey + * @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.v1beta.CustomerEncryptionKey; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerEncryptionKey + * @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.v1beta.CustomerEncryptionKey; + + /** + * Verifies a CustomerEncryptionKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerEncryptionKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.CustomerEncryptionKey; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry key */ + key?: (string|null); + + /** Entry value */ + value?: (string|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IEntry); + + /** Entry key. */ + public key?: (string|null); + + /** Entry value. */ + public value?: (string|null); + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IEntry): google.cloud.backupdr.v1beta.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1beta.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @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.v1beta.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @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.v1beta.Entry; + + /** + * Verifies an Entry 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata items */ + items?: (google.cloud.backupdr.v1beta.IEntry[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IMetadata); + + /** Metadata items. */ + public items: google.cloud.backupdr.v1beta.IEntry[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IMetadata): google.cloud.backupdr.v1beta.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @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.v1beta.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @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.v1beta.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInterface. */ + interface INetworkInterface { + + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ + name?: (string|null); + + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1beta.IAccessConfig[]|null); + + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1beta.IAccessConfig[]|null); + + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1beta.IAliasIpRange[]|null); + + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1beta.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1beta.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { + + /** + * Constructs a new NetworkInterface. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.INetworkInterface); + + /** NetworkInterface network. */ + public network?: (string|null); + + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); + + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); + + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1beta.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1beta.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1beta.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1beta.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1beta.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1beta.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInterface instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.INetworkInterface): google.cloud.backupdr.v1beta.NetworkInterface; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInterface + * @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.v1beta.NetworkInterface; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInterface + * @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.v1beta.NetworkInterface; + + /** + * Verifies a NetworkInterface message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInterface + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.NetworkInterface; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInterface to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInterface + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkInterface { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } + + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } + + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1beta.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1beta.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1beta.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1beta.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { + + /** + * Constructs a new AccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAccessConfig); + + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1beta.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1beta.AccessConfig.AccessType|null); + + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1beta.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1beta.AccessConfig.NetworkTier|null); + + /** + * Creates a new AccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAccessConfig): google.cloud.backupdr.v1beta.AccessConfig; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessConfig + * @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.v1beta.AccessConfig; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessConfig + * @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.v1beta.AccessConfig; + + /** + * Verifies an AccessConfig 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AccessConfig; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessConfig { + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } + } + + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { + + /** + * Constructs a new AliasIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAliasIpRange); + + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AliasIpRange instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAliasIpRange): google.cloud.backupdr.v1beta.AliasIpRange; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1beta.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AliasIpRange + * @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.v1beta.AliasIpRange; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AliasIpRange + * @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.v1beta.AliasIpRange; + + /** + * Verifies an AliasIpRange 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AliasIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AliasIpRange; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AliasIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AliasIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Scheduling. */ + interface IScheduling { + + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); + + /** Scheduling preemptible */ + preemptible?: (boolean|null); + + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1beta.Scheduling.INodeAffinity[]|null); + + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1beta.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { + + /** + * Constructs a new Scheduling. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IScheduling); + + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); + + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); + + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1beta.Scheduling.INodeAffinity[]; + + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); + + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1beta.ISchedulingDuration|null); + + /** + * Creates a new Scheduling instance using the specified properties. + * @param [properties] Properties to set + * @returns Scheduling instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IScheduling): google.cloud.backupdr.v1beta.Scheduling; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1beta.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scheduling + * @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.v1beta.Scheduling; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scheduling + * @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.v1beta.Scheduling; + + /** + * Verifies a Scheduling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scheduling + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Scheduling; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scheduling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scheduling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Scheduling { + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.Scheduling.INodeAffinity); + + /** NodeAffinity key. */ + public key?: (string|null); + + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values. */ + public values: string[]; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.Scheduling.INodeAffinity): google.cloud.backupdr.v1beta.Scheduling.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @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.v1beta.Scheduling.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @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.v1beta.Scheduling.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Scheduling.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } + + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } + + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } + + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { + + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos */ + nanos?: (number|null); + } + + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { + + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ISchedulingDuration); + + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos. */ + public nanos?: (number|null); + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulingDuration instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ISchedulingDuration): google.cloud.backupdr.v1beta.SchedulingDuration; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1beta.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulingDuration + * @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.v1beta.SchedulingDuration; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulingDuration + * @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.v1beta.SchedulingDuration; + + /** + * Verifies a SchedulingDuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulingDuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.SchedulingDuration; + + /** + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulingDuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulingDuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccount. */ + interface IServiceAccount { + + /** ServiceAccount email */ + email?: (string|null); + + /** ServiceAccount scopes */ + scopes?: (string[]|null); + } + + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { + + /** + * Constructs a new ServiceAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IServiceAccount); + + /** ServiceAccount email. */ + public email?: (string|null); + + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccount instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IServiceAccount): google.cloud.backupdr.v1beta.ServiceAccount; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1beta.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccount + * @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.v1beta.ServiceAccount; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccount + * @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.v1beta.ServiceAccount; + + /** + * Verifies a ServiceAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccount + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ServiceAccount; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tags. */ + interface ITags { + + /** Tags items */ + items?: (string[]|null); + } + + /** Represents a Tags. */ + class Tags implements ITags { + + /** + * Constructs a new Tags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.ITags); + + /** Tags items. */ + public items: string[]; + + /** + * Creates a new Tags instance using the specified properties. + * @param [properties] Properties to set + * @returns Tags instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.ITags): google.cloud.backupdr.v1beta.Tags; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1beta.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tags + * @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.v1beta.Tags; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tags + * @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.v1beta.Tags; + + /** + * Verifies a Tags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.Tags; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { + + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName */ + deviceName?: (string|null); + + /** AttachedDisk kind */ + kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskType|null); + + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1beta.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskType|null); + } + + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { + + /** + * Constructs a new AttachedDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAttachedDisk); + + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); + + /** AttachedDisk kind. */ + public kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1beta.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1beta.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1beta.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1beta.AttachedDisk.DiskType|null); + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns AttachedDisk instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAttachedDisk): google.cloud.backupdr.v1beta.AttachedDisk; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1beta.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttachedDisk + * @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.v1beta.AttachedDisk; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttachedDisk + * @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.v1beta.AttachedDisk; + + /** + * Verifies an AttachedDisk 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttachedDisk + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AttachedDisk; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttachedDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttachedDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttachedDisk { + + /** Properties of an InitializeParams. */ + interface IInitializeParams { + + /** InitializeParams diskName */ + diskName?: (string|null); + + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @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.v1beta.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @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.v1beta.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GetBindingMatchingResourceRequest. */ + interface IGetBindingMatchingResourceRequest { + + /** GetBindingMatchingResourceRequest name */ + name?: (string|null); + } + + /** Represents a GetBindingMatchingResourceRequest. */ + class GetBindingMatchingResourceRequest implements IGetBindingMatchingResourceRequest { + + /** + * Constructs a new GetBindingMatchingResourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest); + + /** GetBindingMatchingResourceRequest name. */ + public name: string; + + /** + * Creates a new GetBindingMatchingResourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBindingMatchingResourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest): google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; + + /** + * Encodes the specified GetBindingMatchingResourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.verify|verify} messages. + * @param message GetBindingMatchingResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBindingMatchingResourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.verify|verify} messages. + * @param message GetBindingMatchingResourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBindingMatchingResourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBindingMatchingResourceRequest + * @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.v1beta.GetBindingMatchingResourceRequest; + + /** + * Decodes a GetBindingMatchingResourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBindingMatchingResourceRequest + * @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.v1beta.GetBindingMatchingResourceRequest; + + /** + * Verifies a GetBindingMatchingResourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBindingMatchingResourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBindingMatchingResourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; + + /** + * Creates a plain object from a GetBindingMatchingResourceRequest message. Also converts values to other types if specified. + * @param message GetBindingMatchingResourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBindingMatchingResourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBindingMatchingResourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBindingMatchingResourcesRequest. */ + interface IListBindingMatchingResourcesRequest { + + /** ListBindingMatchingResourcesRequest parent */ + parent?: (string|null); + + /** ListBindingMatchingResourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListBindingMatchingResourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListBindingMatchingResourcesRequest filter */ + filter?: (string|null); + + /** ListBindingMatchingResourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBindingMatchingResourcesRequest. */ + class ListBindingMatchingResourcesRequest implements IListBindingMatchingResourcesRequest { + + /** + * Constructs a new ListBindingMatchingResourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest); + + /** ListBindingMatchingResourcesRequest parent. */ + public parent: string; + + /** ListBindingMatchingResourcesRequest pageSize. */ + public pageSize: number; + + /** ListBindingMatchingResourcesRequest pageToken. */ + public pageToken: string; + + /** ListBindingMatchingResourcesRequest filter. */ + public filter: string; + + /** ListBindingMatchingResourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBindingMatchingResourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBindingMatchingResourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest): google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; + + /** + * Encodes the specified ListBindingMatchingResourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.verify|verify} messages. + * @param message ListBindingMatchingResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBindingMatchingResourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.verify|verify} messages. + * @param message ListBindingMatchingResourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBindingMatchingResourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBindingMatchingResourcesRequest + * @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.v1beta.ListBindingMatchingResourcesRequest; + + /** + * Decodes a ListBindingMatchingResourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBindingMatchingResourcesRequest + * @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.v1beta.ListBindingMatchingResourcesRequest; + + /** + * Verifies a ListBindingMatchingResourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBindingMatchingResourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBindingMatchingResourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; + + /** + * Creates a plain object from a ListBindingMatchingResourcesRequest message. Also converts values to other types if specified. + * @param message ListBindingMatchingResourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBindingMatchingResourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBindingMatchingResourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBindingMatchingResourcesResponse. */ + interface IListBindingMatchingResourcesResponse { + + /** ListBindingMatchingResourcesResponse matchingResources */ + matchingResources?: (google.cloud.backupdr.v1beta.IBindingMatchingResource[]|null); + + /** ListBindingMatchingResourcesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBindingMatchingResourcesResponse. */ + class ListBindingMatchingResourcesResponse implements IListBindingMatchingResourcesResponse { + + /** + * Constructs a new ListBindingMatchingResourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse); + + /** ListBindingMatchingResourcesResponse matchingResources. */ + public matchingResources: google.cloud.backupdr.v1beta.IBindingMatchingResource[]; + + /** ListBindingMatchingResourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBindingMatchingResourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBindingMatchingResourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse): google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; + + /** + * Encodes the specified ListBindingMatchingResourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.verify|verify} messages. + * @param message ListBindingMatchingResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBindingMatchingResourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.verify|verify} messages. + * @param message ListBindingMatchingResourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBindingMatchingResourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBindingMatchingResourcesResponse + * @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.v1beta.ListBindingMatchingResourcesResponse; + + /** + * Decodes a ListBindingMatchingResourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBindingMatchingResourcesResponse + * @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.v1beta.ListBindingMatchingResourcesResponse; + + /** + * Verifies a ListBindingMatchingResourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBindingMatchingResourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBindingMatchingResourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; + + /** + * Creates a plain object from a ListBindingMatchingResourcesResponse message. Also converts values to other types if specified. + * @param message ListBindingMatchingResourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBindingMatchingResourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBindingMatchingResourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingMatchingResource. */ + interface IBindingMatchingResource { + + /** BindingMatchingResource name */ + name?: (string|null); + + /** BindingMatchingResource resource */ + resource?: (string|null); + + /** BindingMatchingResource lastEvaluationTime */ + lastEvaluationTime?: (google.protobuf.ITimestamp|null); + + /** BindingMatchingResource autoProtectionDetails */ + autoProtectionDetails?: (google.cloud.backupdr.v1beta.IAutoProtectionDetails|null); + } + + /** Represents a BindingMatchingResource. */ + class BindingMatchingResource implements IBindingMatchingResource { + + /** + * Constructs a new BindingMatchingResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBindingMatchingResource); + + /** BindingMatchingResource name. */ + public name: string; + + /** BindingMatchingResource resource. */ + public resource: string; + + /** BindingMatchingResource lastEvaluationTime. */ + public lastEvaluationTime?: (google.protobuf.ITimestamp|null); + + /** BindingMatchingResource autoProtectionDetails. */ + public autoProtectionDetails?: (google.cloud.backupdr.v1beta.IAutoProtectionDetails|null); + + /** + * Creates a new BindingMatchingResource instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingMatchingResource instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBindingMatchingResource): google.cloud.backupdr.v1beta.BindingMatchingResource; + + /** + * Encodes the specified BindingMatchingResource message. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingMatchingResource.verify|verify} messages. + * @param message BindingMatchingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBindingMatchingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingMatchingResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BindingMatchingResource.verify|verify} messages. + * @param message BindingMatchingResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBindingMatchingResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingMatchingResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingMatchingResource + * @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.v1beta.BindingMatchingResource; + + /** + * Decodes a BindingMatchingResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingMatchingResource + * @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.v1beta.BindingMatchingResource; + + /** + * Verifies a BindingMatchingResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingMatchingResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingMatchingResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BindingMatchingResource; + + /** + * Creates a plain object from a BindingMatchingResource message. Also converts values to other types if specified. + * @param message BindingMatchingResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BindingMatchingResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingMatchingResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingMatchingResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoProtectionDetails. */ + interface IAutoProtectionDetails { + + /** AutoProtectionDetails state */ + state?: (google.cloud.backupdr.v1beta.AutoProtectionDetails.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionDetails.State|null); + + /** AutoProtectionDetails backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** AutoProtectionDetails dataSource */ + dataSource?: (string|null); + + /** AutoProtectionDetails error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents an AutoProtectionDetails. */ + class AutoProtectionDetails implements IAutoProtectionDetails { + + /** + * Constructs a new AutoProtectionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IAutoProtectionDetails); + + /** AutoProtectionDetails state. */ + public state: (google.cloud.backupdr.v1beta.AutoProtectionDetails.State|keyof typeof google.cloud.backupdr.v1beta.AutoProtectionDetails.State); + + /** AutoProtectionDetails backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** AutoProtectionDetails dataSource. */ + public dataSource: string; + + /** AutoProtectionDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** + * Creates a new AutoProtectionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoProtectionDetails instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IAutoProtectionDetails): google.cloud.backupdr.v1beta.AutoProtectionDetails; + + /** + * Encodes the specified AutoProtectionDetails message. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionDetails.verify|verify} messages. + * @param message AutoProtectionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IAutoProtectionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoProtectionDetails message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.AutoProtectionDetails.verify|verify} messages. + * @param message AutoProtectionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IAutoProtectionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoProtectionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoProtectionDetails + * @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.v1beta.AutoProtectionDetails; + + /** + * Decodes an AutoProtectionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoProtectionDetails + * @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.v1beta.AutoProtectionDetails; + + /** + * Verifies an AutoProtectionDetails 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 AutoProtectionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoProtectionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.AutoProtectionDetails; + + /** + * Creates a plain object from an AutoProtectionDetails message. Also converts values to other types if specified. + * @param message AutoProtectionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.AutoProtectionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoProtectionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoProtectionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutoProtectionDetails { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PROTECTED = 1, + PROTECTION_FAILED = 2, + UNPROTECTING = 3, + UNPROTECTION_FAILED = 4 + } + } + + /** Properties of a DataSourceReference. */ + interface IDataSourceReference { + + /** DataSourceReference name */ + name?: (string|null); + + /** DataSourceReference dataSource */ + dataSource?: (string|null); + + /** DataSourceReference createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSourceReference dataSourceBackupConfigState */ + dataSourceBackupConfigState?: (google.cloud.backupdr.v1beta.BackupConfigState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigState|null); + + /** DataSourceReference dataSourceBackupCount */ + dataSourceBackupCount?: (number|Long|string|null); + + /** DataSourceReference dataSourceBackupConfigInfo */ + dataSourceBackupConfigInfo?: (google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo|null); + + /** DataSourceReference dataSourceGcpResourceInfo */ + dataSourceGcpResourceInfo?: (google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo|null); + + /** DataSourceReference totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + } + + /** Represents a DataSourceReference. */ + class DataSourceReference implements IDataSourceReference { + + /** + * Constructs a new DataSourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSourceReference); + + /** DataSourceReference name. */ + public name: string; + + /** DataSourceReference dataSource. */ + public dataSource: string; + + /** DataSourceReference createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSourceReference dataSourceBackupConfigState. */ + public dataSourceBackupConfigState: (google.cloud.backupdr.v1beta.BackupConfigState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigState); + + /** DataSourceReference dataSourceBackupCount. */ + public dataSourceBackupCount: (number|Long|string); + + /** DataSourceReference dataSourceBackupConfigInfo. */ + public dataSourceBackupConfigInfo?: (google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo|null); + + /** DataSourceReference dataSourceGcpResourceInfo. */ + public dataSourceGcpResourceInfo?: (google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo|null); + + /** DataSourceReference totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** + * Creates a new DataSourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceReference instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSourceReference): google.cloud.backupdr.v1beta.DataSourceReference; + + /** + * Encodes the specified DataSourceReference message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceReference.verify|verify} messages. + * @param message DataSourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceReference message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceReference.verify|verify} messages. + * @param message DataSourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceReference + * @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.v1beta.DataSourceReference; + + /** + * Decodes a DataSourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceReference + * @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.v1beta.DataSourceReference; + + /** + * Verifies a DataSourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSourceReference; + + /** + * Creates a plain object from a DataSourceReference message. Also converts values to other types if specified. + * @param message DataSourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupConfigInfo. */ + interface IDataSourceBackupConfigInfo { + + /** DataSourceBackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|null); + + /** DataSourceBackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataSourceBackupConfigInfo. */ + class DataSourceBackupConfigInfo implements IDataSourceBackupConfigInfo { + + /** + * Constructs a new DataSourceBackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo); + + /** DataSourceBackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState); + + /** DataSourceBackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DataSourceBackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo): google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo; + + /** + * Encodes the specified DataSourceBackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.verify|verify} messages. + * @param message DataSourceBackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.verify|verify} messages. + * @param message DataSourceBackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSourceBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupConfigInfo + * @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.v1beta.DataSourceBackupConfigInfo; + + /** + * Decodes a DataSourceBackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupConfigInfo + * @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.v1beta.DataSourceBackupConfigInfo; + + /** + * Verifies a DataSourceBackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo; + + /** + * Creates a plain object from a DataSourceBackupConfigInfo message. Also converts values to other types if specified. + * @param message DataSourceBackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResourceInfo. */ + interface IDataSourceGcpResourceInfo { + + /** DataSourceGcpResourceInfo cloudSqlInstanceProperties */ + cloudSqlInstanceProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties|null); + + /** DataSourceGcpResourceInfo alloyDbClusterProperties */ + alloyDbClusterProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties|null); + + /** DataSourceGcpResourceInfo gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResourceInfo type */ + type?: (string|null); + + /** DataSourceGcpResourceInfo location */ + location?: (string|null); + } + + /** Represents a DataSourceGcpResourceInfo. */ + class DataSourceGcpResourceInfo implements IDataSourceGcpResourceInfo { + + /** + * Constructs a new DataSourceGcpResourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo); + + /** DataSourceGcpResourceInfo cloudSqlInstanceProperties. */ + public cloudSqlInstanceProperties?: (google.cloud.backupdr.v1beta.ICloudSqlInstanceDataSourceReferenceProperties|null); + + /** DataSourceGcpResourceInfo alloyDbClusterProperties. */ + public alloyDbClusterProperties?: (google.cloud.backupdr.v1beta.IAlloyDBClusterDataSourceReferenceProperties|null); + + /** DataSourceGcpResourceInfo gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResourceInfo type. */ + public type: string; + + /** DataSourceGcpResourceInfo location. */ + public location: string; + + /** DataSourceGcpResourceInfo resourceProperties. */ + public resourceProperties?: ("cloudSqlInstanceProperties"|"alloyDbClusterProperties"); + + /** + * Creates a new DataSourceGcpResourceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResourceInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo): google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo; + + /** + * Encodes the specified DataSourceGcpResourceInfo message. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.verify|verify} messages. + * @param message DataSourceGcpResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResourceInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.verify|verify} messages. + * @param message DataSourceGcpResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IDataSourceGcpResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResourceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResourceInfo + * @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.v1beta.DataSourceGcpResourceInfo; + + /** + * Decodes a DataSourceGcpResourceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResourceInfo + * @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.v1beta.DataSourceGcpResourceInfo; + + /** + * Verifies a DataSourceGcpResourceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo; + + /** + * Creates a plain object from a DataSourceGcpResourceInfo message. Also converts values to other types if specified. + * @param message DataSourceGcpResourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceReferenceRequest. */ + interface IGetDataSourceReferenceRequest { + + /** GetDataSourceReferenceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceReferenceRequest. */ + class GetDataSourceReferenceRequest implements IGetDataSourceReferenceRequest { + + /** + * Constructs a new GetDataSourceReferenceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest); + + /** GetDataSourceReferenceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceReferenceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceReferenceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest): google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; + + /** + * Encodes the specified GetDataSourceReferenceRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.verify|verify} messages. + * @param message GetDataSourceReferenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceReferenceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.verify|verify} messages. + * @param message GetDataSourceReferenceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceReferenceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceReferenceRequest + * @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.v1beta.GetDataSourceReferenceRequest; + + /** + * Decodes a GetDataSourceReferenceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceReferenceRequest + * @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.v1beta.GetDataSourceReferenceRequest; + + /** + * Verifies a GetDataSourceReferenceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceReferenceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceReferenceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; + + /** + * Creates a plain object from a GetDataSourceReferenceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceReferenceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceReferenceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceReferenceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourceReferencesRequest. */ + interface IListDataSourceReferencesRequest { + + /** ListDataSourceReferencesRequest parent */ + parent?: (string|null); + + /** ListDataSourceReferencesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourceReferencesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourceReferencesRequest filter */ + filter?: (string|null); + + /** ListDataSourceReferencesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourceReferencesRequest. */ + class ListDataSourceReferencesRequest implements IListDataSourceReferencesRequest { + + /** + * Constructs a new ListDataSourceReferencesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest); + + /** ListDataSourceReferencesRequest parent. */ + public parent: string; + + /** ListDataSourceReferencesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourceReferencesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourceReferencesRequest filter. */ + public filter: string; + + /** ListDataSourceReferencesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourceReferencesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourceReferencesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest): google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; + + /** + * Encodes the specified ListDataSourceReferencesRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.verify|verify} messages. + * @param message ListDataSourceReferencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourceReferencesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.verify|verify} messages. + * @param message ListDataSourceReferencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourceReferencesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourceReferencesRequest + * @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.v1beta.ListDataSourceReferencesRequest; + + /** + * Decodes a ListDataSourceReferencesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourceReferencesRequest + * @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.v1beta.ListDataSourceReferencesRequest; + + /** + * Verifies a ListDataSourceReferencesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourceReferencesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourceReferencesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; + + /** + * Creates a plain object from a ListDataSourceReferencesRequest message. Also converts values to other types if specified. + * @param message ListDataSourceReferencesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourceReferencesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourceReferencesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourceReferencesResponse. */ + interface IListDataSourceReferencesResponse { + + /** ListDataSourceReferencesResponse dataSourceReferences */ + dataSourceReferences?: (google.cloud.backupdr.v1beta.IDataSourceReference[]|null); + + /** ListDataSourceReferencesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourceReferencesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourceReferencesResponse. */ + class ListDataSourceReferencesResponse implements IListDataSourceReferencesResponse { + + /** + * Constructs a new ListDataSourceReferencesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse); + + /** ListDataSourceReferencesResponse dataSourceReferences. */ + public dataSourceReferences: google.cloud.backupdr.v1beta.IDataSourceReference[]; + + /** ListDataSourceReferencesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourceReferencesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourceReferencesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourceReferencesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse): google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; + + /** + * Encodes the specified ListDataSourceReferencesResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.verify|verify} messages. + * @param message ListDataSourceReferencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourceReferencesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.verify|verify} messages. + * @param message ListDataSourceReferencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourceReferencesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourceReferencesResponse + * @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.v1beta.ListDataSourceReferencesResponse; + + /** + * Decodes a ListDataSourceReferencesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourceReferencesResponse + * @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.v1beta.ListDataSourceReferencesResponse; + + /** + * Verifies a ListDataSourceReferencesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourceReferencesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourceReferencesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; + + /** + * Creates a plain object from a ListDataSourceReferencesResponse message. Also converts values to other types if specified. + * @param message ListDataSourceReferencesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourceReferencesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourceReferencesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDataSourceReferencesForResourceTypeRequest. */ + interface IFetchDataSourceReferencesForResourceTypeRequest { + + /** FetchDataSourceReferencesForResourceTypeRequest parent */ + parent?: (string|null); + + /** FetchDataSourceReferencesForResourceTypeRequest resourceType */ + resourceType?: (string|null); + + /** FetchDataSourceReferencesForResourceTypeRequest pageSize */ + pageSize?: (number|null); + + /** FetchDataSourceReferencesForResourceTypeRequest pageToken */ + pageToken?: (string|null); + + /** FetchDataSourceReferencesForResourceTypeRequest filter */ + filter?: (string|null); + + /** FetchDataSourceReferencesForResourceTypeRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchDataSourceReferencesForResourceTypeRequest. */ + class FetchDataSourceReferencesForResourceTypeRequest implements IFetchDataSourceReferencesForResourceTypeRequest { + + /** + * Constructs a new FetchDataSourceReferencesForResourceTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest); + + /** FetchDataSourceReferencesForResourceTypeRequest parent. */ + public parent: string; + + /** FetchDataSourceReferencesForResourceTypeRequest resourceType. */ + public resourceType: string; + + /** FetchDataSourceReferencesForResourceTypeRequest pageSize. */ + public pageSize: number; + + /** FetchDataSourceReferencesForResourceTypeRequest pageToken. */ + public pageToken: string; + + /** FetchDataSourceReferencesForResourceTypeRequest filter. */ + public filter: string; + + /** FetchDataSourceReferencesForResourceTypeRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchDataSourceReferencesForResourceTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDataSourceReferencesForResourceTypeRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest): google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; + + /** + * Encodes the specified FetchDataSourceReferencesForResourceTypeRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.verify|verify} messages. + * @param message FetchDataSourceReferencesForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDataSourceReferencesForResourceTypeRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.verify|verify} messages. + * @param message FetchDataSourceReferencesForResourceTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDataSourceReferencesForResourceTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDataSourceReferencesForResourceTypeRequest + * @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.v1beta.FetchDataSourceReferencesForResourceTypeRequest; + + /** + * Decodes a FetchDataSourceReferencesForResourceTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDataSourceReferencesForResourceTypeRequest + * @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.v1beta.FetchDataSourceReferencesForResourceTypeRequest; + + /** + * Verifies a FetchDataSourceReferencesForResourceTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDataSourceReferencesForResourceTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDataSourceReferencesForResourceTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; + + /** + * Creates a plain object from a FetchDataSourceReferencesForResourceTypeRequest message. Also converts values to other types if specified. + * @param message FetchDataSourceReferencesForResourceTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDataSourceReferencesForResourceTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDataSourceReferencesForResourceTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDataSourceReferencesForResourceTypeResponse. */ + interface IFetchDataSourceReferencesForResourceTypeResponse { + + /** FetchDataSourceReferencesForResourceTypeResponse dataSourceReferences */ + dataSourceReferences?: (google.cloud.backupdr.v1beta.IDataSourceReference[]|null); + + /** FetchDataSourceReferencesForResourceTypeResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchDataSourceReferencesForResourceTypeResponse. */ + class FetchDataSourceReferencesForResourceTypeResponse implements IFetchDataSourceReferencesForResourceTypeResponse { + + /** + * Constructs a new FetchDataSourceReferencesForResourceTypeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse); + + /** FetchDataSourceReferencesForResourceTypeResponse dataSourceReferences. */ + public dataSourceReferences: google.cloud.backupdr.v1beta.IDataSourceReference[]; + + /** FetchDataSourceReferencesForResourceTypeResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchDataSourceReferencesForResourceTypeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDataSourceReferencesForResourceTypeResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse): google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; + + /** + * Encodes the specified FetchDataSourceReferencesForResourceTypeResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.verify|verify} messages. + * @param message FetchDataSourceReferencesForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDataSourceReferencesForResourceTypeResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.verify|verify} messages. + * @param message FetchDataSourceReferencesForResourceTypeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDataSourceReferencesForResourceTypeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDataSourceReferencesForResourceTypeResponse + * @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.v1beta.FetchDataSourceReferencesForResourceTypeResponse; + + /** + * Decodes a FetchDataSourceReferencesForResourceTypeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDataSourceReferencesForResourceTypeResponse + * @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.v1beta.FetchDataSourceReferencesForResourceTypeResponse; + + /** + * Verifies a FetchDataSourceReferencesForResourceTypeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDataSourceReferencesForResourceTypeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDataSourceReferencesForResourceTypeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; + + /** + * Creates a plain object from a FetchDataSourceReferencesForResourceTypeResponse message. Also converts values to other types if specified. + * @param message FetchDataSourceReferencesForResourceTypeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDataSourceReferencesForResourceTypeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDataSourceReferencesForResourceTypeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a BackupDrProtectionSummary */ + class BackupDrProtectionSummary extends $protobuf.rpc.Service { + + /** + * Constructs a new BackupDrProtectionSummary service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new BackupDrProtectionSummary service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): BackupDrProtectionSummary; + + /** + * Calls ListResourceBackupConfigs. + * @param request ListResourceBackupConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceBackupConfigsResponse + */ + public listResourceBackupConfigs(request: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, callback: google.cloud.backupdr.v1beta.BackupDrProtectionSummary.ListResourceBackupConfigsCallback): void; + + /** + * Calls ListResourceBackupConfigs. + * @param request ListResourceBackupConfigsRequest message or plain object + * @returns Promise + */ + public listResourceBackupConfigs(request: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest): Promise; + } + + namespace BackupDrProtectionSummary { + + /** + * Callback as used by {@link google.cloud.backupdr.v1beta.BackupDrProtectionSummary|listResourceBackupConfigs}. + * @param error Error, if any + * @param [response] ListResourceBackupConfigsResponse + */ + type ListResourceBackupConfigsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) => void; + } + + /** Properties of a ListResourceBackupConfigsRequest. */ + interface IListResourceBackupConfigsRequest { + + /** ListResourceBackupConfigsRequest parent */ + parent?: (string|null); + + /** ListResourceBackupConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListResourceBackupConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListResourceBackupConfigsRequest filter */ + filter?: (string|null); + + /** ListResourceBackupConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourceBackupConfigsRequest. */ + class ListResourceBackupConfigsRequest implements IListResourceBackupConfigsRequest { + + /** + * Constructs a new ListResourceBackupConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest); + + /** ListResourceBackupConfigsRequest parent. */ + public parent: string; + + /** ListResourceBackupConfigsRequest pageSize. */ + public pageSize: number; + + /** ListResourceBackupConfigsRequest pageToken. */ + public pageToken: string; + + /** ListResourceBackupConfigsRequest filter. */ + public filter: string; + + /** ListResourceBackupConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourceBackupConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceBackupConfigsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest): google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; + + /** + * Encodes the specified ListResourceBackupConfigsRequest message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.verify|verify} messages. + * @param message ListResourceBackupConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceBackupConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.verify|verify} messages. + * @param message ListResourceBackupConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceBackupConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceBackupConfigsRequest + * @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.v1beta.ListResourceBackupConfigsRequest; + + /** + * Decodes a ListResourceBackupConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceBackupConfigsRequest + * @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.v1beta.ListResourceBackupConfigsRequest; + + /** + * Verifies a ListResourceBackupConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceBackupConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceBackupConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; + + /** + * Creates a plain object from a ListResourceBackupConfigsRequest message. Also converts values to other types if specified. + * @param message ListResourceBackupConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceBackupConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceBackupConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceBackupConfigsResponse. */ + interface IListResourceBackupConfigsResponse { + + /** ListResourceBackupConfigsResponse resourceBackupConfigs */ + resourceBackupConfigs?: (google.cloud.backupdr.v1beta.IResourceBackupConfig[]|null); + + /** ListResourceBackupConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListResourceBackupConfigsResponse. */ + class ListResourceBackupConfigsResponse implements IListResourceBackupConfigsResponse { + + /** + * Constructs a new ListResourceBackupConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse); + + /** ListResourceBackupConfigsResponse resourceBackupConfigs. */ + public resourceBackupConfigs: google.cloud.backupdr.v1beta.IResourceBackupConfig[]; + + /** ListResourceBackupConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListResourceBackupConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceBackupConfigsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse): google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; + + /** + * Encodes the specified ListResourceBackupConfigsResponse message. Does not implicitly {@link google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.verify|verify} messages. + * @param message ListResourceBackupConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceBackupConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.verify|verify} messages. + * @param message ListResourceBackupConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceBackupConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceBackupConfigsResponse + * @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.v1beta.ListResourceBackupConfigsResponse; + + /** + * Decodes a ListResourceBackupConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceBackupConfigsResponse + * @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.v1beta.ListResourceBackupConfigsResponse; + + /** + * Verifies a ListResourceBackupConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceBackupConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceBackupConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; + + /** + * Creates a plain object from a ListResourceBackupConfigsResponse message. Also converts values to other types if specified. + * @param message ListResourceBackupConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceBackupConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceBackupConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceBackupConfig. */ + interface IResourceBackupConfig { + + /** ResourceBackupConfig name */ + name?: (string|null); + + /** ResourceBackupConfig uid */ + uid?: (string|null); + + /** ResourceBackupConfig targetResource */ + targetResource?: (string|null); + + /** ResourceBackupConfig targetResourceDisplayName */ + targetResourceDisplayName?: (string|null); + + /** ResourceBackupConfig targetResourceType */ + targetResourceType?: (google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType|keyof typeof google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType|null); + + /** ResourceBackupConfig targetResourceLabels */ + targetResourceLabels?: ({ [k: string]: string }|null); + + /** ResourceBackupConfig backupConfigsDetails */ + backupConfigsDetails?: (google.cloud.backupdr.v1beta.IBackupConfigDetails[]|null); + + /** ResourceBackupConfig backupConfigured */ + backupConfigured?: (boolean|null); + + /** ResourceBackupConfig vaulted */ + vaulted?: (boolean|null); + } + + /** Represents a ResourceBackupConfig. */ + class ResourceBackupConfig implements IResourceBackupConfig { + + /** + * Constructs a new ResourceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IResourceBackupConfig); + + /** ResourceBackupConfig name. */ + public name: string; + + /** ResourceBackupConfig uid. */ + public uid: string; + + /** ResourceBackupConfig targetResource. */ + public targetResource: string; + + /** ResourceBackupConfig targetResourceDisplayName. */ + public targetResourceDisplayName: string; + + /** ResourceBackupConfig targetResourceType. */ + public targetResourceType: (google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType|keyof typeof google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType); + + /** ResourceBackupConfig targetResourceLabels. */ + public targetResourceLabels: { [k: string]: string }; + + /** ResourceBackupConfig backupConfigsDetails. */ + public backupConfigsDetails: google.cloud.backupdr.v1beta.IBackupConfigDetails[]; + + /** ResourceBackupConfig backupConfigured. */ + public backupConfigured: boolean; + + /** ResourceBackupConfig vaulted. */ + public vaulted: boolean; + + /** + * Creates a new ResourceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IResourceBackupConfig): google.cloud.backupdr.v1beta.ResourceBackupConfig; + + /** + * Encodes the specified ResourceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.ResourceBackupConfig.verify|verify} messages. + * @param message ResourceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IResourceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.ResourceBackupConfig.verify|verify} messages. + * @param message ResourceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IResourceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceBackupConfig + * @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.v1beta.ResourceBackupConfig; + + /** + * Decodes a ResourceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceBackupConfig + * @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.v1beta.ResourceBackupConfig; + + /** + * Verifies a ResourceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.ResourceBackupConfig; + + /** + * Creates a plain object from a ResourceBackupConfig message. Also converts values to other types if specified. + * @param message ResourceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.ResourceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceBackupConfig { + + /** ResourceType enum. */ + enum ResourceType { + RESOURCE_TYPE_UNSPECIFIED = 0, + CLOUD_SQL_INSTANCE = 1, + COMPUTE_ENGINE_VM = 2, + COMPUTE_ENGINE_DISK = 3, + COMPUTE_ENGINE_REGIONAL_DISK = 4 + } + } + + /** Properties of a BackupConfigDetails. */ + interface IBackupConfigDetails { + + /** BackupConfigDetails backupDrPlanConfig */ + backupDrPlanConfig?: (google.cloud.backupdr.v1beta.IBackupDrPlanConfig|null); + + /** BackupConfigDetails backupDrTemplateConfig */ + backupDrTemplateConfig?: (google.cloud.backupdr.v1beta.IBackupDrTemplateConfig|null); + + /** BackupConfigDetails backupConfigSource */ + backupConfigSource?: (string|null); + + /** BackupConfigDetails backupConfigSourceDisplayName */ + backupConfigSourceDisplayName?: (string|null); + + /** BackupConfigDetails type */ + type?: (google.cloud.backupdr.v1beta.BackupConfigDetails.Type|keyof typeof google.cloud.backupdr.v1beta.BackupConfigDetails.Type|null); + + /** BackupConfigDetails state */ + state?: (google.cloud.backupdr.v1beta.BackupConfigDetails.State|keyof typeof google.cloud.backupdr.v1beta.BackupConfigDetails.State|null); + + /** BackupConfigDetails pitrSettings */ + pitrSettings?: (google.cloud.backupdr.v1beta.IPitrSettings|null); + + /** BackupConfigDetails latestSuccessfulBackupTime */ + latestSuccessfulBackupTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigDetails applicableResource */ + applicableResource?: (string|null); + + /** BackupConfigDetails backupVault */ + backupVault?: (string|null); + + /** BackupConfigDetails backupLocations */ + backupLocations?: (google.cloud.backupdr.v1beta.IBackupLocation[]|null); + } + + /** Represents a BackupConfigDetails. */ + class BackupConfigDetails implements IBackupConfigDetails { + + /** + * Constructs a new BackupConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupConfigDetails); + + /** BackupConfigDetails backupDrPlanConfig. */ + public backupDrPlanConfig?: (google.cloud.backupdr.v1beta.IBackupDrPlanConfig|null); + + /** BackupConfigDetails backupDrTemplateConfig. */ + public backupDrTemplateConfig?: (google.cloud.backupdr.v1beta.IBackupDrTemplateConfig|null); + + /** BackupConfigDetails backupConfigSource. */ + public backupConfigSource: string; + + /** BackupConfigDetails backupConfigSourceDisplayName. */ + public backupConfigSourceDisplayName: string; + + /** BackupConfigDetails type. */ + public type: (google.cloud.backupdr.v1beta.BackupConfigDetails.Type|keyof typeof google.cloud.backupdr.v1beta.BackupConfigDetails.Type); + + /** BackupConfigDetails state. */ + public state: (google.cloud.backupdr.v1beta.BackupConfigDetails.State|keyof typeof google.cloud.backupdr.v1beta.BackupConfigDetails.State); + + /** BackupConfigDetails pitrSettings. */ + public pitrSettings?: (google.cloud.backupdr.v1beta.IPitrSettings|null); + + /** BackupConfigDetails latestSuccessfulBackupTime. */ + public latestSuccessfulBackupTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigDetails applicableResource. */ + public applicableResource: string; + + /** BackupConfigDetails backupVault. */ + public backupVault: string; + + /** BackupConfigDetails backupLocations. */ + public backupLocations: google.cloud.backupdr.v1beta.IBackupLocation[]; + + /** BackupConfigDetails planSpecificConfig. */ + public planSpecificConfig?: ("backupDrPlanConfig"|"backupDrTemplateConfig"); + + /** + * Creates a new BackupConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigDetails instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupConfigDetails): google.cloud.backupdr.v1beta.BackupConfigDetails; + + /** + * Encodes the specified BackupConfigDetails message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupConfigDetails.verify|verify} messages. + * @param message BackupConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigDetails message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupConfigDetails.verify|verify} messages. + * @param message BackupConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigDetails + * @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.v1beta.BackupConfigDetails; + + /** + * Decodes a BackupConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigDetails + * @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.v1beta.BackupConfigDetails; + + /** + * Verifies a BackupConfigDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupConfigDetails; + + /** + * Creates a plain object from a BackupConfigDetails message. Also converts values to other types if specified. + * @param message BackupConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigDetails { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1, + COMPUTE_ENGINE_RESOURCE_POLICY = 2, + BACKUPDR_BACKUP_PLAN = 3, + BACKUPDR_TEMPLATE = 4 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2, + ERROR = 3 + } + } + + /** Properties of a PitrSettings. */ + interface IPitrSettings { + + /** PitrSettings retentionDays */ + retentionDays?: (number|null); + } + + /** Represents a PitrSettings. */ + class PitrSettings implements IPitrSettings { + + /** + * Constructs a new PitrSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IPitrSettings); + + /** PitrSettings retentionDays. */ + public retentionDays: number; + + /** + * Creates a new PitrSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PitrSettings instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IPitrSettings): google.cloud.backupdr.v1beta.PitrSettings; + + /** + * Encodes the specified PitrSettings message. Does not implicitly {@link google.cloud.backupdr.v1beta.PitrSettings.verify|verify} messages. + * @param message PitrSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IPitrSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PitrSettings message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.PitrSettings.verify|verify} messages. + * @param message PitrSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IPitrSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PitrSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PitrSettings + * @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.v1beta.PitrSettings; + + /** + * Decodes a PitrSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PitrSettings + * @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.v1beta.PitrSettings; + + /** + * Verifies a PitrSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PitrSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PitrSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.PitrSettings; + + /** + * Creates a plain object from a PitrSettings message. Also converts values to other types if specified. + * @param message PitrSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.PitrSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PitrSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PitrSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupDrTemplateConfig. */ + interface IBackupDrTemplateConfig { + + /** BackupDrTemplateConfig firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); + + /** BackupDrTemplateConfig thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); + } + + /** Represents a BackupDrTemplateConfig. */ + class BackupDrTemplateConfig implements IBackupDrTemplateConfig { + + /** + * Constructs a new BackupDrTemplateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupDrTemplateConfig); + + /** BackupDrTemplateConfig firstPartyManagementUri. */ + public firstPartyManagementUri: string; + + /** BackupDrTemplateConfig thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; + + /** + * Creates a new BackupDrTemplateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupDrTemplateConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupDrTemplateConfig): google.cloud.backupdr.v1beta.BackupDrTemplateConfig; + + /** + * Encodes the specified BackupDrTemplateConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrTemplateConfig.verify|verify} messages. + * @param message BackupDrTemplateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupDrTemplateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupDrTemplateConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrTemplateConfig.verify|verify} messages. + * @param message BackupDrTemplateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupDrTemplateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupDrTemplateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupDrTemplateConfig + * @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.v1beta.BackupDrTemplateConfig; + + /** + * Decodes a BackupDrTemplateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupDrTemplateConfig + * @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.v1beta.BackupDrTemplateConfig; + + /** + * Verifies a BackupDrTemplateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupDrTemplateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupDrTemplateConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupDrTemplateConfig; + + /** + * Creates a plain object from a BackupDrTemplateConfig message. Also converts values to other types if specified. + * @param message BackupDrTemplateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupDrTemplateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupDrTemplateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupDrTemplateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupDrPlanConfig. */ + interface IBackupDrPlanConfig { + + /** BackupDrPlanConfig backupDrPlanRules */ + backupDrPlanRules?: (google.cloud.backupdr.v1beta.IBackupDrPlanRule[]|null); + } + + /** Represents a BackupDrPlanConfig. */ + class BackupDrPlanConfig implements IBackupDrPlanConfig { + + /** + * Constructs a new BackupDrPlanConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupDrPlanConfig); + + /** BackupDrPlanConfig backupDrPlanRules. */ + public backupDrPlanRules: google.cloud.backupdr.v1beta.IBackupDrPlanRule[]; + + /** + * Creates a new BackupDrPlanConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupDrPlanConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupDrPlanConfig): google.cloud.backupdr.v1beta.BackupDrPlanConfig; + + /** + * Encodes the specified BackupDrPlanConfig message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrPlanConfig.verify|verify} messages. + * @param message BackupDrPlanConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupDrPlanConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupDrPlanConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrPlanConfig.verify|verify} messages. + * @param message BackupDrPlanConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupDrPlanConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupDrPlanConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupDrPlanConfig + * @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.v1beta.BackupDrPlanConfig; + + /** + * Decodes a BackupDrPlanConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupDrPlanConfig + * @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.v1beta.BackupDrPlanConfig; + + /** + * Verifies a BackupDrPlanConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupDrPlanConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupDrPlanConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupDrPlanConfig; + + /** + * Creates a plain object from a BackupDrPlanConfig message. Also converts values to other types if specified. + * @param message BackupDrPlanConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupDrPlanConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupDrPlanConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupDrPlanConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupDrPlanRule. */ + interface IBackupDrPlanRule { + + /** BackupDrPlanRule ruleId */ + ruleId?: (string|null); + + /** BackupDrPlanRule lastSuccessfulBackupTime */ + lastSuccessfulBackupTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupDrPlanRule. */ + class BackupDrPlanRule implements IBackupDrPlanRule { + + /** + * Constructs a new BackupDrPlanRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupDrPlanRule); + + /** BackupDrPlanRule ruleId. */ + public ruleId: string; + + /** BackupDrPlanRule lastSuccessfulBackupTime. */ + public lastSuccessfulBackupTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new BackupDrPlanRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupDrPlanRule instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupDrPlanRule): google.cloud.backupdr.v1beta.BackupDrPlanRule; + + /** + * Encodes the specified BackupDrPlanRule message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrPlanRule.verify|verify} messages. + * @param message BackupDrPlanRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupDrPlanRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupDrPlanRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupDrPlanRule.verify|verify} messages. + * @param message BackupDrPlanRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupDrPlanRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupDrPlanRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupDrPlanRule + * @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.v1beta.BackupDrPlanRule; + + /** + * Decodes a BackupDrPlanRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupDrPlanRule + * @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.v1beta.BackupDrPlanRule; + + /** + * Verifies a BackupDrPlanRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupDrPlanRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupDrPlanRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupDrPlanRule; + + /** + * Creates a plain object from a BackupDrPlanRule message. Also converts values to other types if specified. + * @param message BackupDrPlanRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupDrPlanRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupDrPlanRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupDrPlanRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLocation. */ + interface IBackupLocation { + + /** BackupLocation type */ + type?: (google.cloud.backupdr.v1beta.BackupLocation.Type|keyof typeof google.cloud.backupdr.v1beta.BackupLocation.Type|null); + + /** BackupLocation locationId */ + locationId?: (string|null); + } + + /** Represents a BackupLocation. */ + class BackupLocation implements IBackupLocation { + + /** + * Constructs a new BackupLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1beta.IBackupLocation); + + /** BackupLocation type. */ + public type: (google.cloud.backupdr.v1beta.BackupLocation.Type|keyof typeof google.cloud.backupdr.v1beta.BackupLocation.Type); + + /** BackupLocation locationId. */ + public locationId: string; + + /** + * Creates a new BackupLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLocation instance + */ + public static create(properties?: google.cloud.backupdr.v1beta.IBackupLocation): google.cloud.backupdr.v1beta.BackupLocation; + + /** + * Encodes the specified BackupLocation message. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupLocation.verify|verify} messages. + * @param message BackupLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1beta.IBackupLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLocation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1beta.BackupLocation.verify|verify} messages. + * @param message BackupLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1beta.IBackupLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLocation + * @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.v1beta.BackupLocation; + + /** + * Decodes a BackupLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLocation + * @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.v1beta.BackupLocation; + + /** + * Verifies a BackupLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1beta.BackupLocation; + + /** + * Creates a plain object from a BackupLocation message. Also converts values to other types if specified. + * @param message BackupLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1beta.BackupLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupLocation { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ZONAL = 1, + REGIONAL = 2, + MULTI_REGIONAL = 3 + } + } + } } } diff --git a/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index c824e495f73a..3f0f91372af1 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -1 +1 @@ -(function(global,factory){if(typeof define==="function"&&define.amd)define(["protobufjs/minimal"],factory);else if(typeof require==="function"&&typeof module==="object"&&module&&module.exports)module.exports=factory(require("google-gax/build/src/protobuf").protobufMinimal)})(this,function($protobuf){"use strict";var $Reader=$protobuf.Reader,$Writer=$protobuf.Writer,$util=$protobuf.util;var $root=$protobuf.roots._google_cloud_backupdr_protos||($protobuf.roots._google_cloud_backupdr_protos={});$root.google=function(){var google={};google.cloud=function(){var cloud={};cloud.backupdr=function(){var backupdr={};backupdr.v1=function(){var v1={};v1.BackupDR=function(){function BackupDR(rpcImpl,requestDelimited,responseDelimited){$protobuf.rpc.Service.call(this,rpcImpl,requestDelimited,responseDelimited)}(BackupDR.prototype=Object.create($protobuf.rpc.Service.prototype)).constructor=BackupDR;BackupDR.create=function create(rpcImpl,requestDelimited,responseDelimited){return new this(rpcImpl,requestDelimited,responseDelimited)};Object.defineProperty(BackupDR.prototype.listManagementServers=function listManagementServers(request,callback){return this.rpcCall(listManagementServers,$root.google.cloud.backupdr.v1.ListManagementServersRequest,$root.google.cloud.backupdr.v1.ListManagementServersResponse,request,callback)},"name",{value:"ListManagementServers"});Object.defineProperty(BackupDR.prototype.getManagementServer=function getManagementServer(request,callback){return this.rpcCall(getManagementServer,$root.google.cloud.backupdr.v1.GetManagementServerRequest,$root.google.cloud.backupdr.v1.ManagementServer,request,callback)},"name",{value:"GetManagementServer"});Object.defineProperty(BackupDR.prototype.createManagementServer=function createManagementServer(request,callback){return this.rpcCall(createManagementServer,$root.google.cloud.backupdr.v1.CreateManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateManagementServer"});Object.defineProperty(BackupDR.prototype.deleteManagementServer=function deleteManagementServer(request,callback){return this.rpcCall(deleteManagementServer,$root.google.cloud.backupdr.v1.DeleteManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteManagementServer"});Object.defineProperty(BackupDR.prototype.createBackupVault=function createBackupVault(request,callback){return this.rpcCall(createBackupVault,$root.google.cloud.backupdr.v1.CreateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupVault"});Object.defineProperty(BackupDR.prototype.listBackupVaults=function listBackupVaults(request,callback){return this.rpcCall(listBackupVaults,$root.google.cloud.backupdr.v1.ListBackupVaultsRequest,$root.google.cloud.backupdr.v1.ListBackupVaultsResponse,request,callback)},"name",{value:"ListBackupVaults"});Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults=function fetchUsableBackupVaults(request,callback){return this.rpcCall(fetchUsableBackupVaults,$root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest,$root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse,request,callback)},"name",{value:"FetchUsableBackupVaults"});Object.defineProperty(BackupDR.prototype.getBackupVault=function getBackupVault(request,callback){return this.rpcCall(getBackupVault,$root.google.cloud.backupdr.v1.GetBackupVaultRequest,$root.google.cloud.backupdr.v1.BackupVault,request,callback)},"name",{value:"GetBackupVault"});Object.defineProperty(BackupDR.prototype.updateBackupVault=function updateBackupVault(request,callback){return this.rpcCall(updateBackupVault,$root.google.cloud.backupdr.v1.UpdateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupVault"});Object.defineProperty(BackupDR.prototype.deleteBackupVault=function deleteBackupVault(request,callback){return this.rpcCall(deleteBackupVault,$root.google.cloud.backupdr.v1.DeleteBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupVault"});Object.defineProperty(BackupDR.prototype.listDataSources=function listDataSources(request,callback){return this.rpcCall(listDataSources,$root.google.cloud.backupdr.v1.ListDataSourcesRequest,$root.google.cloud.backupdr.v1.ListDataSourcesResponse,request,callback)},"name",{value:"ListDataSources"});Object.defineProperty(BackupDR.prototype.getDataSource=function getDataSource(request,callback){return this.rpcCall(getDataSource,$root.google.cloud.backupdr.v1.GetDataSourceRequest,$root.google.cloud.backupdr.v1.DataSource,request,callback)},"name",{value:"GetDataSource"});Object.defineProperty(BackupDR.prototype.updateDataSource=function updateDataSource(request,callback){return this.rpcCall(updateDataSource,$root.google.cloud.backupdr.v1.UpdateDataSourceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateDataSource"});Object.defineProperty(BackupDR.prototype.listBackups=function listBackups(request,callback){return this.rpcCall(listBackups,$root.google.cloud.backupdr.v1.ListBackupsRequest,$root.google.cloud.backupdr.v1.ListBackupsResponse,request,callback)},"name",{value:"ListBackups"});Object.defineProperty(BackupDR.prototype.fetchBackupsForResourceType=function fetchBackupsForResourceType(request,callback){return this.rpcCall(fetchBackupsForResourceType,$root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupsForResourceType"});Object.defineProperty(BackupDR.prototype.getBackup=function getBackup(request,callback){return this.rpcCall(getBackup,$root.google.cloud.backupdr.v1.GetBackupRequest,$root.google.cloud.backupdr.v1.Backup,request,callback)},"name",{value:"GetBackup"});Object.defineProperty(BackupDR.prototype.updateBackup=function updateBackup(request,callback){return this.rpcCall(updateBackup,$root.google.cloud.backupdr.v1.UpdateBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackup"});Object.defineProperty(BackupDR.prototype.deleteBackup=function deleteBackup(request,callback){return this.rpcCall(deleteBackup,$root.google.cloud.backupdr.v1.DeleteBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackup"});Object.defineProperty(BackupDR.prototype.restoreBackup=function restoreBackup(request,callback){return this.rpcCall(restoreBackup,$root.google.cloud.backupdr.v1.RestoreBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"RestoreBackup"});Object.defineProperty(BackupDR.prototype.createBackupPlan=function createBackupPlan(request,callback){return this.rpcCall(createBackupPlan,$root.google.cloud.backupdr.v1.CreateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlan"});Object.defineProperty(BackupDR.prototype.updateBackupPlan=function updateBackupPlan(request,callback){return this.rpcCall(updateBackupPlan,$root.google.cloud.backupdr.v1.UpdateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlan=function getBackupPlan(request,callback){return this.rpcCall(getBackupPlan,$root.google.cloud.backupdr.v1.GetBackupPlanRequest,$root.google.cloud.backupdr.v1.BackupPlan,request,callback)},"name",{value:"GetBackupPlan"});Object.defineProperty(BackupDR.prototype.listBackupPlans=function listBackupPlans(request,callback){return this.rpcCall(listBackupPlans,$root.google.cloud.backupdr.v1.ListBackupPlansRequest,$root.google.cloud.backupdr.v1.ListBackupPlansResponse,request,callback)},"name",{value:"ListBackupPlans"});Object.defineProperty(BackupDR.prototype.deleteBackupPlan=function deleteBackupPlan(request,callback){return this.rpcCall(deleteBackupPlan,$root.google.cloud.backupdr.v1.DeleteBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlanRevision=function getBackupPlanRevision(request,callback){return this.rpcCall(getBackupPlanRevision,$root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest,$root.google.cloud.backupdr.v1.BackupPlanRevision,request,callback)},"name",{value:"GetBackupPlanRevision"});Object.defineProperty(BackupDR.prototype.listBackupPlanRevisions=function listBackupPlanRevisions(request,callback){return this.rpcCall(listBackupPlanRevisions,$root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest,$root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse,request,callback)},"name",{value:"ListBackupPlanRevisions"});Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation=function createBackupPlanAssociation(request,callback){return this.rpcCall(createBackupPlanAssociation,$root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.updateBackupPlanAssociation=function updateBackupPlanAssociation(request,callback){return this.rpcCall(updateBackupPlanAssociation,$root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation=function getBackupPlanAssociation(request,callback){return this.rpcCall(getBackupPlanAssociation,$root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest,$root.google.cloud.backupdr.v1.BackupPlanAssociation,request,callback)},"name",{value:"GetBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations=function listBackupPlanAssociations(request,callback){return this.rpcCall(listBackupPlanAssociations,$root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest,$root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse,request,callback)},"name",{value:"ListBackupPlanAssociations"});Object.defineProperty(BackupDR.prototype.fetchBackupPlanAssociationsForResourceType=function fetchBackupPlanAssociationsForResourceType(request,callback){return this.rpcCall(fetchBackupPlanAssociationsForResourceType,$root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupPlanAssociationsForResourceType"});Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation=function deleteBackupPlanAssociation(request,callback){return this.rpcCall(deleteBackupPlanAssociation,$root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.triggerBackup=function triggerBackup(request,callback){return this.rpcCall(triggerBackup,$root.google.cloud.backupdr.v1.TriggerBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"TriggerBackup"});Object.defineProperty(BackupDR.prototype.getDataSourceReference=function getDataSourceReference(request,callback){return this.rpcCall(getDataSourceReference,$root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest,$root.google.cloud.backupdr.v1.DataSourceReference,request,callback)},"name",{value:"GetDataSourceReference"});Object.defineProperty(BackupDR.prototype.listDataSourceReferences=function listDataSourceReferences(request,callback){return this.rpcCall(listDataSourceReferences,$root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest,$root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse,request,callback)},"name",{value:"ListDataSourceReferences"});Object.defineProperty(BackupDR.prototype.fetchDataSourceReferencesForResourceType=function fetchDataSourceReferencesForResourceType(request,callback){return this.rpcCall(fetchDataSourceReferencesForResourceType,$root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse,request,callback)},"name",{value:"FetchDataSourceReferencesForResourceType"});Object.defineProperty(BackupDR.prototype.initializeService=function initializeService(request,callback){return this.rpcCall(initializeService,$root.google.cloud.backupdr.v1.InitializeServiceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"InitializeService"});return BackupDR}();v1.NetworkConfig=function(){function NetworkConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkConfig;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.peeringMode=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.network!=null&&message.hasOwnProperty("network"))if(!$util.isString(message.network))return"network: string expected";if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))switch(message.peeringMode){default:return"peeringMode: enum value expected";case 0:case 1:break}return null};NetworkConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.NetworkConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkConfig;if(object.network!=null)message.network=String(object.network);switch(object.peeringMode){default:if(typeof object.peeringMode==="number"){message.peeringMode=object.peeringMode;break}break;case"PEERING_MODE_UNSPECIFIED":case 0:message.peeringMode=0;break;case"PRIVATE_SERVICE_ACCESS":case 1:message.peeringMode=1;break}return message};NetworkConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.network="";object.peeringMode=options.enums===String?"PEERING_MODE_UNSPECIFIED":0}if(message.network!=null&&message.hasOwnProperty("network"))object.network=message.network;if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))object.peeringMode=options.enums===String?$root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode]===undefined?message.peeringMode:$root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode]:message.peeringMode;return object};NetworkConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.NetworkConfig"};NetworkConfig.PeeringMode=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PEERING_MODE_UNSPECIFIED"]=0;values[valuesById[1]="PRIVATE_SERVICE_ACCESS"]=1;return values}();return NetworkConfig}();v1.ManagementURI=function(){function ManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ManagementURI;while(reader.pos>>3){case 1:{message.webUi=reader.string();break}case 2:{message.api=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.webUi!=null&&message.hasOwnProperty("webUi"))if(!$util.isString(message.webUi))return"webUi: string expected";if(message.api!=null&&message.hasOwnProperty("api"))if(!$util.isString(message.api))return"api: string expected";return null};ManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ManagementURI;if(object.webUi!=null)message.webUi=String(object.webUi);if(object.api!=null)message.api=String(object.api);return message};ManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.webUi="";object.api=""}if(message.webUi!=null&&message.hasOwnProperty("webUi"))object.webUi=message.webUi;if(message.api!=null&&message.hasOwnProperty("api"))object.api=message.api;return object};ManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ManagementURI"};return ManagementURI}();v1.WorkforceIdentityBasedManagementURI=function(){function WorkforceIdentityBasedManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};WorkforceIdentityBasedManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};WorkforceIdentityBasedManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};WorkforceIdentityBasedManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"};return WorkforceIdentityBasedManagementURI}();v1.WorkforceIdentityBasedOAuth2ClientID=function(){function WorkforceIdentityBasedOAuth2ClientID(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID;while(reader.pos>>3){case 1:{message.firstPartyOauth2ClientId=reader.string();break}case 2:{message.thirdPartyOauth2ClientId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedOAuth2ClientID.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedOAuth2ClientID.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))if(!$util.isString(message.firstPartyOauth2ClientId))return"firstPartyOauth2ClientId: string expected";if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))if(!$util.isString(message.thirdPartyOauth2ClientId))return"thirdPartyOauth2ClientId: string expected";return null};WorkforceIdentityBasedOAuth2ClientID.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID;if(object.firstPartyOauth2ClientId!=null)message.firstPartyOauth2ClientId=String(object.firstPartyOauth2ClientId);if(object.thirdPartyOauth2ClientId!=null)message.thirdPartyOauth2ClientId=String(object.thirdPartyOauth2ClientId);return message};WorkforceIdentityBasedOAuth2ClientID.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyOauth2ClientId="";object.thirdPartyOauth2ClientId=""}if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))object.firstPartyOauth2ClientId=message.firstPartyOauth2ClientId;if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))object.thirdPartyOauth2ClientId=message.thirdPartyOauth2ClientId;return object};WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedOAuth2ClientID.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"};return WorkforceIdentityBasedOAuth2ClientID}();v1.ManagementServer=function(){function ManagementServer(properties){this.labels={};this.networks=[];this.baProxyUri=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ManagementServer,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 9:{message.description=reader.string();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 2:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 14:{message.type=reader.int32();break}case 11:{message.managementUri=$root.google.cloud.backupdr.v1.ManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.workforceIdentityBasedManagementUri=$root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.networks&&message.networks.length))message.networks=[];message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 13:{message.etag=reader.string();break}case 15:{message.oauth2ClientId=reader.string();break}case 17:{message.workforceIdentityBasedOauth2ClientId=$root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader,reader.uint32(),undefined,long+1);break}case 18:{if(!(message.baProxyUri&&message.baProxyUri.length))message.baProxyUri=[];message.baProxyUri.push(reader.string());break}case 19:{message.satisfiesPzs=$root.google.protobuf.BoolValue.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.satisfiesPzi=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ManagementServer.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementServer.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ManagementServer;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.ManagementServer.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListManagementServersRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListManagementServersRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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")){properties._filter=1;if(!$util.isString(message.filter))return"filter: string expected"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){properties._orderBy=1;if(!$util.isString(message.orderBy))return"orderBy: string expected"}return null};ListManagementServersRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListManagementServersRequest;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};ListManagementServersRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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(options.oneofs)object._filter="filter"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){object.orderBy=message.orderBy;if(options.oneofs)object._orderBy="orderBy"}return object};ListManagementServersRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListManagementServersRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListManagementServersRequest"};return ListManagementServersRequest}();v1.ListManagementServersResponse=function(){function ListManagementServersResponse(properties){this.managementServers=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListManagementServersResponse;while(reader.pos>>3){case 1:{if(!(message.managementServers&&message.managementServers.length))message.managementServers=[];message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListManagementServersResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.managementServers!=null&&message.hasOwnProperty("managementServers")){if(!Array.isArray(message.managementServers))return"managementServers: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListManagementServersResponse;if(object.managementServers){if(!Array.isArray(object.managementServers))throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected");message.managementServers=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetManagementServerRequest;if(object.name!=null)message.name=String(object.name);return message};GetManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetManagementServerRequest"};return GetManagementServerRequest}();v1.CreateManagementServerRequest=function(){function CreateManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateManagementServerRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.managementServerId=reader.string();break}case 3:{message.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))if(!$util.isString(message.managementServerId))return"managementServerId: string expected";if(message.managementServer!=null&&message.hasOwnProperty("managementServer")){var error=$root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer,long+1);if(error)return"managementServer."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateManagementServerRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.managementServerId!=null)message.managementServerId=String(object.managementServerId);if(object.managementServer!=null){if(typeof object.managementServer!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected");message.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.managementServerId="";object.managementServer=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))object.managementServerId=message.managementServerId;if(message.managementServer!=null&&message.hasOwnProperty("managementServer"))object.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateManagementServerRequest"};return CreateManagementServerRequest}();v1.DeleteManagementServerRequest=function(){function DeleteManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteManagementServerRequest.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;return object};DeleteManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteManagementServerRequest"};return DeleteManagementServerRequest}();v1.InitializeServiceRequest=function(){function InitializeServiceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InitializeServiceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.requestId=reader.string();break}case 4:{message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){properties.initializationConfig=1;{var error=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify(message.cloudSqlInstanceInitializationConfig,long+1);if(error)return"cloudSqlInstanceInitializationConfig."+error}}return null};InitializeServiceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.InitializeServiceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InitializeServiceRequest;if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.cloudSqlInstanceInitializationConfig!=null){if(typeof object.cloudSqlInstanceInitializationConfig!=="object")throw TypeError(".google.cloud.backupdr.v1.InitializeServiceRequest.cloudSqlInstanceInitializationConfig: object expected");message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.fromObject(object.cloudSqlInstanceInitializationConfig,long+1)}return message};InitializeServiceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.resourceType="";object.requestId=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))object.resourceType=message.resourceType;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){object.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.toObject(message.cloudSqlInstanceInitializationConfig,options);if(options.oneofs)object.initializationConfig="cloudSqlInstanceInitializationConfig"}return object};InitializeServiceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.InitializeServiceRequest"};return InitializeServiceRequest}();v1.InitializeServiceResponse=function(){function InitializeServiceResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InitializeServiceResponse;while(reader.pos>>3){case 1:{message.backupVaultName=reader.string();break}case 2:{message.backupPlanName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))if(!$util.isString(message.backupVaultName))return"backupVaultName: string expected";if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))if(!$util.isString(message.backupPlanName))return"backupPlanName: string expected";return null};InitializeServiceResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.InitializeServiceResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InitializeServiceResponse;if(object.backupVaultName!=null)message.backupVaultName=String(object.backupVaultName);if(object.backupPlanName!=null)message.backupPlanName=String(object.backupPlanName);return message};InitializeServiceResponse.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupVaultName="";object.backupPlanName=""}if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))object.backupVaultName=message.backupVaultName;if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))object.backupPlanName=message.backupPlanName;return object};InitializeServiceResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.InitializeServiceResponse"};return InitializeServiceResponse}();v1.OperationMetadata=function(){function OperationMetadata(properties){this.additionalInfo={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.OperationMetadata,key,value;while(reader.pos>>3){case 1:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.endTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.target=reader.string();break}case 4:{message.verb=reader.string();break}case 5:{message.statusMessage=reader.string();break}case 6:{message.requestedCancellation=reader.bool();break}case 7:{message.apiVersion=reader.string();break}case 8:{if(message.additionalInfo===$util.emptyObject)message.additionalInfo={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.additionalInfo,key);message.additionalInfo[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};OperationMetadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OperationMetadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.endTime!=null&&message.hasOwnProperty("endTime")){var error=$root.google.protobuf.Timestamp.verify(message.endTime,long+1);if(error)return"endTime."+error}if(message.target!=null&&message.hasOwnProperty("target"))if(!$util.isString(message.target))return"target: string expected";if(message.verb!=null&&message.hasOwnProperty("verb"))if(!$util.isString(message.verb))return"verb: string expected";if(message.statusMessage!=null&&message.hasOwnProperty("statusMessage"))if(!$util.isString(message.statusMessage))return"statusMessage: string expected";if(message.requestedCancellation!=null&&message.hasOwnProperty("requestedCancellation"))if(typeof message.requestedCancellation!=="boolean")return"requestedCancellation: boolean expected";if(message.apiVersion!=null&&message.hasOwnProperty("apiVersion"))if(!$util.isString(message.apiVersion))return"apiVersion: string expected";if(message.additionalInfo!=null&&message.hasOwnProperty("additionalInfo")){if(!$util.isObject(message.additionalInfo))return"additionalInfo: object expected";var key=Object.keys(message.additionalInfo);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.OperationMetadata;if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.endTime!=null){if(typeof object.endTime!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.endTime: object expected");message.endTime=$root.google.protobuf.Timestamp.fromObject(object.endTime,long+1)}if(object.target!=null)message.target=String(object.target);if(object.verb!=null)message.verb=String(object.verb);if(object.statusMessage!=null)message.statusMessage=String(object.statusMessage);if(object.requestedCancellation!=null)message.requestedCancellation=Boolean(object.requestedCancellation);if(object.apiVersion!=null)message.apiVersion=String(object.apiVersion);if(object.additionalInfo){if(typeof object.additionalInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected");message.additionalInfo={};for(var keys=Object.keys(object.additionalInfo),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlan,key,value;while(reader.pos>>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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{if(!(message.backupRules&&message.backupRules.length))message.backupRules=[];message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.state=reader.int32();break}case 8:{message.resourceType=reader.string();break}case 9:{message.etag=reader.string();break}case 10:{message.backupVault=reader.string();break}case 11:{message.backupVaultServiceAccount=reader.string();break}case 12:{message.logRetentionDays=reader.int64();break}case 13:{if(!(message.supportedResourceTypes&&message.supportedResourceTypes.length))message.supportedResourceTypes=[];message.supportedResourceTypes.push(reader.string());break}case 14:{message.revisionId=reader.string();break}case 15:{message.revisionName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlan.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlan.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlan;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.BackupPlan.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>0,object.logRetentionDays.high>>>0).toNumber();if(object.supportedResourceTypes){if(!Array.isArray(object.supportedResourceTypes))throw TypeError(".google.cloud.backupdr.v1.BackupPlan.supportedResourceTypes: array expected");message.supportedResourceTypes=[];for(var i=0;i>>0,message.logRetentionDays.high>>>0).toNumber():message.logRetentionDays;if(message.supportedResourceTypes&&message.supportedResourceTypes.length){object.supportedResourceTypes=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupRule;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 4:{message.backupRetentionDays=reader.int32();break}case 5:{message.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))if(!$util.isInteger(message.backupRetentionDays))return"backupRetentionDays: integer expected";if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){properties.backupScheduleOneof=1;{var error=$root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule,long+1);if(error)return"standardSchedule."+error}}return null};BackupRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupRule;if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.backupRetentionDays!=null)message.backupRetentionDays=object.backupRetentionDays|0;if(object.standardSchedule!=null){if(typeof object.standardSchedule!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected");message.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule,long+1)}return message};BackupRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.backupRetentionDays=0}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))object.backupRetentionDays=message.backupRetentionDays;if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){object.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule,options);if(options.oneofs)object.backupScheduleOneof="standardSchedule"}return object};BackupRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupRule"};return BackupRule}();v1.StandardSchedule=function(){function StandardSchedule(properties){this.daysOfWeek=[];this.daysOfMonth=[];this.months=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.StandardSchedule;while(reader.pos>>3){case 1:{message.recurrenceType=reader.int32();break}case 2:{message.hourlyFrequency=reader.int32();break}case 3:{if(!(message.daysOfWeek&&message.daysOfWeek.length))message.daysOfWeek=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.recurrenceType!=null&&message.hasOwnProperty("recurrenceType"))switch(message.recurrenceType){default:return"recurrenceType: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.hourlyFrequency!=null&&message.hasOwnProperty("hourlyFrequency"))if(!$util.isInteger(message.hourlyFrequency))return"hourlyFrequency: integer expected";if(message.daysOfWeek!=null&&message.hasOwnProperty("daysOfWeek")){if(!Array.isArray(message.daysOfWeek))return"daysOfWeek: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.StandardSchedule;switch(object.recurrenceType){default:if(typeof object.recurrenceType==="number"){message.recurrenceType=object.recurrenceType;break}break;case"RECURRENCE_TYPE_UNSPECIFIED":case 0:message.recurrenceType=0;break;case"HOURLY":case 1:message.recurrenceType=1;break;case"DAILY":case 2:message.recurrenceType=2;break;case"WEEKLY":case 3:message.recurrenceType=3;break;case"MONTHLY":case 4:message.recurrenceType=4;break;case"YEARLY":case 5:message.recurrenceType=5;break}if(object.hourlyFrequency!=null)message.hourlyFrequency=object.hourlyFrequency|0;if(object.daysOfWeek){if(!Array.isArray(object.daysOfWeek))throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected");message.daysOfWeek=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupWindow;while(reader.pos>>3){case 1:{message.startHourOfDay=reader.int32();break}case 2:{message.endHourOfDay=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BackupWindow.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupWindow.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))if(!$util.isInteger(message.startHourOfDay))return"startHourOfDay: integer expected";if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))if(!$util.isInteger(message.endHourOfDay))return"endHourOfDay: integer expected";return null};BackupWindow.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupWindow)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupWindow;if(object.startHourOfDay!=null)message.startHourOfDay=object.startHourOfDay|0;if(object.endHourOfDay!=null)message.endHourOfDay=object.endHourOfDay|0;return message};BackupWindow.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.startHourOfDay=0;object.endHourOfDay=0}if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))object.startHourOfDay=message.startHourOfDay;if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))object.endHourOfDay=message.endHourOfDay;return object};BackupWindow.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupWindow.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupWindow"};return BackupWindow}();v1.WeekDayOfMonth=function(){function WeekDayOfMonth(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WeekDayOfMonth;while(reader.pos>>3){case 1:{message.weekOfMonth=reader.int32();break}case 2:{message.dayOfWeek=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};WeekDayOfMonth.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WeekDayOfMonth.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))switch(message.weekOfMonth){default:return"weekOfMonth: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))switch(message.dayOfWeek){default:return"dayOfWeek: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break}return null};WeekDayOfMonth.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WeekDayOfMonth;switch(object.weekOfMonth){default:if(typeof object.weekOfMonth==="number"){message.weekOfMonth=object.weekOfMonth;break}break;case"WEEK_OF_MONTH_UNSPECIFIED":case 0:message.weekOfMonth=0;break;case"FIRST":case 1:message.weekOfMonth=1;break;case"SECOND":case 2:message.weekOfMonth=2;break;case"THIRD":case 3:message.weekOfMonth=3;break;case"FOURTH":case 4:message.weekOfMonth=4;break;case"LAST":case 5:message.weekOfMonth=5;break}switch(object.dayOfWeek){default:if(typeof object.dayOfWeek==="number"){message.dayOfWeek=object.dayOfWeek;break}break;case"DAY_OF_WEEK_UNSPECIFIED":case 0:message.dayOfWeek=0;break;case"MONDAY":case 1:message.dayOfWeek=1;break;case"TUESDAY":case 2:message.dayOfWeek=2;break;case"WEDNESDAY":case 3:message.dayOfWeek=3;break;case"THURSDAY":case 4:message.dayOfWeek=4;break;case"FRIDAY":case 5:message.dayOfWeek=5;break;case"SATURDAY":case 6:message.dayOfWeek=6;break;case"SUNDAY":case 7:message.dayOfWeek=7;break}return message};WeekDayOfMonth.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.weekOfMonth=options.enums===String?"WEEK_OF_MONTH_UNSPECIFIED":0;object.dayOfWeek=options.enums===String?"DAY_OF_WEEK_UNSPECIFIED":0}if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))object.weekOfMonth=options.enums===String?$root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]===undefined?message.weekOfMonth:$root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]:message.weekOfMonth;if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))object.dayOfWeek=options.enums===String?$root.google.type.DayOfWeek[message.dayOfWeek]===undefined?message.dayOfWeek:$root.google.type.DayOfWeek[message.dayOfWeek]:message.dayOfWeek;return object};WeekDayOfMonth.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WeekDayOfMonth.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WeekDayOfMonth"};WeekDayOfMonth.WeekOfMonth=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="WEEK_OF_MONTH_UNSPECIFIED"]=0;values[valuesById[1]="FIRST"]=1;values[valuesById[2]="SECOND"]=2;values[valuesById[3]="THIRD"]=3;values[valuesById[4]="FOURTH"]=4;values[valuesById[5]="LAST"]=5;return values}();return WeekDayOfMonth}();v1.CreateBackupPlanRequest=function(){function CreateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanId=reader.string();break}case 3:{message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))if(!$util.isString(message.backupPlanId))return"backupPlanId: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanId!=null)message.backupPlanId=String(object.backupPlanId);if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanId="";object.backupPlan=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))object.backupPlanId=message.backupPlanId;if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupPlanRequest"};return CreateBackupPlanRequest}();v1.ListBackupPlansRequest=function(){function ListBackupPlansRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlansRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlansRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListBackupPlansRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlansRequest;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};ListBackupPlansRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListBackupPlansRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlansRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlansRequest"};return ListBackupPlansRequest}();v1.ListBackupPlansResponse=function(){function ListBackupPlansResponse(properties){this.backupPlans=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlansResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlans&&message.backupPlans.length))message.backupPlans=[];message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlansResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlans!=null&&message.hasOwnProperty("backupPlans")){if(!Array.isArray(message.backupPlans))return"backupPlans: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlansResponse;if(object.backupPlans){if(!Array.isArray(object.backupPlans))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected");message.backupPlans=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanRequest"};return GetBackupPlanRequest}();v1.DeleteBackupPlanRequest=function(){function DeleteBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupPlanRequest.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;return object};DeleteBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupPlanRequest"};return DeleteBackupPlanRequest}();v1.UpdateBackupPlanRequest=function(){function UpdateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest;while(reader.pos>>3){case 1:{message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest;if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan=null;object.updateMask=null;object.requestId=""}if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupPlanRequest"};return UpdateBackupPlanRequest}();v1.BackupPlanRevision=function(){function BackupPlanRevision(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlanRevision;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.revisionId=reader.string();break}case 3:{message.state=reader.int32();break}case 4:{message.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanRevision.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanRevision.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))if(!$util.isString(message.revisionId))return"revisionId: 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.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlanSnapshot,long+1);if(error)return"backupPlanSnapshot."+error}if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}return null};BackupPlanRevision.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupPlanRevision)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlanRevision;if(object.name!=null)message.name=String(object.name);if(object.revisionId!=null)message.revisionId=String(object.revisionId);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"INACTIVE":case 4:message.state=4;break}if(object.backupPlanSnapshot!=null){if(typeof object.backupPlanSnapshot!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanRevision.backupPlanSnapshot: object expected");message.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlanSnapshot,long+1)}if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanRevision.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}return message};BackupPlanRevision.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.revisionId="";object.state=options.enums===String?"STATE_UNSPECIFIED":0;object.backupPlanSnapshot=null;object.createTime=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))object.revisionId=message.revisionId;if(message.state!=null&&message.hasOwnProperty("state"))object.state=options.enums===String?$root.google.cloud.backupdr.v1.BackupPlanRevision.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1.BackupPlanRevision.State[message.state]:message.state;if(message.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot"))object.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlanSnapshot,options);if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);return object};BackupPlanRevision.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupPlanRevision.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupPlanRevision"};BackupPlanRevision.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]="INACTIVE"]=4;return values}();return BackupPlanRevision}();v1.GetBackupPlanRevisionRequest=function(){function GetBackupPlanRevisionRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRevisionRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRevisionRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRevisionRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRevisionRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRevisionRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRevisionRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanRevisionRequest"};return GetBackupPlanRevisionRequest}();v1.ListBackupPlanRevisionsRequest=function(){function ListBackupPlanRevisionsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.pageSize=reader.int32();break}case 3:{message.pageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanRevisionsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanRevisionsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest;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);return message};ListBackupPlanRevisionsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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;return object};ListBackupPlanRevisionsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanRevisionsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest"};return ListBackupPlanRevisionsRequest}();v1.ListBackupPlanRevisionsResponse=function(){function ListBackupPlanRevisionsResponse(properties){this.backupPlanRevisions=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanRevisions&&message.backupPlanRevisions.length))message.backupPlanRevisions=[];message.backupPlanRevisions.push($root.google.cloud.backupdr.v1.BackupPlanRevision.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanRevisionsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanRevisions!=null&&message.hasOwnProperty("backupPlanRevisions")){if(!Array.isArray(message.backupPlanRevisions))return"backupPlanRevisions: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse;if(object.backupPlanRevisions){if(!Array.isArray(object.backupPlanRevisions))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse.backupPlanRevisions: array expected");message.backupPlanRevisions=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlanAssociation;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.resource=reader.string();break}case 4:{message.backupPlan=reader.string();break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.rulesConfigInfo&&message.rulesConfigInfo.length))message.rulesConfigInfo=[];message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.dataSource=reader.string();break}case 10:{message.cloudSqlInstanceBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 15:{message.alloydbClusterBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 11:{message.backupPlanRevisionId=reader.string();break}case 12:{message.backupPlanRevisionName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanAssociation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanAssociation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.resource!=null&&message.hasOwnProperty("resource"))if(!$util.isString(message.resource))return"resource: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))if(!$util.isString(message.backupPlan))return"backupPlan: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);if(error)return"updateTime."+error}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.rulesConfigInfo!=null&&message.hasOwnProperty("rulesConfigInfo")){if(!Array.isArray(message.rulesConfigInfo))return"rulesConfigInfo: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlanAssociation;if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.resource!=null)message.resource=String(object.resource);if(object.backupPlan!=null)message.backupPlan=String(object.backupPlan);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.updateTime!=null){if(typeof object.updateTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.updateTime: object expected");message.updateTime=$root.google.protobuf.Timestamp.fromObject(object.updateTime,long+1)}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"INACTIVE":case 4:message.state=4;break;case"UPDATING":case 5:message.state=5;break}if(object.rulesConfigInfo){if(!Array.isArray(object.rulesConfigInfo))throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected");message.rulesConfigInfo=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RuleConfigInfo;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 3:{message.lastBackupState=reader.int32();break}case 4:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RuleConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RuleConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";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.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);if(error)return"lastBackupError."+error}if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};RuleConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.RuleConfigInfo;if(object.ruleId!=null)message.ruleId=String(object.ruleId);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"PERMISSION_DENIED":case 2:message.lastBackupState=2;break;case"SUCCEEDED":case 3:message.lastBackupState=3;break;case"FAILED":case 4:message.lastBackupState=4;break}if(object.lastBackupError!=null){if(typeof object.lastBackupError!=="object")throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected");message.lastBackupError=$root.google.rpc.Status.fromObject(object.lastBackupError,long+1)}if(object.lastSuccessfulBackupConsistencyTime!=null){if(typeof object.lastSuccessfulBackupConsistencyTime!=="object")throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};RuleConfigInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastBackupState=options.enums===String?"LAST_BACKUP_STATE_UNSPECIFIED":0;object.lastBackupError=null;object.lastSuccessfulBackupConsistencyTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastBackupState!=null&&message.hasOwnProperty("lastBackupState"))object.lastBackupState=options.enums===String?$root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState]===undefined?message.lastBackupState:$root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState]:message.lastBackupState;if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError"))object.lastBackupError=$root.google.rpc.Status.toObject(message.lastBackupError,options);if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime"))object.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime,options);return object};RuleConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RuleConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RuleConfigInfo"};RuleConfigInfo.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]="PERMISSION_DENIED"]=2;values[valuesById[3]="SUCCEEDED"]=3;values[valuesById[4]="FAILED"]=4;return values}();return RuleConfigInfo}();v1.CreateBackupPlanAssociationRequest=function(){function CreateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanAssociationId=reader.string();break}case 3:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))if(!$util.isString(message.backupPlanAssociationId))return"backupPlanAssociationId: string expected";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanAssociationId!=null)message.backupPlanAssociationId=String(object.backupPlanAssociationId);if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanAssociationId="";object.backupPlanAssociation=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))object.backupPlanAssociationId=message.backupPlanAssociationId;if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"};return CreateBackupPlanAssociationRequest}();v1.ListBackupPlanAssociationsRequest=function(){function ListBackupPlanAssociationsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanAssociationsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanAssociationsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest;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);return message};ListBackupPlanAssociationsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken="";object.filter=""}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;return object};ListBackupPlanAssociationsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanAssociationsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"};return ListBackupPlanAssociationsRequest}();v1.ListBackupPlanAssociationsResponse=function(){function ListBackupPlanAssociationsResponse(properties){this.backupPlanAssociations=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanAssociationsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchBackupPlanAssociationsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest;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);return message};FetchBackupPlanAssociationsForResourceTypeRequest.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=""}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;return object};FetchBackupPlanAssociationsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupPlanAssociationsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest"};return FetchBackupPlanAssociationsForResourceTypeRequest}();v1.FetchBackupPlanAssociationsForResourceTypeResponse=function(){function FetchBackupPlanAssociationsForResourceTypeResponse(properties){this.backupPlanAssociations=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"};return GetBackupPlanAssociationRequest}();v1.DeleteBackupPlanAssociationRequest=function(){function DeleteBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupPlanAssociationRequest.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;return object};DeleteBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"};return DeleteBackupPlanAssociationRequest}();v1.UpdateBackupPlanAssociationRequest=function(){function UpdateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest;if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlanAssociation=null;object.updateMask=null;object.requestId=""}if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest"};return UpdateBackupPlanAssociationRequest}();v1.TriggerBackupRequest=function(){function TriggerBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.TriggerBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.ruleId=reader.string();break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};TriggerBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TriggerBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};TriggerBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.TriggerBackupRequest;if(object.name!=null)message.name=String(object.name);if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.requestId!=null)message.requestId=String(object.requestId);return message};TriggerBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.ruleId="";object.requestId=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};TriggerBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TriggerBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.TriggerBackupRequest"};return TriggerBackupRequest}();v1.AlloyDBClusterDataSourceProperties=function(){function AlloyDBClusterDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};AlloyDBClusterDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties;if(object.name!=null)message.name=String(object.name);return message};AlloyDBClusterDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};AlloyDBClusterDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties"};return AlloyDBClusterDataSourceProperties}();v1.AlloyDbClusterBackupProperties=function(){function AlloyDbClusterBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.storedBytes=reader.int64();break}case 3:{message.chainId=reader.string();break}case 4:{message.databaseVersion=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDbClusterBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDbClusterBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};AlloyDbClusterBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};AlloyDbClusterBackupProperties.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"}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};AlloyDbClusterBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDbClusterBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDbClusterBackupProperties"};return AlloyDbClusterBackupProperties}();v1.AlloyDBClusterBackupPlanAssociationProperties=function(){function AlloyDBClusterBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.clusterUid=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))if(!$util.isString(message.clusterUid))return"clusterUid: string expected";return null};AlloyDBClusterBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties;if(object.clusterUid!=null)message.clusterUid=String(object.clusterUid);return message};AlloyDBClusterBackupPlanAssociationProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.clusterUid="";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))object.clusterUid=message.clusterUid;return object};AlloyDBClusterBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties"};return AlloyDBClusterBackupPlanAssociationProperties}();v1.CloudSqlInstanceDataSourceProperties=function(){function CloudSqlInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};CloudSqlInstanceDataSourceProperties.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};CloudSqlInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties"};return CloudSqlInstanceDataSourceProperties}();v1.CloudSqlInstanceBackupProperties=function(){function CloudSqlInstanceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties;while(reader.pos>>3){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(),undefined,long+1);break}case 6:{message.instanceTier=reader.string();break}case 8:{message.instanceDeleteTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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,long+1);if(error)return"instanceDeleteTime."+error}return null};CloudSqlInstanceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}return message};CloudSqlInstanceBackupProperties.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(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};CloudSqlInstanceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties"};return CloudSqlInstanceBackupProperties}();v1.CloudSqlInstanceDataSourceReferenceProperties=function(){function CloudSqlInstanceDataSourceReferenceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceReferenceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceReferenceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceReferenceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};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};CloudSqlInstanceDataSourceReferenceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceReferenceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties"};return CloudSqlInstanceDataSourceReferenceProperties}();v1.CloudSqlInstanceInitializationConfig=function(){function CloudSqlInstanceInitializationConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig;while(reader.pos>>3){case 1:{message.edition=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceInitializationConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceInitializationConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 1:case 2:break}return null};CloudSqlInstanceInitializationConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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}return message};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};CloudSqlInstanceInitializationConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceInitializationConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig"};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(){function CloudSqlInstanceBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.instanceCreateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.instanceCreateTime!=null&&message.hasOwnProperty("instanceCreateTime")){var error=$root.google.protobuf.Timestamp.verify(message.instanceCreateTime,long+1);if(error)return"instanceCreateTime."+error}return null};CloudSqlInstanceBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};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};CloudSqlInstanceBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties"};return CloudSqlInstanceBackupPlanAssociationProperties}();v1.BackupVault=function(){function BackupVault(properties){this.labels={};this.annotations={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupVault,key,value;while(reader.pos>>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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.backupMinimumEnforcedRetentionDuration=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.annotations,key);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(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupVault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupVault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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>>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>>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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig;while(reader.pos>>3){case 1:{message.kmsKeyName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};EncryptionConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EncryptionConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){properties._kmsKeyName=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}return null};EncryptionConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig;if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);return message};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};EncryptionConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};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(){function DataSource(properties){this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSource,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 21:{message.state=reader.int32();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);break}case 26:{message.dataSourceGcpResource=$root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.dataSourceBackupApplianceApplication=$root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.backupBlockedByVaultAccessRestriction=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DataSource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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.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>>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,long+1)}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,long+1)}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,long+1)}if(object.backupBlockedByVaultAccessRestriction!=null)message.backupBlockedByVaultAccessRestriction=Boolean(object.backupBlockedByVaultAccessRestriction);return message};DataSource.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.objects||options.defaults)object.labels={};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(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>>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};DataSource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSource"};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.BackupConfigInfo=function(){function BackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupConfigInfo;while(reader.pos>>3){case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.gcpBackupConfig=$root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.backupApplianceBackupConfig=$root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);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,long+1);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,long+1);if(error)return"backupApplianceBackupConfig."+error}}return null};BackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};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};BackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupConfigInfo"};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.GcpBackupConfig=function(){function GcpBackupConfig(properties){this.backupPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GcpBackupConfig;while(reader.pos>>3){case 1:{message.backupPlan=reader.string();break}case 2:{message.backupPlanDescription=reader.string();break}case 3:{message.backupPlanAssociation=reader.string();break}case 4:{if(!(message.backupPlanRules&&message.backupPlanRules.length))message.backupPlanRules=[];message.backupPlanRules.push(reader.string());break}case 5:{message.backupPlanRevisionName=reader.string();break}case 6:{message.backupPlanRevisionId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig;while(reader.pos>>3){case 1:{message.backupApplianceName=reader.string();break}case 2:{message.backupApplianceId=reader.int64();break}case 3:{message.slaId=reader.int64();break}case 4:{message.applicationName=reader.string();break}case 5:{message.hostName=reader.string();break}case 6:{message.sltName=reader.string();break}case 7:{message.slpName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};BackupApplianceBackupConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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=""}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};BackupApplianceBackupConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceBackupConfig"};return BackupApplianceBackupConfig}();v1.DataSourceGcpResource=function(){function DataSourceGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceGcpResource;while(reader.pos>>3){case 1:{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(),undefined,long+1);break}case 5:{message.cloudSqlInstanceDatasourceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.alloyDbClusterDatasourceProperties=$root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskDatasourceProperties=$root.google.cloud.backupdr.v1.DiskDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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,long+1);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,long+1);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,long+1);if(error)return"diskDatasourceProperties."+error}}return null};DataSourceGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};DataSourceGcpResource.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;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};DataSourceGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceGcpResource"};return DataSourceGcpResource}();v1.DataSourceBackupApplianceApplication=function(){function DataSourceBackupApplianceApplication(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication;while(reader.pos>>3){case 1:{message.applicationName=reader.string();break}case 2:{message.backupAppliance=reader.string();break}case 3:{message.applianceId=reader.int64();break}case 4:{message.type=reader.string();break}case 8:{message.applicationId=reader.int64();break}case 6:{message.hostname=reader.string();break}case 7:{message.hostId=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupApplianceApplication.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupApplianceApplication.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DataSourceBackupApplianceApplication.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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)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)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};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.applianceId=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else 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.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;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;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};DataSourceBackupApplianceApplication.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupApplianceApplication.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"};return DataSourceBackupApplianceApplication}();v1.ServiceLockInfo=function(){function ServiceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ServiceLockInfo;while(reader.pos>>3){case 1:{message.operation=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ServiceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.operation!=null&&message.hasOwnProperty("operation"))if(!$util.isString(message.operation))return"operation: string expected";return null};ServiceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ServiceLockInfo;if(object.operation!=null)message.operation=String(object.operation);return message};ServiceLockInfo.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};ServiceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ServiceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ServiceLockInfo"};return ServiceLockInfo}();v1.BackupApplianceLockInfo=function(){function BackupApplianceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo;while(reader.pos>>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,long);break}}return message};BackupApplianceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};BackupApplianceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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};BackupApplianceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceLockInfo"};return BackupApplianceLockInfo}();v1.BackupLock=function(){function BackupLock(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupLock;while(reader.pos>>3){case 1:{message.lockUntilTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.backupApplianceLockInfo=$root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.serviceLockInfo=$root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupLock.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLock.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.lockUntilTime!=null&&message.hasOwnProperty("lockUntilTime")){var error=$root.google.protobuf.Timestamp.verify(message.lockUntilTime,long+1);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,long+1);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,long+1);if(error)return"serviceLockInfo."+error}}return null};BackupLock.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupLock)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}return message};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"}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 object};BackupLock.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLock.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupLock"};return BackupLock}();v1.Backup=function(){function Backup(properties){this.labels={};this.serviceLocks=[];this.backupApplianceLocks=[];this.kmsKeyVersions=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Backup,key,value;while(reader.pos>>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(),undefined,long+1);break}case 4:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 6:{message.enforcedRetentionEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 30:{message.backupRetentionInheritance=reader.int32();break}case 7:{message.expireTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{message.consistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1));break}case 18:{if(!(message.backupApplianceLocks&&message.backupApplianceLocks.length))message.backupApplianceLocks=[];message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader,reader.uint32(),undefined,long+1));break}case 19:{message.computeInstanceBackupProperties=$root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 26:{message.cloudSqlInstanceBackupProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 21:{message.backupApplianceBackupProperties=$root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.alloyDbBackupProperties=$root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.diskBackupProperties=$root.google.cloud.backupdr.v1.DiskBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.backupType=reader.int32();break}case 22:{message.gcpBackupPlanInfo=$root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);break}case 33:{if(!(message.kmsKeyVersions&&message.kmsKeyVersions.length))message.kmsKeyVersions=[];message.kmsKeyVersions.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Backup.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Backup.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"createTime."+error}}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){properties._updateTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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>>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,long+1)}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>>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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo;while(reader.pos>>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,long);break}}return message};GCPBackupPlanInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GCPBackupPlanInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GCPBackupPlanInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GCPBackupPlanInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan="";object.backupPlanRuleId="";object.backupPlanRevisionName="";object.backupPlanRevisionId=""}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};GCPBackupPlanInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GCPBackupPlanInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"};return GCPBackupPlanInfo}();return Backup}();v1.CreateBackupVaultRequest=function(){function CreateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest;while(reader.pos>>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(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}case 5:{message.validateOnly=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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};CreateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.validateOnly!=null)message.validateOnly=Boolean(object.validateOnly);return message};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.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};CreateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupVaultRequest"};return CreateBackupVaultRequest}();v1.ListBackupVaultsRequest=function(){function ListBackupVaultsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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};ListBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupVaultsRequest"};return ListBackupVaultsRequest}();v1.ListBackupVaultsResponse=function(){function ListBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};FetchUsableBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};FetchUsableBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest;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};FetchUsableBackupVaultsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};FetchUsableBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchUsableBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"};return FetchUsableBackupVaultsRequest}();v1.FetchUsableBackupVaultsResponse=function(){function FetchUsableBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};FetchUsableBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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:return"view: enum value expected";case 0:case 1:case 2:break}return null};FetchBackupsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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"){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};FetchBackupsForResourceTypeRequest.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"))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};FetchBackupsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest"};return FetchBackupsForResourceTypeRequest}();v1.FetchBackupsForResourceTypeResponse=function(){function FetchBackupsForResourceTypeResponse(properties){this.backups=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GetBackupVaultRequest.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}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;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};GetBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupVaultRequest"};return GetBackupVaultRequest}();v1.UpdateBackupVaultRequest=function(){function UpdateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backupVault=$root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1);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();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backupVault!=null&&message.hasOwnProperty("backupVault")){var error=$root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault,long+1);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};UpdateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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};UpdateBackupVaultRequest.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(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};UpdateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupVaultRequest"};return UpdateBackupVaultRequest}();v1.DeleteBackupVaultRequest=function(){function DeleteBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();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();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};DeleteBackupVaultRequest.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}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};DeleteBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupVaultRequest"};return DeleteBackupVaultRequest}();v1.ListDataSourcesRequest=function(){function ListDataSourcesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourcesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourcesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourcesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};ListDataSourcesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourcesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourcesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListDataSourcesRequest"};return ListDataSourcesRequest}();v1.ListDataSourcesResponse=function(){function ListDataSourcesResponse(properties){this.dataSources=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourcesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSources&&message.dataSources.length))message.dataSources=[];message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourcesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSources!=null&&message.hasOwnProperty("dataSources")){if(!Array.isArray(message.dataSources))return"dataSources: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetDataSourceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetDataSourceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetDataSourceRequest"};return GetDataSourceRequest}();v1.UpdateDataSourceRequest=function(){function UpdateDataSourceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.dataSource=$root.google.cloud.backupdr.v1.DataSource.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}case 4:{message.allowMissing=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};UpdateDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.dataSource!=null&&message.hasOwnProperty("dataSource")){var error=$root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource,long+1);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};UpdateDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.allowMissing!=null)message.allowMissing=Boolean(object.allowMissing);return message};UpdateDataSourceRequest.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(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};UpdateDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateDataSourceRequest"};return UpdateDataSourceRequest}();v1.ListBackupsRequest=function(){function ListBackupsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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}return message};ListBackupsRequest.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;return object};ListBackupsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupsRequest"};return ListBackupsRequest}();v1.ListBackupsResponse=function(){function ListBackupsResponse(properties){this.backups=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupsResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupRequest;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_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};GetBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.view=options.enums===String?"BACKUP_VIEW_UNSPECIFIED":0}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;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};GetBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupRequest"};return GetBackupRequest}();v1.UpdateBackupRequest=function(){function UpdateBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backup=$root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backup!=null&&message.hasOwnProperty("backup")){var error=$root.google.cloud.backupdr.v1.Backup.verify(message.backup,long+1);if(error)return"backup."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};UpdateBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupRequest"};return UpdateBackupRequest}();v1.DeleteBackupRequest=function(){function DeleteBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};DeleteBackupRequest.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;return object};DeleteBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupRequest"};return DeleteBackupRequest}();v1.RestoreBackupRequest=function(){function RestoreBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RestoreBackupRequest;while(reader.pos>>3){case 1:{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(),undefined,long+1);break}case 5:{message.diskTargetEnvironment=$root.google.cloud.backupdr.v1.DiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.regionDiskTargetEnvironment=$root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.computeInstanceRestoreProperties=$root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskRestoreProperties=$root.google.cloud.backupdr.v1.DiskRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.clearOverridesFieldMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment,long+1);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,long+1);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,long+1);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,long+1);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,long+1);if(error)return"diskRestoreProperties."+error}}if(message.clearOverridesFieldMask!=null&&message.hasOwnProperty("clearOverridesFieldMask")){properties._clearOverridesFieldMask=1;{var error=$root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask,long+1);if(error)return"clearOverridesFieldMask."+error}}return null};RestoreBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};RestoreBackupRequest.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"}return object};RestoreBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RestoreBackupRequest"};return RestoreBackupRequest}();v1.RestoreBackupResponse=function(){function RestoreBackupResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RestoreBackupResponse;while(reader.pos>>3){case 1:{message.targetResource=$root.google.cloud.backupdr.v1.TargetResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.targetResource!=null&&message.hasOwnProperty("targetResource")){var error=$root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource,long+1);if(error)return"targetResource."+error}return null};RestoreBackupResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};RestoreBackupResponse.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);return object};RestoreBackupResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RestoreBackupResponse"};return RestoreBackupResponse}();v1.TargetResource=function(){function TargetResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.TargetResource;while(reader.pos>>3){case 1:{message.gcpResource=$root.google.cloud.backupdr.v1.GcpResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};TargetResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TargetResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpResource!=null&&message.hasOwnProperty("gcpResource")){properties.targetResourceInfo=1;{var error=$root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource,long+1);if(error)return"gcpResource."+error}}return null};TargetResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.TargetResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};TargetResource.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.oneofs)object.targetResourceInfo="gcpResource"}return object};TargetResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TargetResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.TargetResource"};return TargetResource}();v1.GcpResource=function(){function GcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GcpResource.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;return object};GcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GcpResource"};return GcpResource}();v1.BackupGcpResource=function(){function BackupGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupGcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};BackupGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};BackupGcpResource.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;return object};BackupGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupGcpResource"};return BackupGcpResource}();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}();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}();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(){function BackupApplianceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties;while(reader.pos>>3){case 1:{message.generationId=reader.int32();break}case 2:{message.finalizeTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){properties._generationId=1;if(!$util.isInteger(message.generationId))return"generationId: integer expected"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){properties._finalizeTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.finalizeTime,long+1);if(error)return"finalizeTime."+error}}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){properties._recoveryRangeStartTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime,long+1);if(error)return"recoveryRangeStartTime."+error}}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){properties._recoveryRangeEndTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime,long+1);if(error)return"recoveryRangeEndTime."+error}}return null};BackupApplianceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties;if(object.generationId!=null)message.generationId=object.generationId|0;if(object.finalizeTime!=null){if(typeof object.finalizeTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected");message.finalizeTime=$root.google.protobuf.Timestamp.fromObject(object.finalizeTime,long+1)}if(object.recoveryRangeStartTime!=null){if(typeof object.recoveryRangeStartTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected");message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime,long+1)}if(object.recoveryRangeEndTime!=null){if(typeof object.recoveryRangeEndTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected");message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime,long+1)}return message};BackupApplianceBackupProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){object.generationId=message.generationId;if(options.oneofs)object._generationId="generationId"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){object.finalizeTime=$root.google.protobuf.Timestamp.toObject(message.finalizeTime,options);if(options.oneofs)object._finalizeTime="finalizeTime"}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){object.recoveryRangeStartTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime,options);if(options.oneofs)object._recoveryRangeStartTime="recoveryRangeStartTime"}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){object.recoveryRangeEndTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime,options);if(options.oneofs)object._recoveryRangeEndTime="recoveryRangeEndTime"}return object};BackupApplianceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceBackupProperties"};return BackupApplianceBackupProperties}();v1.DiskTargetEnvironment=function(){function DiskTargetEnvironment(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";return null};DiskTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DiskTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);return message};DiskTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;return object};DiskTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DiskTargetEnvironment"};return DiskTargetEnvironment}();v1.RegionDiskTargetEnvironment=function(){function RegionDiskTargetEnvironment(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.region=reader.string();break}case 3:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};RegionDiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RegionDiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.region!=null&&message.hasOwnProperty("region"))if(!$util.isString(message.region))return"region: string expected";if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.region!=null)message.region=String(object.region);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.RegionDiskTargetEnvironment.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskRestoreProperties,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.sizeGb=reader.int64();break}case 4:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 5:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.physicalBlockSizeBytes=reader.int64();break}case 8:{message.provisionedIops=reader.int64();break}case 9:{message.provisionedThroughput=reader.int64();break}case 10:{message.enableConfidentialCompute=reader.bool();break}case 11:{message.storagePool=reader.string();break}case 12:{message.accessMode=reader.int32();break}case 14:{message.architecture=reader.int32();break}case 15:{if(!(message.resourcePolicy&&message.resourcePolicy.length))message.resourcePolicy=[];message.resourcePolicy.push(reader.string());break}case 16:{message.type=reader.string();break}case 17:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 18:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};DiskRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;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.sizeGb!=null&&message.hasOwnProperty("sizeGb")){properties._sizeGb=1;if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskRestoreProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1.DiskRestoreProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.physicalBlockSizeBytes.high>>>0).toNumber();if(object.provisionedIops!=null)if($util.Long)(message.provisionedIops=$util.Long.fromValue(object.provisionedIops)).unsigned=false;else if(typeof object.provisionedIops==="string")message.provisionedIops=parseInt(object.provisionedIops,10);else if(typeof object.provisionedIops==="number")message.provisionedIops=object.provisionedIops;else if(typeof object.provisionedIops==="object")message.provisionedIops=new $util.LongBits(object.provisionedIops.low>>>0,object.provisionedIops.high>>>0).toNumber();if(object.provisionedThroughput!=null)if($util.Long)(message.provisionedThroughput=$util.Long.fromValue(object.provisionedThroughput)).unsigned=false;else if(typeof object.provisionedThroughput==="string")message.provisionedThroughput=parseInt(object.provisionedThroughput,10);else if(typeof object.provisionedThroughput==="number")message.provisionedThroughput=object.provisionedThroughput;else if(typeof object.provisionedThroughput==="object")message.provisionedThroughput=new $util.LongBits(object.provisionedThroughput.low>>>0,object.provisionedThroughput.high>>>0).toNumber();if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);if(object.storagePool!=null)message.storagePool=String(object.storagePool);switch(object.accessMode){default:if(typeof object.accessMode==="number"){message.accessMode=object.accessMode;break}break;case"READ_WRITE_SINGLE":case 0:message.accessMode=0;break;case"READ_WRITE_MANY":case 1:message.accessMode=1;break;case"READ_ONLY_MANY":case 2:message.accessMode=2;break}switch(object.architecture){default:if(typeof object.architecture==="number"){message.architecture=object.architecture;break}break;case"ARCHITECTURE_UNSPECIFIED":case 0:message.architecture=0;break;case"X86_64":case 1:message.architecture=1;break;case"ARM64":case 2:message.architecture=2;break}if(object.resourcePolicy){if(!Array.isArray(object.resourcePolicy))throw TypeError(".google.cloud.backupdr.v1.DiskRestoreProperties.resourcePolicy: array expected");message.resourcePolicy=[];for(var i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.licenses&&message.licenses.length){object.licenses=[];for(var j=0;j>>0,message.physicalBlockSizeBytes.high>>>0).toNumber():message.physicalBlockSizeBytes;if(options.oneofs)object._physicalBlockSizeBytes="physicalBlockSizeBytes"}if(message.provisionedIops!=null&&message.hasOwnProperty("provisionedIops")){if(typeof message.provisionedIops==="number")object.provisionedIops=options.longs===String?String(message.provisionedIops):message.provisionedIops;else object.provisionedIops=options.longs===String?$util.Long.prototype.toString.call(message.provisionedIops):options.longs===Number?new $util.LongBits(message.provisionedIops.low>>>0,message.provisionedIops.high>>>0).toNumber():message.provisionedIops;if(options.oneofs)object._provisionedIops="provisionedIops"}if(message.provisionedThroughput!=null&&message.hasOwnProperty("provisionedThroughput")){if(typeof message.provisionedThroughput==="number")object.provisionedThroughput=options.longs===String?String(message.provisionedThroughput):message.provisionedThroughput;else object.provisionedThroughput=options.longs===String?$util.Long.prototype.toString.call(message.provisionedThroughput):options.longs===Number?new $util.LongBits(message.provisionedThroughput.low>>>0,message.provisionedThroughput.high>>>0).toNumber():message.provisionedThroughput;if(options.oneofs)object._provisionedThroughput="provisionedThroughput"}if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}if(message.storagePool!=null&&message.hasOwnProperty("storagePool")){object.storagePool=message.storagePool;if(options.oneofs)object._storagePool="storagePool"}if(message.accessMode!=null&&message.hasOwnProperty("accessMode")){object.accessMode=options.enums===String?$root.google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode[message.accessMode]===undefined?message.accessMode:$root.google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode[message.accessMode]:message.accessMode;if(options.oneofs)object._accessMode="accessMode"}if(message.architecture!=null&&message.hasOwnProperty("architecture")){object.architecture=options.enums===String?$root.google.cloud.backupdr.v1.DiskRestoreProperties.Architecture[message.architecture]===undefined?message.architecture:$root.google.cloud.backupdr.v1.DiskRestoreProperties.Architecture[message.architecture]:message.architecture;if(options.oneofs)object._architecture="architecture"}if(message.resourcePolicy&&message.resourcePolicy.length){object.resourcePolicy=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskBackupProperties;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 3:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.architecture=reader.int32();break}case 5:{message.type=reader.string();break}case 6:{message.sizeGb=reader.int64();break}case 7:{message.region=reader.string();break}case 8:{message.zone=reader.string();break}case 9:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}case 10:{message.sourceDisk=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DiskBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1.DiskBackupProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.sizeGb.high>>>0).toNumber();if(object.region!=null)message.region=String(object.region);if(object.zone!=null)message.zone=String(object.zone);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.DiskBackupProperties.replicaZones: array expected");message.replicaZones=[];for(var i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.region!=null&&message.hasOwnProperty("region")){object.region=message.region;if(options.oneofs)object._region="region"}if(message.zone!=null&&message.hasOwnProperty("zone")){object.zone=message.zone;if(options.oneofs)object._zone="zone"}if(message.replicaZones&&message.replicaZones.length){object.replicaZones=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.type=reader.string();break}case 4:{message.sizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DiskDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected";return null};DiskDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DiskDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.type!=null)message.type=String(object.type);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();return message};DiskDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.type="";if($util.Long){var long=new $util.Long(0,0,false);object.sizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.sizeGb=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(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(typeof message.sizeGb==="number")object.sizeGb=options.longs===String?String(message.sizeGb):message.sizeGb;else object.sizeGb=options.longs===String?$util.Long.prototype.toString.call(message.sizeGb):options.longs===Number?new $util.LongBits(message.sizeGb.low>>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;return object};DiskDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DiskDataSourceProperties"};return DiskDataSourceProperties}();v1.ComputeInstanceBackupProperties=function(){function ComputeInstanceBackupProperties(properties){this.networkInterface=[];this.disk=[];this.serviceAccount=[];this.guestAccelerator=[];this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties,key,value;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.tags=$root.google.cloud.backupdr.v1.Tags.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.machineType=reader.string();break}case 4:{message.canIpForward=reader.bool();break}case 5:{if(!(message.networkInterface&&message.networkInterface.length))message.networkInterface=[];message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{if(!(message.disk&&message.disk.length))message.disk=[];message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.metadata=$root.google.cloud.backupdr.v1.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{if(!(message.serviceAccount&&message.serviceAccount.length))message.serviceAccount=[];message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.scheduling=$root.google.cloud.backupdr.v1.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 10:{if(!(message.guestAccelerator&&message.guestAccelerator.length))message.guestAccelerator=[];message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 11:{message.minCpuPlatform=reader.string();break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{message.sourceInstance=reader.string();break}case 14:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.tags!=null&&message.hasOwnProperty("tags")){properties._tags=1;{var error=$root.google.cloud.backupdr.v1.Tags.verify(message.tags,long+1);if(error)return"tags."+error}}if(message.machineType!=null&&message.hasOwnProperty("machineType")){properties._machineType=1;if(!$util.isString(message.machineType))return"machineType: string expected"}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.networkInterface!=null&&message.hasOwnProperty("networkInterface")){if(!Array.isArray(message.networkInterface))return"networkInterface: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.tags!=null){if(typeof object.tags!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected");message.tags=$root.google.cloud.backupdr.v1.Tags.fromObject(object.tags,long+1)}if(object.machineType!=null)message.machineType=String(object.machineType);if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.networkInterface){if(!Array.isArray(object.networkInterface))throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected");message.networkInterface=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.advancedMachineFeatures=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.canIpForward=reader.bool();break}case 4:{message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.deletionProtection=reader.bool();break}case 6:{message.description=reader.string();break}case 7:{if(!(message.disks&&message.disks.length))message.disks=[];message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.displayDevice=$root.google.cloud.backupdr.v1.DisplayDevice.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{if(!(message.guestAccelerators&&message.guestAccelerators.length))message.guestAccelerators=[];message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.hostname=reader.string();break}case 11:{message.instanceEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 14:{message.machineType=reader.string();break}case 15:{message.metadata=$root.google.cloud.backupdr.v1.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.minCpuPlatform=reader.string();break}case 17:{if(!(message.networkInterfaces&&message.networkInterfaces.length))message.networkInterfaces=[];message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 18:{message.networkPerformanceConfig=$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 19:{message.params=$root.google.cloud.backupdr.v1.InstanceParams.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.privateIpv6GoogleAccess=reader.int32();break}case 21:{message.allocationAffinity=$root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{if(!(message.resourcePolicies&&message.resourcePolicies.length))message.resourcePolicies=[];message.resourcePolicies.push(reader.string());break}case 23:{message.scheduling=$root.google.cloud.backupdr.v1.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 24:{if(!(message.serviceAccounts&&message.serviceAccounts.length))message.serviceAccounts=[];message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 26:{message.tags=$root.google.cloud.backupdr.v1.Tags.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.advancedMachineFeatures!=null&&message.hasOwnProperty("advancedMachineFeatures")){properties._advancedMachineFeatures=1;{var error=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures,long+1);if(error)return"advancedMachineFeatures."+error}}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.confidentialInstanceConfig!=null&&message.hasOwnProperty("confidentialInstanceConfig")){properties._confidentialInstanceConfig=1;{var error=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig,long+1);if(error)return"confidentialInstanceConfig."+error}}if(message.deletionProtection!=null&&message.hasOwnProperty("deletionProtection")){properties._deletionProtection=1;if(typeof message.deletionProtection!=="boolean")return"deletionProtection: boolean expected"}if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.disks!=null&&message.hasOwnProperty("disks")){if(!Array.isArray(message.disks))return"disks: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties;if(object.name!=null)message.name=String(object.name);if(object.advancedMachineFeatures!=null){if(typeof object.advancedMachineFeatures!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected");message.advancedMachineFeatures=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures,long+1)}if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.confidentialInstanceConfig!=null){if(typeof object.confidentialInstanceConfig!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected");message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig,long+1)}if(object.deletionProtection!=null)message.deletionProtection=Boolean(object.deletionProtection);if(object.description!=null)message.description=String(object.description);if(object.disks){if(!Array.isArray(object.disks))throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected");message.disks=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";return null};ComputeInstanceTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);return message};ComputeInstanceTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;return object};ComputeInstanceTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"};return ComputeInstanceTargetEnvironment}();v1.ComputeInstanceDataSourceProperties=function(){function ComputeInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.machineType=reader.string();break}case 4:{message.totalDiskCount=reader.int64();break}case 5:{message.totalDiskSizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.machineType!=null&&message.hasOwnProperty("machineType"))if(!$util.isString(message.machineType))return"machineType: string expected";if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(!$util.isInteger(message.totalDiskCount)&&!(message.totalDiskCount&&$util.isInteger(message.totalDiskCount.low)&&$util.isInteger(message.totalDiskCount.high)))return"totalDiskCount: integer|Long expected";if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(!$util.isInteger(message.totalDiskSizeGb)&&!(message.totalDiskSizeGb&&$util.isInteger(message.totalDiskSizeGb.low)&&$util.isInteger(message.totalDiskSizeGb.high)))return"totalDiskSizeGb: integer|Long expected";return null};ComputeInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.machineType!=null)message.machineType=String(object.machineType);if(object.totalDiskCount!=null)if($util.Long)(message.totalDiskCount=$util.Long.fromValue(object.totalDiskCount)).unsigned=false;else if(typeof object.totalDiskCount==="string")message.totalDiskCount=parseInt(object.totalDiskCount,10);else if(typeof object.totalDiskCount==="number")message.totalDiskCount=object.totalDiskCount;else if(typeof object.totalDiskCount==="object")message.totalDiskCount=new $util.LongBits(object.totalDiskCount.low>>>0,object.totalDiskCount.high>>>0).toNumber();if(object.totalDiskSizeGb!=null)if($util.Long)(message.totalDiskSizeGb=$util.Long.fromValue(object.totalDiskSizeGb)).unsigned=false;else if(typeof object.totalDiskSizeGb==="string")message.totalDiskSizeGb=parseInt(object.totalDiskSizeGb,10);else if(typeof object.totalDiskSizeGb==="number")message.totalDiskSizeGb=object.totalDiskSizeGb;else if(typeof object.totalDiskSizeGb==="object")message.totalDiskSizeGb=new $util.LongBits(object.totalDiskSizeGb.low>>>0,object.totalDiskSizeGb.high>>>0).toNumber();return message};ComputeInstanceDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.machineType="";if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskSizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskSizeGb=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(message.machineType!=null&&message.hasOwnProperty("machineType"))object.machineType=message.machineType;if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(typeof message.totalDiskCount==="number")object.totalDiskCount=options.longs===String?String(message.totalDiskCount):message.totalDiskCount;else object.totalDiskCount=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskCount):options.longs===Number?new $util.LongBits(message.totalDiskCount.low>>>0,message.totalDiskCount.high>>>0).toNumber():message.totalDiskCount;if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(typeof message.totalDiskSizeGb==="number")object.totalDiskSizeGb=options.longs===String?String(message.totalDiskSizeGb):message.totalDiskSizeGb;else object.totalDiskSizeGb=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskSizeGb):options.longs===Number?new $util.LongBits(message.totalDiskSizeGb.low>>>0,message.totalDiskSizeGb.high>>>0).toNumber():message.totalDiskSizeGb;return object};ComputeInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"};return ComputeInstanceDataSourceProperties}();v1.AdvancedMachineFeatures=function(){function AdvancedMachineFeatures(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures;while(reader.pos>>3){case 1:{message.enableNestedVirtualization=reader.bool();break}case 2:{message.threadsPerCore=reader.int32();break}case 3:{message.visibleCoreCount=reader.int32();break}case 4:{message.enableUefiNetworking=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};AdvancedMachineFeatures.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AdvancedMachineFeatures.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){properties._enableNestedVirtualization=1;if(typeof message.enableNestedVirtualization!=="boolean")return"enableNestedVirtualization: boolean expected"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){properties._threadsPerCore=1;if(!$util.isInteger(message.threadsPerCore))return"threadsPerCore: integer expected"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){properties._visibleCoreCount=1;if(!$util.isInteger(message.visibleCoreCount))return"visibleCoreCount: integer expected"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){properties._enableUefiNetworking=1;if(typeof message.enableUefiNetworking!=="boolean")return"enableUefiNetworking: boolean expected"}return null};AdvancedMachineFeatures.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures;if(object.enableNestedVirtualization!=null)message.enableNestedVirtualization=Boolean(object.enableNestedVirtualization);if(object.threadsPerCore!=null)message.threadsPerCore=object.threadsPerCore|0;if(object.visibleCoreCount!=null)message.visibleCoreCount=object.visibleCoreCount|0;if(object.enableUefiNetworking!=null)message.enableUefiNetworking=Boolean(object.enableUefiNetworking);return message};AdvancedMachineFeatures.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){object.enableNestedVirtualization=message.enableNestedVirtualization;if(options.oneofs)object._enableNestedVirtualization="enableNestedVirtualization"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){object.threadsPerCore=message.threadsPerCore;if(options.oneofs)object._threadsPerCore="threadsPerCore"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){object.visibleCoreCount=message.visibleCoreCount;if(options.oneofs)object._visibleCoreCount="visibleCoreCount"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){object.enableUefiNetworking=message.enableUefiNetworking;if(options.oneofs)object._enableUefiNetworking="enableUefiNetworking"}return object};AdvancedMachineFeatures.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AdvancedMachineFeatures.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AdvancedMachineFeatures"};return AdvancedMachineFeatures}();v1.ConfidentialInstanceConfig=function(){function ConfidentialInstanceConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig;while(reader.pos>>3){case 1:{message.enableConfidentialCompute=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ConfidentialInstanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ConfidentialInstanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){properties._enableConfidentialCompute=1;if(typeof message.enableConfidentialCompute!=="boolean")return"enableConfidentialCompute: boolean expected"}return null};ConfidentialInstanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig;if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);return message};ConfidentialInstanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}return object};ConfidentialInstanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ConfidentialInstanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ConfidentialInstanceConfig"};return ConfidentialInstanceConfig}();v1.DisplayDevice=function(){function DisplayDevice(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DisplayDevice;while(reader.pos>>3){case 1:{message.enableDisplay=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DisplayDevice.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DisplayDevice.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){properties._enableDisplay=1;if(typeof message.enableDisplay!=="boolean")return"enableDisplay: boolean expected"}return null};DisplayDevice.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DisplayDevice)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DisplayDevice;if(object.enableDisplay!=null)message.enableDisplay=Boolean(object.enableDisplay);return message};DisplayDevice.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){object.enableDisplay=message.enableDisplay;if(options.oneofs)object._enableDisplay="enableDisplay"}return object};DisplayDevice.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DisplayDevice.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DisplayDevice"};return DisplayDevice}();v1.AcceleratorConfig=function(){function AcceleratorConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AcceleratorConfig;while(reader.pos>>3){case 1:{message.acceleratorType=reader.string();break}case 2:{message.acceleratorCount=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AcceleratorConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AcceleratorConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){properties._acceleratorType=1;if(!$util.isString(message.acceleratorType))return"acceleratorType: string expected"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){properties._acceleratorCount=1;if(!$util.isInteger(message.acceleratorCount))return"acceleratorCount: integer expected"}return null};AcceleratorConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AcceleratorConfig;if(object.acceleratorType!=null)message.acceleratorType=String(object.acceleratorType);if(object.acceleratorCount!=null)message.acceleratorCount=object.acceleratorCount|0;return message};AcceleratorConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){object.acceleratorType=message.acceleratorType;if(options.oneofs)object._acceleratorType="acceleratorType"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){object.acceleratorCount=message.acceleratorCount;if(options.oneofs)object._acceleratorCount="acceleratorCount"}return object};AcceleratorConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcceleratorConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AcceleratorConfig"};return AcceleratorConfig}();v1.CustomerEncryptionKey=function(){function CustomerEncryptionKey(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CustomerEncryptionKey;while(reader.pos>>3){case 1:{message.rawKey=reader.string();break}case 2:{message.rsaEncryptedKey=reader.string();break}case 3:{message.kmsKeyName=reader.string();break}case 4:{message.kmsKeyServiceAccount=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CustomerEncryptionKey.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CustomerEncryptionKey.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){properties.key=1;if(!$util.isString(message.rawKey))return"rawKey: string expected"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.rsaEncryptedKey))return"rsaEncryptedKey: string expected"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){properties._kmsKeyServiceAccount=1;if(!$util.isString(message.kmsKeyServiceAccount))return"kmsKeyServiceAccount: string expected"}return null};CustomerEncryptionKey.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CustomerEncryptionKey;if(object.rawKey!=null)message.rawKey=String(object.rawKey);if(object.rsaEncryptedKey!=null)message.rsaEncryptedKey=String(object.rsaEncryptedKey);if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);if(object.kmsKeyServiceAccount!=null)message.kmsKeyServiceAccount=String(object.kmsKeyServiceAccount);return message};CustomerEncryptionKey.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){object.rawKey=message.rawKey;if(options.oneofs)object.key="rawKey"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){object.rsaEncryptedKey=message.rsaEncryptedKey;if(options.oneofs)object.key="rsaEncryptedKey"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){object.kmsKeyName=message.kmsKeyName;if(options.oneofs)object.key="kmsKeyName"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){object.kmsKeyServiceAccount=message.kmsKeyServiceAccount;if(options.oneofs)object._kmsKeyServiceAccount="kmsKeyServiceAccount"}return object};CustomerEncryptionKey.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CustomerEncryptionKey.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CustomerEncryptionKey"};return CustomerEncryptionKey}();v1.Entry=function(){function Entry(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Entry;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};Entry.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Entry.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.value!=null&&message.hasOwnProperty("value")){properties._value=1;if(!$util.isString(message.value))return"value: string expected"}return null};Entry.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.Entry)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Entry;if(object.key!=null)message.key=String(object.key);if(object.value!=null)message.value=String(object.value);return message};Entry.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.key!=null&&message.hasOwnProperty("key")){object.key=message.key;if(options.oneofs)object._key="key"}if(message.value!=null&&message.hasOwnProperty("value")){object.value=message.value;if(options.oneofs)object._value="value"}return object};Entry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Entry.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.Entry"};return Entry}();v1.Metadata=function(){function Metadata(properties){this.items=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Metadata;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Metadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Metadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Metadata;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkInterface;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.subnetwork=reader.string();break}case 3:{message.ipAddress=reader.string();break}case 4:{message.ipv6Address=reader.string();break}case 5:{message.internalIpv6PrefixLength=reader.int32();break}case 6:{message.name=reader.string();break}case 7:{if(!(message.accessConfigs&&message.accessConfigs.length))message.accessConfigs=[];message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{if(!(message.ipv6AccessConfigs&&message.ipv6AccessConfigs.length))message.ipv6AccessConfigs=[];message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{if(!(message.aliasIpRanges&&message.aliasIpRanges.length))message.aliasIpRanges=[];message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.stackType=reader.int32();break}case 11:{message.ipv6AccessType=reader.int32();break}case 12:{message.queueCount=reader.int32();break}case 13:{message.nicType=reader.int32();break}case 14:{message.networkAttachment=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};NetworkInterface.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkInterface.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.network!=null&&message.hasOwnProperty("network")){properties._network=1;if(!$util.isString(message.network))return"network: string expected"}if(message.subnetwork!=null&&message.hasOwnProperty("subnetwork")){properties._subnetwork=1;if(!$util.isString(message.subnetwork))return"subnetwork: string expected"}if(message.ipAddress!=null&&message.hasOwnProperty("ipAddress")){properties._ipAddress=1;if(!$util.isString(message.ipAddress))return"ipAddress: string expected"}if(message.ipv6Address!=null&&message.hasOwnProperty("ipv6Address")){properties._ipv6Address=1;if(!$util.isString(message.ipv6Address))return"ipv6Address: string expected"}if(message.internalIpv6PrefixLength!=null&&message.hasOwnProperty("internalIpv6PrefixLength")){properties._internalIpv6PrefixLength=1;if(!$util.isInteger(message.internalIpv6PrefixLength))return"internalIpv6PrefixLength: integer expected"}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.accessConfigs!=null&&message.hasOwnProperty("accessConfigs")){if(!Array.isArray(message.accessConfigs))return"accessConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkInterface;if(object.network!=null)message.network=String(object.network);if(object.subnetwork!=null)message.subnetwork=String(object.subnetwork);if(object.ipAddress!=null)message.ipAddress=String(object.ipAddress);if(object.ipv6Address!=null)message.ipv6Address=String(object.ipv6Address);if(object.internalIpv6PrefixLength!=null)message.internalIpv6PrefixLength=object.internalIpv6PrefixLength|0;if(object.name!=null)message.name=String(object.name);if(object.accessConfigs){if(!Array.isArray(object.accessConfigs))throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected");message.accessConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig;while(reader.pos>>3){case 1:{message.totalEgressBandwidthTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkPerformanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkPerformanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){properties._totalEgressBandwidthTier=1;switch(message.totalEgressBandwidthTier){default:return"totalEgressBandwidthTier: enum value expected";case 0:case 1:case 2:break}}return null};NetworkPerformanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig;switch(object.totalEgressBandwidthTier){default:if(typeof object.totalEgressBandwidthTier==="number"){message.totalEgressBandwidthTier=object.totalEgressBandwidthTier;break}break;case"TIER_UNSPECIFIED":case 0:message.totalEgressBandwidthTier=0;break;case"DEFAULT":case 1:message.totalEgressBandwidthTier=1;break;case"TIER_1":case 2:message.totalEgressBandwidthTier=2;break}return message};NetworkPerformanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){object.totalEgressBandwidthTier=options.enums===String?$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]===undefined?message.totalEgressBandwidthTier:$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]:message.totalEgressBandwidthTier;if(options.oneofs)object._totalEgressBandwidthTier="totalEgressBandwidthTier"}return object};NetworkPerformanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkPerformanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.NetworkPerformanceConfig"};NetworkPerformanceConfig.Tier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TIER_UNSPECIFIED"]=0;values[valuesById[1]="DEFAULT"]=1;values[valuesById[2]="TIER_1"]=2;return values}();return NetworkPerformanceConfig}();v1.AccessConfig=function(){function AccessConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AccessConfig;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.name=reader.string();break}case 3:{message.externalIp=reader.string();break}case 4:{message.externalIpv6=reader.string();break}case 5:{message.externalIpv6PrefixLength=reader.int32();break}case 6:{message.setPublicPtr=reader.bool();break}case 7:{message.publicPtrDomainName=reader.string();break}case 8:{message.networkTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AccessConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AccessConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:break}}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){properties._externalIp=1;if(!$util.isString(message.externalIp))return"externalIp: string expected"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){properties._externalIpv6=1;if(!$util.isString(message.externalIpv6))return"externalIpv6: string expected"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){properties._externalIpv6PrefixLength=1;if(!$util.isInteger(message.externalIpv6PrefixLength))return"externalIpv6PrefixLength: integer expected"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){properties._setPublicPtr=1;if(typeof message.setPublicPtr!=="boolean")return"setPublicPtr: boolean expected"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){properties._publicPtrDomainName=1;if(!$util.isString(message.publicPtrDomainName))return"publicPtrDomainName: string expected"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){properties._networkTier=1;switch(message.networkTier){default:return"networkTier: enum value expected";case 0:case 1:case 2:break}}return null};AccessConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AccessConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AccessConfig;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"ACCESS_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ONE_TO_ONE_NAT":case 1:message.type=1;break;case"DIRECT_IPV6":case 2:message.type=2;break}if(object.name!=null)message.name=String(object.name);if(object.externalIp!=null)message.externalIp=String(object.externalIp);if(object.externalIpv6!=null)message.externalIpv6=String(object.externalIpv6);if(object.externalIpv6PrefixLength!=null)message.externalIpv6PrefixLength=object.externalIpv6PrefixLength|0;if(object.setPublicPtr!=null)message.setPublicPtr=Boolean(object.setPublicPtr);if(object.publicPtrDomainName!=null)message.publicPtrDomainName=String(object.publicPtrDomainName);switch(object.networkTier){default:if(typeof object.networkTier==="number"){message.networkTier=object.networkTier;break}break;case"NETWORK_TIER_UNSPECIFIED":case 0:message.networkTier=0;break;case"PREMIUM":case 1:message.networkTier=1;break;case"STANDARD":case 2:message.networkTier=2;break}return message};AccessConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type]:message.type;if(options.oneofs)object._type="type"}if(message.name!=null&&message.hasOwnProperty("name")){object.name=message.name;if(options.oneofs)object._name="name"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){object.externalIp=message.externalIp;if(options.oneofs)object._externalIp="externalIp"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){object.externalIpv6=message.externalIpv6;if(options.oneofs)object._externalIpv6="externalIpv6"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){object.externalIpv6PrefixLength=message.externalIpv6PrefixLength;if(options.oneofs)object._externalIpv6PrefixLength="externalIpv6PrefixLength"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){object.setPublicPtr=message.setPublicPtr;if(options.oneofs)object._setPublicPtr="setPublicPtr"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){object.publicPtrDomainName=message.publicPtrDomainName;if(options.oneofs)object._publicPtrDomainName="publicPtrDomainName"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){object.networkTier=options.enums===String?$root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier]===undefined?message.networkTier:$root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier]:message.networkTier;if(options.oneofs)object._networkTier="networkTier"}return object};AccessConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AccessConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AccessConfig"};AccessConfig.AccessType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ACCESS_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ONE_TO_ONE_NAT"]=1;values[valuesById[2]="DIRECT_IPV6"]=2;return values}();AccessConfig.NetworkTier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NETWORK_TIER_UNSPECIFIED"]=0;values[valuesById[1]="PREMIUM"]=1;values[valuesById[2]="STANDARD"]=2;return values}();return AccessConfig}();v1.AliasIpRange=function(){function AliasIpRange(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AliasIpRange;while(reader.pos>>3){case 1:{message.ipCidrRange=reader.string();break}case 2:{message.subnetworkRangeName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AliasIpRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AliasIpRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){properties._ipCidrRange=1;if(!$util.isString(message.ipCidrRange))return"ipCidrRange: string expected"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){properties._subnetworkRangeName=1;if(!$util.isString(message.subnetworkRangeName))return"subnetworkRangeName: string expected"}return null};AliasIpRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AliasIpRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AliasIpRange;if(object.ipCidrRange!=null)message.ipCidrRange=String(object.ipCidrRange);if(object.subnetworkRangeName!=null)message.subnetworkRangeName=String(object.subnetworkRangeName);return message};AliasIpRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){object.ipCidrRange=message.ipCidrRange;if(options.oneofs)object._ipCidrRange="ipCidrRange"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){object.subnetworkRangeName=message.subnetworkRangeName;if(options.oneofs)object._subnetworkRangeName="subnetworkRangeName"}return object};AliasIpRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AliasIpRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AliasIpRange"};return AliasIpRange}();v1.InstanceParams=function(){function InstanceParams(properties){this.resourceManagerTags={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InstanceParams,key,value;while(reader.pos>>3){case 1:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};InstanceParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InstanceParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceManagerTags!=null&&message.hasOwnProperty("resourceManagerTags")){if(!$util.isObject(message.resourceManagerTags))return"resourceManagerTags: object expected";var key=Object.keys(message.resourceManagerTags);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InstanceParams;if(object.resourceManagerTags){if(typeof object.resourceManagerTags!=="object")throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected");message.resourceManagerTags={};for(var keys=Object.keys(object.resourceManagerTags),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AllocationAffinity;while(reader.pos>>3){case 1:{message.consumeAllocationType=reader.int32();break}case 2:{message.key=reader.string();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};AllocationAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AllocationAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.consumeAllocationType!=null&&message.hasOwnProperty("consumeAllocationType")){properties._consumeAllocationType=1;switch(message.consumeAllocationType){default:return"consumeAllocationType: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AllocationAffinity;switch(object.consumeAllocationType){default:if(typeof object.consumeAllocationType==="number"){message.consumeAllocationType=object.consumeAllocationType;break}break;case"TYPE_UNSPECIFIED":case 0:message.consumeAllocationType=0;break;case"NO_RESERVATION":case 1:message.consumeAllocationType=1;break;case"ANY_RESERVATION":case 2:message.consumeAllocationType=2;break;case"SPECIFIC_RESERVATION":case 3:message.consumeAllocationType=3;break}if(object.key!=null)message.key=String(object.key);if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Scheduling;while(reader.pos>>3){case 1:{message.onHostMaintenance=reader.int32();break}case 2:{message.automaticRestart=reader.bool();break}case 3:{message.preemptible=reader.bool();break}case 4:{if(!(message.nodeAffinities&&message.nodeAffinities.length))message.nodeAffinities=[];message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{message.minNodeCpus=reader.int32();break}case 6:{message.provisioningModel=reader.int32();break}case 7:{message.instanceTerminationAction=reader.int32();break}case 10:{message.localSsdRecoveryTimeout=$root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};Scheduling.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Scheduling.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.onHostMaintenance!=null&&message.hasOwnProperty("onHostMaintenance")){properties._onHostMaintenance=1;switch(message.onHostMaintenance){default:return"onHostMaintenance: enum value expected";case 0:case 1:case 1e3:break}}if(message.automaticRestart!=null&&message.hasOwnProperty("automaticRestart")){properties._automaticRestart=1;if(typeof message.automaticRestart!=="boolean")return"automaticRestart: boolean expected"}if(message.preemptible!=null&&message.hasOwnProperty("preemptible")){properties._preemptible=1;if(typeof message.preemptible!=="boolean")return"preemptible: boolean expected"}if(message.nodeAffinities!=null&&message.hasOwnProperty("nodeAffinities")){if(!Array.isArray(message.nodeAffinities))return"nodeAffinities: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Scheduling;switch(object.onHostMaintenance){default:if(typeof object.onHostMaintenance==="number"){message.onHostMaintenance=object.onHostMaintenance;break}break;case"ON_HOST_MAINTENANCE_UNSPECIFIED":case 0:message.onHostMaintenance=0;break;case"TERMINATE":case 1:message.onHostMaintenance=1;break;case"MIGRATE":case 1e3:message.onHostMaintenance=1e3;break}if(object.automaticRestart!=null)message.automaticRestart=Boolean(object.automaticRestart);if(object.preemptible!=null)message.preemptible=Boolean(object.preemptible);if(object.nodeAffinities){if(!Array.isArray(object.nodeAffinities))throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected");message.nodeAffinities=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.operator=reader.int32();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};NodeAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NodeAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.operator!=null&&message.hasOwnProperty("operator")){properties._operator=1;switch(message.operator){default:return"operator: enum value expected";case 0:case 1:case 2:break}}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity;if(object.key!=null)message.key=String(object.key);switch(object.operator){default:if(typeof object.operator==="number"){message.operator=object.operator;break}break;case"OPERATOR_UNSPECIFIED":case 0:message.operator=0;break;case"IN":case 1:message.operator=1;break;case"NOT_IN":case 2:message.operator=2;break}if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.SchedulingDuration;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};SchedulingDuration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SchedulingDuration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){properties._seconds=1;if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){properties._nanos=1;if(!$util.isInteger(message.nanos))return"nanos: integer expected"}return null};SchedulingDuration.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.SchedulingDuration;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};SchedulingDuration.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(options.oneofs)object._seconds="seconds"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){object.nanos=message.nanos;if(options.oneofs)object._nanos="nanos"}return object};SchedulingDuration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SchedulingDuration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.SchedulingDuration"};return SchedulingDuration}();v1.ServiceAccount=function(){function ServiceAccount(properties){this.scopes=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ServiceAccount;while(reader.pos>>3){case 1:{message.email=reader.string();break}case 2:{if(!(message.scopes&&message.scopes.length))message.scopes=[];message.scopes.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};ServiceAccount.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceAccount.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.email!=null&&message.hasOwnProperty("email")){properties._email=1;if(!$util.isString(message.email))return"email: string expected"}if(message.scopes!=null&&message.hasOwnProperty("scopes")){if(!Array.isArray(message.scopes))return"scopes: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ServiceAccount;if(object.email!=null)message.email=String(object.email);if(object.scopes){if(!Array.isArray(object.scopes))throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected");message.scopes=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Tags;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Tags.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Tags.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Tags;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AttachedDisk;while(reader.pos>>3){case 1:{message.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.deviceName=reader.string();break}case 5:{message.kind=reader.string();break}case 6:{message.diskTypeDeprecated=reader.int32();break}case 7:{message.mode=reader.int32();break}case 8:{message.source=reader.string();break}case 9:{message.index=reader.int64();break}case 10:{message.boot=reader.bool();break}case 11:{message.autoDelete=reader.bool();break}case 12:{if(!(message.license&&message.license.length))message.license=[];message.license.push(reader.string());break}case 13:{message.diskInterface=reader.int32();break}case 14:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 15:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.diskSizeGb=reader.int64();break}case 17:{message.savedState=reader.int32();break}case 18:{message.diskType=reader.string();break}case 19:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AttachedDisk.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AttachedDisk.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){properties._initializeParams=1;{var error=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams,long+1);if(error)return"initializeParams."+error}}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){properties._deviceName=1;if(!$util.isString(message.deviceName))return"deviceName: string expected"}if(message.kind!=null&&message.hasOwnProperty("kind")){properties._kind=1;if(!$util.isString(message.kind))return"kind: string expected"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){properties._diskTypeDeprecated=1;switch(message.diskTypeDeprecated){default:return"diskTypeDeprecated: enum value expected";case 0:case 1:case 2:break}}if(message.mode!=null&&message.hasOwnProperty("mode")){properties._mode=1;switch(message.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.source!=null&&message.hasOwnProperty("source")){properties._source=1;if(!$util.isString(message.source))return"source: string expected"}if(message.index!=null&&message.hasOwnProperty("index")){properties._index=1;if(!$util.isInteger(message.index)&&!(message.index&&$util.isInteger(message.index.low)&&$util.isInteger(message.index.high)))return"index: integer|Long expected"}if(message.boot!=null&&message.hasOwnProperty("boot")){properties._boot=1;if(typeof message.boot!=="boolean")return"boot: boolean expected"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){properties._autoDelete=1;if(typeof message.autoDelete!=="boolean")return"autoDelete: boolean expected"}if(message.license!=null&&message.hasOwnProperty("license")){if(!Array.isArray(message.license))return"license: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AttachedDisk;if(object.initializeParams!=null){if(typeof object.initializeParams!=="object")throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected");message.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams,long+1)}if(object.deviceName!=null)message.deviceName=String(object.deviceName);if(object.kind!=null)message.kind=String(object.kind);switch(object.diskTypeDeprecated){default:if(typeof object.diskTypeDeprecated==="number"){message.diskTypeDeprecated=object.diskTypeDeprecated;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.diskTypeDeprecated=0;break;case"SCRATCH":case 1:message.diskTypeDeprecated=1;break;case"PERSISTENT":case 2:message.diskTypeDeprecated=2;break}switch(object.mode){default:if(typeof object.mode==="number"){message.mode=object.mode;break}break;case"DISK_MODE_UNSPECIFIED":case 0:message.mode=0;break;case"READ_WRITE":case 1:message.mode=1;break;case"READ_ONLY":case 2:message.mode=2;break;case"LOCKED":case 3:message.mode=3;break}if(object.source!=null)message.source=String(object.source);if(object.index!=null)if($util.Long)(message.index=$util.Long.fromValue(object.index)).unsigned=false;else if(typeof object.index==="string")message.index=parseInt(object.index,10);else if(typeof object.index==="number")message.index=object.index;else if(typeof object.index==="object")message.index=new $util.LongBits(object.index.low>>>0,object.index.high>>>0).toNumber();if(object.boot!=null)message.boot=Boolean(object.boot);if(object.autoDelete!=null)message.autoDelete=Boolean(object.autoDelete);if(object.license){if(!Array.isArray(object.license))throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected");message.license=[];for(var i=0;i>>0,object.diskSizeGb.high>>>0).toNumber();switch(object.savedState){default:if(typeof object.savedState==="number"){message.savedState=object.savedState;break}break;case"DISK_SAVED_STATE_UNSPECIFIED":case 0:message.savedState=0;break;case"PRESERVED":case 1:message.savedState=1;break}if(object.diskType!=null)message.diskType=String(object.diskType);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"SCRATCH":case 1:message.type=1;break;case"PERSISTENT":case 2:message.type=2;break}return message};AttachedDisk.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.arrays||options.defaults){object.license=[];object.guestOsFeature=[]}if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){object.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams,options);if(options.oneofs)object._initializeParams="initializeParams"}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){object.deviceName=message.deviceName;if(options.oneofs)object._deviceName="deviceName"}if(message.kind!=null&&message.hasOwnProperty("kind")){object.kind=message.kind;if(options.oneofs)object._kind="kind"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){object.diskTypeDeprecated=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated]===undefined?message.diskTypeDeprecated:$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated]:message.diskTypeDeprecated;if(options.oneofs)object._diskTypeDeprecated="diskTypeDeprecated"}if(message.mode!=null&&message.hasOwnProperty("mode")){object.mode=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode]===undefined?message.mode:$root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode]:message.mode;if(options.oneofs)object._mode="mode"}if(message.source!=null&&message.hasOwnProperty("source")){object.source=message.source;if(options.oneofs)object._source="source"}if(message.index!=null&&message.hasOwnProperty("index")){if(typeof message.index==="number")object.index=options.longs===String?String(message.index):message.index;else object.index=options.longs===String?$util.Long.prototype.toString.call(message.index):options.longs===Number?new $util.LongBits(message.index.low>>>0,message.index.high>>>0).toNumber():message.index;if(options.oneofs)object._index="index"}if(message.boot!=null&&message.hasOwnProperty("boot")){object.boot=message.boot;if(options.oneofs)object._boot="boot"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){object.autoDelete=message.autoDelete;if(options.oneofs)object._autoDelete="autoDelete"}if(message.license&&message.license.length){object.license=[];for(var j=0;j>>0,message.diskSizeGb.high>>>0).toNumber():message.diskSizeGb;if(options.oneofs)object._diskSizeGb="diskSizeGb"}if(message.savedState!=null&&message.hasOwnProperty("savedState")){object.savedState=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState]===undefined?message.savedState:$root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState]:message.savedState;if(options.oneofs)object._savedState="savedState"}if(message.diskType!=null&&message.hasOwnProperty("diskType")){object.diskType=message.diskType;if(options.oneofs)object._diskType="diskType"}if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};AttachedDisk.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AttachedDisk.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AttachedDisk"};AttachedDisk.InitializeParams=function(){function InitializeParams(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams;while(reader.pos>>3){case 1:{message.diskName=reader.string();break}case 2:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};InitializeParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.diskName!=null&&message.hasOwnProperty("diskName")){properties._diskName=1;if(!$util.isString(message.diskName))return"diskName: string expected"}if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams;if(object.diskName!=null)message.diskName=String(object.diskName);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GuestOsFeature;while(reader.pos>>3){case 1:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GuestOsFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GuestOsFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:break}}return null};GuestOsFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GuestOsFeature;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"FEATURE_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"VIRTIO_SCSI_MULTIQUEUE":case 1:message.type=1;break;case"WINDOWS":case 2:message.type=2;break;case"MULTI_IP_SUBNET":case 3:message.type=3;break;case"UEFI_COMPATIBLE":case 4:message.type=4;break;case"SECURE_BOOT":case 5:message.type=5;break;case"GVNIC":case 6:message.type=6;break;case"SEV_CAPABLE":case 7:message.type=7;break;case"BARE_METAL_LINUX_COMPATIBLE":case 8:message.type=8;break;case"SUSPEND_RESUME_COMPATIBLE":case 9:message.type=9;break;case"SEV_LIVE_MIGRATABLE":case 10:message.type=10;break;case"SEV_SNP_CAPABLE":case 11:message.type=11;break;case"TDX_CAPABLE":case 12:message.type=12;break;case"IDPF":case 13:message.type=13;break;case"SEV_LIVE_MIGRATABLE_V2":case 14:message.type=14;break}return message};GuestOsFeature.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};GuestOsFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GuestOsFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GuestOsFeature"};GuestOsFeature.FeatureType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FEATURE_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="VIRTIO_SCSI_MULTIQUEUE"]=1;values[valuesById[2]="WINDOWS"]=2;values[valuesById[3]="MULTI_IP_SUBNET"]=3;values[valuesById[4]="UEFI_COMPATIBLE"]=4;values[valuesById[5]="SECURE_BOOT"]=5;values[valuesById[6]="GVNIC"]=6;values[valuesById[7]="SEV_CAPABLE"]=7;values[valuesById[8]="BARE_METAL_LINUX_COMPATIBLE"]=8;values[valuesById[9]="SUSPEND_RESUME_COMPATIBLE"]=9;values[valuesById[10]="SEV_LIVE_MIGRATABLE"]=10;values[valuesById[11]="SEV_SNP_CAPABLE"]=11;values[valuesById[12]="TDX_CAPABLE"]=12;values[valuesById[13]="IDPF"]=13;values[valuesById[14]="SEV_LIVE_MIGRATABLE_V2"]=14;return values}();return GuestOsFeature}();v1.KeyRevocationActionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="NONE"]=1;values[valuesById[2]="STOP"]=2;return values}();v1.DataSourceReference=function(){function DataSourceReference(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceReference;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.dataSource=reader.string();break}case 3:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.dataSourceBackupConfigState=reader.int32();break}case 5:{message.dataSourceBackupCount=reader.int64();break}case 6:{message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.totalStoredBytes=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))if(!$util.isString(message.dataSource))return"dataSource: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))switch(message.dataSourceBackupConfigState){default:return"dataSourceBackupConfigState: enum value expected";case 0:case 1:case 2:break}if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(!$util.isInteger(message.dataSourceBackupCount)&&!(message.dataSourceBackupCount&&$util.isInteger(message.dataSourceBackupCount.low)&&$util.isInteger(message.dataSourceBackupCount.high)))return"dataSourceBackupCount: integer|Long expected";if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo")){var error=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.verify(message.dataSourceBackupConfigInfo,long+1);if(error)return"dataSourceBackupConfigInfo."+error}if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo")){var error=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.verify(message.dataSourceGcpResourceInfo,long+1);if(error)return"dataSourceGcpResourceInfo."+error}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"}return null};DataSourceReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceReference;if(object.name!=null)message.name=String(object.name);if(object.dataSource!=null)message.dataSource=String(object.dataSource);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}switch(object.dataSourceBackupConfigState){default:if(typeof object.dataSourceBackupConfigState==="number"){message.dataSourceBackupConfigState=object.dataSourceBackupConfigState;break}break;case"BACKUP_CONFIG_STATE_UNSPECIFIED":case 0:message.dataSourceBackupConfigState=0;break;case"ACTIVE":case 1:message.dataSourceBackupConfigState=1;break;case"PASSIVE":case 2:message.dataSourceBackupConfigState=2;break}if(object.dataSourceBackupCount!=null)if($util.Long)(message.dataSourceBackupCount=$util.Long.fromValue(object.dataSourceBackupCount)).unsigned=false;else if(typeof object.dataSourceBackupCount==="string")message.dataSourceBackupCount=parseInt(object.dataSourceBackupCount,10);else if(typeof object.dataSourceBackupCount==="number")message.dataSourceBackupCount=object.dataSourceBackupCount;else if(typeof object.dataSourceBackupCount==="object")message.dataSourceBackupCount=new $util.LongBits(object.dataSourceBackupCount.low>>>0,object.dataSourceBackupCount.high>>>0).toNumber();if(object.dataSourceBackupConfigInfo!=null){if(typeof object.dataSourceBackupConfigInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.dataSourceBackupConfigInfo: object expected");message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.fromObject(object.dataSourceBackupConfigInfo,long+1)}if(object.dataSourceGcpResourceInfo!=null){if(typeof object.dataSourceGcpResourceInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.dataSourceGcpResourceInfo: object expected");message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.fromObject(object.dataSourceGcpResourceInfo,long+1)}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();return message};DataSourceReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.dataSource="";object.createTime=null;object.dataSourceBackupConfigState=options.enums===String?"BACKUP_CONFIG_STATE_UNSPECIFIED":0;if($util.Long){var long=new $util.Long(0,0,false);object.dataSourceBackupCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.dataSourceBackupCount=options.longs===String?"0":0;object.dataSourceBackupConfigInfo=null;object.dataSourceGcpResourceInfo=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))object.dataSource=message.dataSource;if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))object.dataSourceBackupConfigState=options.enums===String?$root.google.cloud.backupdr.v1.BackupConfigState[message.dataSourceBackupConfigState]===undefined?message.dataSourceBackupConfigState:$root.google.cloud.backupdr.v1.BackupConfigState[message.dataSourceBackupConfigState]:message.dataSourceBackupConfigState;if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(typeof message.dataSourceBackupCount==="number")object.dataSourceBackupCount=options.longs===String?String(message.dataSourceBackupCount):message.dataSourceBackupCount;else object.dataSourceBackupCount=options.longs===String?$util.Long.prototype.toString.call(message.dataSourceBackupCount):options.longs===Number?new $util.LongBits(message.dataSourceBackupCount.low>>>0,message.dataSourceBackupCount.high>>>0).toNumber():message.dataSourceBackupCount;if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo"))object.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.toObject(message.dataSourceBackupConfigInfo,options);if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo"))object.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.toObject(message.dataSourceGcpResourceInfo,options);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"}return object};DataSourceReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceReference"};return DataSourceReference}();v1.DataSourceBackupConfigInfo=function(){function DataSourceBackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo;while(reader.pos>>3){case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};DataSourceBackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo;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.DataSourceBackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};DataSourceBackupConfigInfo.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}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);return object};DataSourceBackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceBackupConfigInfo"};return DataSourceBackupConfigInfo}();v1.DataSourceGcpResourceInfo=function(){function DataSourceGcpResourceInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.type=reader.string();break}case 3:{message.location=reader.string();break}case 4:{message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResourceInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResourceInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))if(!$util.isString(message.gcpResourcename))return"gcpResourcename: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.location!=null&&message.hasOwnProperty("location"))if(!$util.isString(message.location))return"location: string expected";if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify(message.cloudSqlInstanceProperties,long+1);if(error)return"cloudSqlInstanceProperties."+error}}return null};DataSourceGcpResourceInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo;if(object.gcpResourcename!=null)message.gcpResourcename=String(object.gcpResourcename);if(object.type!=null)message.type=String(object.type);if(object.location!=null)message.location=String(object.location);if(object.cloudSqlInstanceProperties!=null){if(typeof object.cloudSqlInstanceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResourceInfo.cloudSqlInstanceProperties: object expected");message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.fromObject(object.cloudSqlInstanceProperties,long+1)}return message};DataSourceGcpResourceInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.gcpResourcename="";object.type="";object.location=""}if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))object.gcpResourcename=message.gcpResourcename;if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.location!=null&&message.hasOwnProperty("location"))object.location=message.location;if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){object.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.toObject(message.cloudSqlInstanceProperties,options);if(options.oneofs)object.resourceProperties="cloudSqlInstanceProperties"}return object};DataSourceGcpResourceInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResourceInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceGcpResourceInfo"};return DataSourceGcpResourceInfo}();v1.GetDataSourceReferenceRequest=function(){function GetDataSourceReferenceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceReferenceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceReferenceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceReferenceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceReferenceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceReferenceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceReferenceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetDataSourceReferenceRequest"};return GetDataSourceReferenceRequest}();v1.ListDataSourceReferencesRequest=function(){function ListDataSourceReferencesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourceReferencesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourceReferencesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest;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};ListDataSourceReferencesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourceReferencesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourceReferencesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListDataSourceReferencesRequest"};return ListDataSourceReferencesRequest}();v1.ListDataSourceReferencesResponse=function(){function ListDataSourceReferencesResponse(properties){this.dataSourceReferences=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourceReferencesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1.ListDataSourceReferencesResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchDataSourceReferencesForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest;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);return message};FetchDataSourceReferencesForResourceTypeRequest.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=""}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;return object};FetchDataSourceReferencesForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchDataSourceReferencesForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest"};return FetchDataSourceReferencesForResourceTypeRequest}();v1.FetchDataSourceReferencesForResourceTypeResponse=function(){function FetchDataSourceReferencesForResourceTypeResponse(properties){this.dataSourceReferences=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListResourceBackupConfigsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest;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};ListResourceBackupConfigsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListResourceBackupConfigsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListResourceBackupConfigsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListResourceBackupConfigsRequest"};return ListResourceBackupConfigsRequest}();v1.ListResourceBackupConfigsResponse=function(){function ListResourceBackupConfigsResponse(properties){this.resourceBackupConfigs=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse;while(reader.pos>>3){case 1:{if(!(message.resourceBackupConfigs&&message.resourceBackupConfigs.length))message.resourceBackupConfigs=[];message.resourceBackupConfigs.push($root.google.cloud.backupdr.v1.ResourceBackupConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceBackupConfigs!=null&&message.hasOwnProperty("resourceBackupConfigs")){if(!Array.isArray(message.resourceBackupConfigs))return"resourceBackupConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse;if(object.resourceBackupConfigs){if(!Array.isArray(object.resourceBackupConfigs))throw TypeError(".google.cloud.backupdr.v1.ListResourceBackupConfigsResponse.resourceBackupConfigs: array expected");message.resourceBackupConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ResourceBackupConfig,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.uid=reader.string();break}case 3:{message.targetResource=reader.string();break}case 4:{message.targetResourceDisplayName=reader.string();break}case 5:{message.targetResourceType=reader.int32();break}case 6:{if(message.targetResourceLabels===$util.emptyObject)message.targetResourceLabels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.targetResourceLabels,key);message.targetResourceLabels[key]=value;break}case 7:{if(!(message.backupConfigsDetails&&message.backupConfigsDetails.length))message.backupConfigsDetails=[];message.backupConfigsDetails.push($root.google.cloud.backupdr.v1.BackupConfigDetails.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.backupConfigured=reader.bool();break}case 9:{message.vaulted=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ResourceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ResourceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.uid!=null&&message.hasOwnProperty("uid"))if(!$util.isString(message.uid))return"uid: string expected";if(message.targetResource!=null&&message.hasOwnProperty("targetResource"))if(!$util.isString(message.targetResource))return"targetResource: string expected";if(message.targetResourceDisplayName!=null&&message.hasOwnProperty("targetResourceDisplayName"))if(!$util.isString(message.targetResourceDisplayName))return"targetResourceDisplayName: string expected";if(message.targetResourceType!=null&&message.hasOwnProperty("targetResourceType"))switch(message.targetResourceType){default:return"targetResourceType: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.targetResourceLabels!=null&&message.hasOwnProperty("targetResourceLabels")){if(!$util.isObject(message.targetResourceLabels))return"targetResourceLabels: object expected";var key=Object.keys(message.targetResourceLabels);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ResourceBackupConfig;if(object.name!=null)message.name=String(object.name);if(object.uid!=null)message.uid=String(object.uid);if(object.targetResource!=null)message.targetResource=String(object.targetResource);if(object.targetResourceDisplayName!=null)message.targetResourceDisplayName=String(object.targetResourceDisplayName);switch(object.targetResourceType){default:if(typeof object.targetResourceType==="number"){message.targetResourceType=object.targetResourceType;break}break;case"RESOURCE_TYPE_UNSPECIFIED":case 0:message.targetResourceType=0;break;case"CLOUD_SQL_INSTANCE":case 1:message.targetResourceType=1;break;case"COMPUTE_ENGINE_VM":case 2:message.targetResourceType=2;break;case"COMPUTE_ENGINE_DISK":case 3:message.targetResourceType=3;break;case"COMPUTE_ENGINE_REGIONAL_DISK":case 4:message.targetResourceType=4;break}if(object.targetResourceLabels){if(typeof object.targetResourceLabels!=="object")throw TypeError(".google.cloud.backupdr.v1.ResourceBackupConfig.targetResourceLabels: object expected");message.targetResourceLabels={};for(var keys=Object.keys(object.targetResourceLabels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupConfigDetails;while(reader.pos>>3){case 1:{message.backupConfigSource=reader.string();break}case 2:{message.backupConfigSourceDisplayName=reader.string();break}case 3:{message.type=reader.int32();break}case 4:{message.state=reader.int32();break}case 5:{message.pitrSettings=$root.google.cloud.backupdr.v1.PitrSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.applicableResource=reader.string();break}case 8:{message.backupVault=reader.string();break}case 12:{if(!(message.backupLocations&&message.backupLocations.length))message.backupLocations=[];message.backupLocations.push($root.google.cloud.backupdr.v1.BackupLocation.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.backupDrPlanConfig=$root.google.cloud.backupdr.v1.BackupDrPlanConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 11:{message.backupDrTemplateConfig=$root.google.cloud.backupdr.v1.BackupDrTemplateConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigDetails.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigDetails.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.backupConfigSource!=null&&message.hasOwnProperty("backupConfigSource"))if(!$util.isString(message.backupConfigSource))return"backupConfigSource: string expected";if(message.backupConfigSourceDisplayName!=null&&message.hasOwnProperty("backupConfigSourceDisplayName"))if(!$util.isString(message.backupConfigSourceDisplayName))return"backupConfigSourceDisplayName: string expected";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.state!=null&&message.hasOwnProperty("state"))switch(message.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:break}if(message.pitrSettings!=null&&message.hasOwnProperty("pitrSettings")){var error=$root.google.cloud.backupdr.v1.PitrSettings.verify(message.pitrSettings,long+1);if(error)return"pitrSettings."+error}if(message.latestSuccessfulBackupTime!=null&&message.hasOwnProperty("latestSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.latestSuccessfulBackupTime,long+1);if(error)return"latestSuccessfulBackupTime."+error}if(message.applicableResource!=null&&message.hasOwnProperty("applicableResource"))if(!$util.isString(message.applicableResource))return"applicableResource: string expected";if(message.backupVault!=null&&message.hasOwnProperty("backupVault"))if(!$util.isString(message.backupVault))return"backupVault: string expected";if(message.backupLocations!=null&&message.hasOwnProperty("backupLocations")){if(!Array.isArray(message.backupLocations))return"backupLocations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupConfigDetails;if(object.backupConfigSource!=null)message.backupConfigSource=String(object.backupConfigSource);if(object.backupConfigSourceDisplayName!=null)message.backupConfigSourceDisplayName=String(object.backupConfigSourceDisplayName);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"CLOUD_SQL_INSTANCE_BACKUP_CONFIG":case 1:message.type=1;break;case"COMPUTE_ENGINE_RESOURCE_POLICY":case 2:message.type=2;break;case"BACKUPDR_BACKUP_PLAN":case 3:message.type=3;break;case"BACKUPDR_TEMPLATE":case 4:message.type=4;break}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"ACTIVE":case 1:message.state=1;break;case"INACTIVE":case 2:message.state=2;break;case"ERROR":case 3:message.state=3;break}if(object.pitrSettings!=null){if(typeof object.pitrSettings!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.pitrSettings: object expected");message.pitrSettings=$root.google.cloud.backupdr.v1.PitrSettings.fromObject(object.pitrSettings,long+1)}if(object.latestSuccessfulBackupTime!=null){if(typeof object.latestSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.latestSuccessfulBackupTime: object expected");message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.latestSuccessfulBackupTime,long+1)}if(object.applicableResource!=null)message.applicableResource=String(object.applicableResource);if(object.backupVault!=null)message.backupVault=String(object.backupVault);if(object.backupLocations){if(!Array.isArray(object.backupLocations))throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.backupLocations: array expected");message.backupLocations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.PitrSettings;while(reader.pos>>3){case 1:{message.retentionDays=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};PitrSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PitrSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))if(!$util.isInteger(message.retentionDays))return"retentionDays: integer expected";return null};PitrSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.PitrSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.PitrSettings;if(object.retentionDays!=null)message.retentionDays=object.retentionDays|0;return message};PitrSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.retentionDays=0;if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))object.retentionDays=message.retentionDays;return object};PitrSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PitrSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.PitrSettings"};return PitrSettings}();v1.BackupDrTemplateConfig=function(){function BackupDrTemplateConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrTemplateConfig;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupDrTemplateConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrTemplateConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};BackupDrTemplateConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupDrTemplateConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrTemplateConfig;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};BackupDrTemplateConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};BackupDrTemplateConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrTemplateConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupDrTemplateConfig"};return BackupDrTemplateConfig}();v1.BackupDrPlanConfig=function(){function BackupDrPlanConfig(properties){this.backupDrPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrPlanConfig;while(reader.pos>>3){case 1:{if(!(message.backupDrPlanRules&&message.backupDrPlanRules.length))message.backupDrPlanRules=[];message.backupDrPlanRules.push($root.google.cloud.backupdr.v1.BackupDrPlanRule.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupDrPlanRules!=null&&message.hasOwnProperty("backupDrPlanRules")){if(!Array.isArray(message.backupDrPlanRules))return"backupDrPlanRules: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrPlanConfig;if(object.backupDrPlanRules){if(!Array.isArray(object.backupDrPlanRules))throw TypeError(".google.cloud.backupdr.v1.BackupDrPlanConfig.backupDrPlanRules: array expected");message.backupDrPlanRules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrPlanRule;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 2:{message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupTime,long+1);if(error)return"lastSuccessfulBackupTime."+error}return null};BackupDrPlanRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupDrPlanRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrPlanRule;if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.lastSuccessfulBackupTime!=null){if(typeof object.lastSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupDrPlanRule.lastSuccessfulBackupTime: object expected");message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupTime,long+1)}return message};BackupDrPlanRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastSuccessfulBackupTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime"))object.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupTime,options);return object};BackupDrPlanRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrPlanRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupDrPlanRule"};return BackupDrPlanRule}();v1.BackupLocation=function(){function BackupLocation(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupLocation;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.locationId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupLocation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLocation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(message.locationId!=null&&message.hasOwnProperty("locationId"))if(!$util.isString(message.locationId))return"locationId: string expected";return null};BackupLocation.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupLocation)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupLocation;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ZONAL":case 1:message.type=1;break;case"REGIONAL":case 2:message.type=2;break;case"MULTI_REGIONAL":case 3:message.type=3;break}if(object.locationId!=null)message.locationId=String(object.locationId);return message};BackupLocation.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type=options.enums===String?"TYPE_UNSPECIFIED":0;object.locationId=""}if(message.type!=null&&message.hasOwnProperty("type"))object.type=options.enums===String?$root.google.cloud.backupdr.v1.BackupLocation.Type[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.BackupLocation.Type[message.type]:message.type;if(message.locationId!=null&&message.hasOwnProperty("locationId"))object.locationId=message.locationId;return object};BackupLocation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLocation.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupLocation"};BackupLocation.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ZONAL"]=1;values[valuesById[2]="REGIONAL"]=2;values[valuesById[3]="MULTI_REGIONAL"]=3;return values}();return BackupLocation}();return v1}();return backupdr}();return cloud}();google.api=function(){var api={};api.Http=function(){function Http(properties){this.rules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.Http;while(reader.pos>>3){case 1:{if(!(message.rules&&message.rules.length))message.rules=[];message.rules.push($root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.fullyDecodeReservedExpansion=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};Http.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Http.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.rules!=null&&message.hasOwnProperty("rules")){if(!Array.isArray(message.rules))return"rules: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.Http;if(object.rules){if(!Array.isArray(object.rules))throw TypeError(".google.api.Http.rules: array expected");message.rules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.HttpRule;while(reader.pos>>3){case 1:{message.selector=reader.string();break}case 2:{message.get=reader.string();break}case 3:{message.put=reader.string();break}case 4:{message.post=reader.string();break}case 5:{message["delete"]=reader.string();break}case 6:{message.patch=reader.string();break}case 8:{message.custom=$root.google.api.CustomHttpPattern.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.body=reader.string();break}case 12:{message.responseBody=reader.string();break}case 11:{if(!(message.additionalBindings&&message.additionalBindings.length))message.additionalBindings=[];message.additionalBindings.push($root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};HttpRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};HttpRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.selector!=null&&message.hasOwnProperty("selector"))if(!$util.isString(message.selector))return"selector: string expected";if(message.get!=null&&message.hasOwnProperty("get")){properties.pattern=1;if(!$util.isString(message.get))return"get: string expected"}if(message.put!=null&&message.hasOwnProperty("put")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.put))return"put: string expected"}if(message.post!=null&&message.hasOwnProperty("post")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.post))return"post: string expected"}if(message["delete"]!=null&&message.hasOwnProperty("delete")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message["delete"]))return"delete: string expected"}if(message.patch!=null&&message.hasOwnProperty("patch")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.patch))return"patch: string expected"}if(message.custom!=null&&message.hasOwnProperty("custom")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;{var error=$root.google.api.CustomHttpPattern.verify(message.custom,long+1);if(error)return"custom."+error}}if(message.body!=null&&message.hasOwnProperty("body"))if(!$util.isString(message.body))return"body: string expected";if(message.responseBody!=null&&message.hasOwnProperty("responseBody"))if(!$util.isString(message.responseBody))return"responseBody: string expected";if(message.additionalBindings!=null&&message.hasOwnProperty("additionalBindings")){if(!Array.isArray(message.additionalBindings))return"additionalBindings: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.HttpRule;if(object.selector!=null)message.selector=String(object.selector);if(object.get!=null)message.get=String(object.get);if(object.put!=null)message.put=String(object.put);if(object.post!=null)message.post=String(object.post);if(object["delete"]!=null)message["delete"]=String(object["delete"]);if(object.patch!=null)message.patch=String(object.patch);if(object.custom!=null){if(typeof object.custom!=="object")throw TypeError(".google.api.HttpRule.custom: object expected");message.custom=$root.google.api.CustomHttpPattern.fromObject(object.custom,long+1)}if(object.body!=null)message.body=String(object.body);if(object.responseBody!=null)message.responseBody=String(object.responseBody);if(object.additionalBindings){if(!Array.isArray(object.additionalBindings))throw TypeError(".google.api.HttpRule.additionalBindings: array expected");message.additionalBindings=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CustomHttpPattern;while(reader.pos>>3){case 1:{message.kind=reader.string();break}case 2:{message.path=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CustomHttpPattern.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CustomHttpPattern.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.kind!=null&&message.hasOwnProperty("kind"))if(!$util.isString(message.kind))return"kind: string expected";if(message.path!=null&&message.hasOwnProperty("path"))if(!$util.isString(message.path))return"path: string expected";return null};CustomHttpPattern.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.CustomHttpPattern)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CustomHttpPattern;if(object.kind!=null)message.kind=String(object.kind);if(object.path!=null)message.path=String(object.path);return message};CustomHttpPattern.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.kind="";object.path=""}if(message.kind!=null&&message.hasOwnProperty("kind"))object.kind=message.kind;if(message.path!=null&&message.hasOwnProperty("path"))object.path=message.path;return object};CustomHttpPattern.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CustomHttpPattern.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.CustomHttpPattern"};return CustomHttpPattern}();api.CommonLanguageSettings=function(){function CommonLanguageSettings(properties){this.destinations=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CommonLanguageSettings;while(reader.pos>>3){case 1:{message.referenceDocsUri=reader.string();break}case 2:{if(!(message.destinations&&message.destinations.length))message.destinations=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.referenceDocsUri!=null&&message.hasOwnProperty("referenceDocsUri"))if(!$util.isString(message.referenceDocsUri))return"referenceDocsUri: string expected";if(message.destinations!=null&&message.hasOwnProperty("destinations")){if(!Array.isArray(message.destinations))return"destinations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CommonLanguageSettings;if(object.referenceDocsUri!=null)message.referenceDocsUri=String(object.referenceDocsUri);if(object.destinations){if(!Array.isArray(object.destinations))throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");message.destinations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ClientLibrarySettings;while(reader.pos>>3){case 1:{message.version=reader.string();break}case 2:{message.launchStage=reader.int32();break}case 3:{message.restNumericEnums=reader.bool();break}case 21:{message.javaSettings=$root.google.api.JavaSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{message.cppSettings=$root.google.api.CppSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 23:{message.phpSettings=$root.google.api.PhpSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 24:{message.pythonSettings=$root.google.api.PythonSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 25:{message.nodeSettings=$root.google.api.NodeSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 26:{message.dotnetSettings=$root.google.api.DotnetSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.rubySettings=$root.google.api.RubySettings.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.goSettings=$root.google.api.GoSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ClientLibrarySettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ClientLibrarySettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.version!=null&&message.hasOwnProperty("version"))if(!$util.isString(message.version))return"version: string expected";if(message.launchStage!=null&&message.hasOwnProperty("launchStage"))switch(message.launchStage){default:return"launchStage: enum value expected";case 0:case 6:case 7:case 1:case 2:case 3:case 4:case 5:break}if(message.restNumericEnums!=null&&message.hasOwnProperty("restNumericEnums"))if(typeof message.restNumericEnums!=="boolean")return"restNumericEnums: boolean expected";if(message.javaSettings!=null&&message.hasOwnProperty("javaSettings")){var error=$root.google.api.JavaSettings.verify(message.javaSettings,long+1);if(error)return"javaSettings."+error}if(message.cppSettings!=null&&message.hasOwnProperty("cppSettings")){var error=$root.google.api.CppSettings.verify(message.cppSettings,long+1);if(error)return"cppSettings."+error}if(message.phpSettings!=null&&message.hasOwnProperty("phpSettings")){var error=$root.google.api.PhpSettings.verify(message.phpSettings,long+1);if(error)return"phpSettings."+error}if(message.pythonSettings!=null&&message.hasOwnProperty("pythonSettings")){var error=$root.google.api.PythonSettings.verify(message.pythonSettings,long+1);if(error)return"pythonSettings."+error}if(message.nodeSettings!=null&&message.hasOwnProperty("nodeSettings")){var error=$root.google.api.NodeSettings.verify(message.nodeSettings,long+1);if(error)return"nodeSettings."+error}if(message.dotnetSettings!=null&&message.hasOwnProperty("dotnetSettings")){var error=$root.google.api.DotnetSettings.verify(message.dotnetSettings,long+1);if(error)return"dotnetSettings."+error}if(message.rubySettings!=null&&message.hasOwnProperty("rubySettings")){var error=$root.google.api.RubySettings.verify(message.rubySettings,long+1);if(error)return"rubySettings."+error}if(message.goSettings!=null&&message.hasOwnProperty("goSettings")){var error=$root.google.api.GoSettings.verify(message.goSettings,long+1);if(error)return"goSettings."+error}return null};ClientLibrarySettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.ClientLibrarySettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ClientLibrarySettings;if(object.version!=null)message.version=String(object.version);switch(object.launchStage){default:if(typeof object.launchStage==="number"){message.launchStage=object.launchStage;break}break;case"LAUNCH_STAGE_UNSPECIFIED":case 0:message.launchStage=0;break;case"UNIMPLEMENTED":case 6:message.launchStage=6;break;case"PRELAUNCH":case 7:message.launchStage=7;break;case"EARLY_ACCESS":case 1:message.launchStage=1;break;case"ALPHA":case 2:message.launchStage=2;break;case"BETA":case 3:message.launchStage=3;break;case"GA":case 4:message.launchStage=4;break;case"DEPRECATED":case 5:message.launchStage=5;break}if(object.restNumericEnums!=null)message.restNumericEnums=Boolean(object.restNumericEnums);if(object.javaSettings!=null){if(typeof object.javaSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");message.javaSettings=$root.google.api.JavaSettings.fromObject(object.javaSettings,long+1)}if(object.cppSettings!=null){if(typeof object.cppSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");message.cppSettings=$root.google.api.CppSettings.fromObject(object.cppSettings,long+1)}if(object.phpSettings!=null){if(typeof object.phpSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");message.phpSettings=$root.google.api.PhpSettings.fromObject(object.phpSettings,long+1)}if(object.pythonSettings!=null){if(typeof object.pythonSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");message.pythonSettings=$root.google.api.PythonSettings.fromObject(object.pythonSettings,long+1)}if(object.nodeSettings!=null){if(typeof object.nodeSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");message.nodeSettings=$root.google.api.NodeSettings.fromObject(object.nodeSettings,long+1)}if(object.dotnetSettings!=null){if(typeof object.dotnetSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");message.dotnetSettings=$root.google.api.DotnetSettings.fromObject(object.dotnetSettings,long+1)}if(object.rubySettings!=null){if(typeof object.rubySettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");message.rubySettings=$root.google.api.RubySettings.fromObject(object.rubySettings,long+1)}if(object.goSettings!=null){if(typeof object.goSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");message.goSettings=$root.google.api.GoSettings.fromObject(object.goSettings,long+1)}return message};ClientLibrarySettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.version="";object.launchStage=options.enums===String?"LAUNCH_STAGE_UNSPECIFIED":0;object.restNumericEnums=false;object.javaSettings=null;object.cppSettings=null;object.phpSettings=null;object.pythonSettings=null;object.nodeSettings=null;object.dotnetSettings=null;object.rubySettings=null;object.goSettings=null}if(message.version!=null&&message.hasOwnProperty("version"))object.version=message.version;if(message.launchStage!=null&&message.hasOwnProperty("launchStage"))object.launchStage=options.enums===String?$root.google.api.LaunchStage[message.launchStage]===undefined?message.launchStage:$root.google.api.LaunchStage[message.launchStage]:message.launchStage;if(message.restNumericEnums!=null&&message.hasOwnProperty("restNumericEnums"))object.restNumericEnums=message.restNumericEnums;if(message.javaSettings!=null&&message.hasOwnProperty("javaSettings"))object.javaSettings=$root.google.api.JavaSettings.toObject(message.javaSettings,options);if(message.cppSettings!=null&&message.hasOwnProperty("cppSettings"))object.cppSettings=$root.google.api.CppSettings.toObject(message.cppSettings,options);if(message.phpSettings!=null&&message.hasOwnProperty("phpSettings"))object.phpSettings=$root.google.api.PhpSettings.toObject(message.phpSettings,options);if(message.pythonSettings!=null&&message.hasOwnProperty("pythonSettings"))object.pythonSettings=$root.google.api.PythonSettings.toObject(message.pythonSettings,options);if(message.nodeSettings!=null&&message.hasOwnProperty("nodeSettings"))object.nodeSettings=$root.google.api.NodeSettings.toObject(message.nodeSettings,options);if(message.dotnetSettings!=null&&message.hasOwnProperty("dotnetSettings"))object.dotnetSettings=$root.google.api.DotnetSettings.toObject(message.dotnetSettings,options);if(message.rubySettings!=null&&message.hasOwnProperty("rubySettings"))object.rubySettings=$root.google.api.RubySettings.toObject(message.rubySettings,options);if(message.goSettings!=null&&message.hasOwnProperty("goSettings"))object.goSettings=$root.google.api.GoSettings.toObject(message.goSettings,options);return object};ClientLibrarySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClientLibrarySettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.ClientLibrarySettings"};return ClientLibrarySettings}();api.Publishing=function(){function Publishing(properties){this.methodSettings=[];this.codeownerGithubTeams=[];this.librarySettings=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.Publishing;while(reader.pos>>3){case 2:{if(!(message.methodSettings&&message.methodSettings.length))message.methodSettings=[];message.methodSettings.push($root.google.api.MethodSettings.decode(reader,reader.uint32(),undefined,long+1));break}case 101:{message.newIssueUri=reader.string();break}case 102:{message.documentationUri=reader.string();break}case 103:{message.apiShortName=reader.string();break}case 104:{message.githubLabel=reader.string();break}case 105:{if(!(message.codeownerGithubTeams&&message.codeownerGithubTeams.length))message.codeownerGithubTeams=[];message.codeownerGithubTeams.push(reader.string());break}case 106:{message.docTagPrefix=reader.string();break}case 107:{message.organization=reader.int32();break}case 109:{if(!(message.librarySettings&&message.librarySettings.length))message.librarySettings=[];message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader,reader.uint32(),undefined,long+1));break}case 110:{message.protoReferenceDocumentationUri=reader.string();break}case 111:{message.restReferenceDocumentationUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};Publishing.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Publishing.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.methodSettings!=null&&message.hasOwnProperty("methodSettings")){if(!Array.isArray(message.methodSettings))return"methodSettings: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.Publishing;if(object.methodSettings){if(!Array.isArray(object.methodSettings))throw TypeError(".google.api.Publishing.methodSettings: array expected");message.methodSettings=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.JavaSettings,key,value;while(reader.pos>>3){case 1:{message.libraryPackage=reader.string();break}case 2:{if(message.serviceClassNames===$util.emptyObject)message.serviceClassNames={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.serviceClassNames,key);message.serviceClassNames[key]=value;break}case 3:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};JavaSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};JavaSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))if(!$util.isString(message.libraryPackage))return"libraryPackage: string expected";if(message.serviceClassNames!=null&&message.hasOwnProperty("serviceClassNames")){if(!$util.isObject(message.serviceClassNames))return"serviceClassNames: object expected";var key=Object.keys(message.serviceClassNames);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.JavaSettings;if(object.libraryPackage!=null)message.libraryPackage=String(object.libraryPackage);if(object.serviceClassNames){if(typeof object.serviceClassNames!=="object")throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");message.serviceClassNames={};for(var keys=Object.keys(object.serviceClassNames),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CppSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CppSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CppSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};CppSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.CppSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CppSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.CppSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};CppSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};CppSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CppSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.CppSettings"};return CppSettings}();api.PhpSettings=function(){function PhpSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PhpSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.libraryPackage=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};PhpSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PhpSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))if(!$util.isString(message.libraryPackage))return"libraryPackage: string expected";return null};PhpSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PhpSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PhpSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.PhpSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.libraryPackage!=null)message.libraryPackage=String(object.libraryPackage);return message};PhpSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.common=null;object.libraryPackage=""}if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))object.libraryPackage=message.libraryPackage;return object};PhpSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PhpSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PhpSettings"};return PhpSettings}();api.PythonSettings=function(){function PythonSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PythonSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};PythonSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PythonSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.experimentalFeatures!=null&&message.hasOwnProperty("experimentalFeatures")){var error=$root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures,long+1);if(error)return"experimentalFeatures."+error}return null};PythonSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PythonSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PythonSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.PythonSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.experimentalFeatures!=null){if(typeof object.experimentalFeatures!=="object")throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected");message.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures,long+1)}return message};PythonSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.common=null;object.experimentalFeatures=null}if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);if(message.experimentalFeatures!=null&&message.hasOwnProperty("experimentalFeatures"))object.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures,options);return object};PythonSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PythonSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PythonSettings"};PythonSettings.ExperimentalFeatures=function(){function ExperimentalFeatures(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PythonSettings.ExperimentalFeatures;while(reader.pos>>3){case 1:{message.restAsyncIoEnabled=reader.bool();break}case 2:{message.protobufPythonicTypesEnabled=reader.bool();break}case 3:{message.unversionedPackageDisabled=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ExperimentalFeatures.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExperimentalFeatures.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.restAsyncIoEnabled!=null&&message.hasOwnProperty("restAsyncIoEnabled"))if(typeof message.restAsyncIoEnabled!=="boolean")return"restAsyncIoEnabled: boolean expected";if(message.protobufPythonicTypesEnabled!=null&&message.hasOwnProperty("protobufPythonicTypesEnabled"))if(typeof message.protobufPythonicTypesEnabled!=="boolean")return"protobufPythonicTypesEnabled: boolean expected";if(message.unversionedPackageDisabled!=null&&message.hasOwnProperty("unversionedPackageDisabled"))if(typeof message.unversionedPackageDisabled!=="boolean")return"unversionedPackageDisabled: boolean expected";return null};ExperimentalFeatures.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PythonSettings.ExperimentalFeatures)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PythonSettings.ExperimentalFeatures;if(object.restAsyncIoEnabled!=null)message.restAsyncIoEnabled=Boolean(object.restAsyncIoEnabled);if(object.protobufPythonicTypesEnabled!=null)message.protobufPythonicTypesEnabled=Boolean(object.protobufPythonicTypesEnabled);if(object.unversionedPackageDisabled!=null)message.unversionedPackageDisabled=Boolean(object.unversionedPackageDisabled);return message};ExperimentalFeatures.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.restAsyncIoEnabled=false;object.protobufPythonicTypesEnabled=false;object.unversionedPackageDisabled=false}if(message.restAsyncIoEnabled!=null&&message.hasOwnProperty("restAsyncIoEnabled"))object.restAsyncIoEnabled=message.restAsyncIoEnabled;if(message.protobufPythonicTypesEnabled!=null&&message.hasOwnProperty("protobufPythonicTypesEnabled"))object.protobufPythonicTypesEnabled=message.protobufPythonicTypesEnabled;if(message.unversionedPackageDisabled!=null&&message.hasOwnProperty("unversionedPackageDisabled"))object.unversionedPackageDisabled=message.unversionedPackageDisabled;return object};ExperimentalFeatures.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ExperimentalFeatures.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PythonSettings.ExperimentalFeatures"};return ExperimentalFeatures}();return PythonSettings}();api.NodeSettings=function(){function NodeSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.NodeSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};NodeSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NodeSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};NodeSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.NodeSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.NodeSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.NodeSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};NodeSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};NodeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NodeSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.NodeSettings"};return NodeSettings}();api.DotnetSettings=function(){function DotnetSettings(properties){this.renamedServices={};this.renamedResources={};this.ignoredResources=[];this.forcedNamespaceAliases=[];this.handwrittenSignatures=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.DotnetSettings,key,value;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{if(message.renamedServices===$util.emptyObject)message.renamedServices={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedServices,key);message.renamedServices[key]=value;break}case 3:{if(message.renamedResources===$util.emptyObject)message.renamedResources={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedResources,key);message.renamedResources[key]=value;break}case 4:{if(!(message.ignoredResources&&message.ignoredResources.length))message.ignoredResources=[];message.ignoredResources.push(reader.string());break}case 5:{if(!(message.forcedNamespaceAliases&&message.forcedNamespaceAliases.length))message.forcedNamespaceAliases=[];message.forcedNamespaceAliases.push(reader.string());break}case 6:{if(!(message.handwrittenSignatures&&message.handwrittenSignatures.length))message.handwrittenSignatures=[];message.handwrittenSignatures.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};DotnetSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DotnetSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.renamedServices!=null&&message.hasOwnProperty("renamedServices")){if(!$util.isObject(message.renamedServices))return"renamedServices: object expected";var key=Object.keys(message.renamedServices);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.DotnetSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.DotnetSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.renamedServices){if(typeof object.renamedServices!=="object")throw TypeError(".google.api.DotnetSettings.renamedServices: object expected");message.renamedServices={};for(var keys=Object.keys(object.renamedServices),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.RubySettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RubySettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RubySettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};RubySettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.RubySettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.RubySettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.RubySettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};RubySettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};RubySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RubySettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.RubySettings"};return RubySettings}();api.GoSettings=function(){function GoSettings(properties){this.renamedServices={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.GoSettings,key,value;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{if(message.renamedServices===$util.emptyObject)message.renamedServices={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedServices,key);message.renamedServices[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};GoSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GoSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.renamedServices!=null&&message.hasOwnProperty("renamedServices")){if(!$util.isObject(message.renamedServices))return"renamedServices: object expected";var key=Object.keys(message.renamedServices);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.GoSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.GoSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.renamedServices){if(typeof object.renamedServices!=="object")throw TypeError(".google.api.GoSettings.renamedServices: object expected");message.renamedServices={};for(var keys=Object.keys(object.renamedServices),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.MethodSettings;while(reader.pos>>3){case 1:{message.selector=reader.string();break}case 2:{message.longRunning=$root.google.api.MethodSettings.LongRunning.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{if(!(message.autoPopulatedFields&&message.autoPopulatedFields.length))message.autoPopulatedFields=[];message.autoPopulatedFields.push(reader.string());break}case 4:{message.batching=$root.google.api.BatchingConfigProto.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MethodSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.selector!=null&&message.hasOwnProperty("selector"))if(!$util.isString(message.selector))return"selector: string expected";if(message.longRunning!=null&&message.hasOwnProperty("longRunning")){var error=$root.google.api.MethodSettings.LongRunning.verify(message.longRunning,long+1);if(error)return"longRunning."+error}if(message.autoPopulatedFields!=null&&message.hasOwnProperty("autoPopulatedFields")){if(!Array.isArray(message.autoPopulatedFields))return"autoPopulatedFields: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.MethodSettings;if(object.selector!=null)message.selector=String(object.selector);if(object.longRunning!=null){if(typeof object.longRunning!=="object")throw TypeError(".google.api.MethodSettings.longRunning: object expected");message.longRunning=$root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning,long+1)}if(object.autoPopulatedFields){if(!Array.isArray(object.autoPopulatedFields))throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected");message.autoPopulatedFields=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.MethodSettings.LongRunning;while(reader.pos>>3){case 1:{message.initialPollDelay=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.pollDelayMultiplier=reader.float();break}case 3:{message.maxPollDelay=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.totalPollTimeout=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};LongRunning.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};LongRunning.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.initialPollDelay!=null&&message.hasOwnProperty("initialPollDelay")){var error=$root.google.protobuf.Duration.verify(message.initialPollDelay,long+1);if(error)return"initialPollDelay."+error}if(message.pollDelayMultiplier!=null&&message.hasOwnProperty("pollDelayMultiplier"))if(typeof message.pollDelayMultiplier!=="number")return"pollDelayMultiplier: number expected";if(message.maxPollDelay!=null&&message.hasOwnProperty("maxPollDelay")){var error=$root.google.protobuf.Duration.verify(message.maxPollDelay,long+1);if(error)return"maxPollDelay."+error}if(message.totalPollTimeout!=null&&message.hasOwnProperty("totalPollTimeout")){var error=$root.google.protobuf.Duration.verify(message.totalPollTimeout,long+1);if(error)return"totalPollTimeout."+error}return null};LongRunning.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.MethodSettings.LongRunning)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.MethodSettings.LongRunning;if(object.initialPollDelay!=null){if(typeof object.initialPollDelay!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");message.initialPollDelay=$root.google.protobuf.Duration.fromObject(object.initialPollDelay,long+1)}if(object.pollDelayMultiplier!=null)message.pollDelayMultiplier=Number(object.pollDelayMultiplier);if(object.maxPollDelay!=null){if(typeof object.maxPollDelay!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");message.maxPollDelay=$root.google.protobuf.Duration.fromObject(object.maxPollDelay,long+1)}if(object.totalPollTimeout!=null){if(typeof object.totalPollTimeout!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");message.totalPollTimeout=$root.google.protobuf.Duration.fromObject(object.totalPollTimeout,long+1)}return message};LongRunning.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.initialPollDelay=null;object.pollDelayMultiplier=0;object.maxPollDelay=null;object.totalPollTimeout=null}if(message.initialPollDelay!=null&&message.hasOwnProperty("initialPollDelay"))object.initialPollDelay=$root.google.protobuf.Duration.toObject(message.initialPollDelay,options);if(message.pollDelayMultiplier!=null&&message.hasOwnProperty("pollDelayMultiplier"))object.pollDelayMultiplier=options.json&&!isFinite(message.pollDelayMultiplier)?String(message.pollDelayMultiplier):message.pollDelayMultiplier;if(message.maxPollDelay!=null&&message.hasOwnProperty("maxPollDelay"))object.maxPollDelay=$root.google.protobuf.Duration.toObject(message.maxPollDelay,options);if(message.totalPollTimeout!=null&&message.hasOwnProperty("totalPollTimeout"))object.totalPollTimeout=$root.google.protobuf.Duration.toObject(message.totalPollTimeout,options);return object};LongRunning.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};LongRunning.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.MethodSettings.LongRunning"};return LongRunning}();return MethodSettings}();api.ClientLibraryOrganization=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"]=0;values[valuesById[1]="CLOUD"]=1;values[valuesById[2]="ADS"]=2;values[valuesById[3]="PHOTOS"]=3;values[valuesById[4]="STREET_VIEW"]=4;values[valuesById[5]="SHOPPING"]=5;values[valuesById[6]="GEO"]=6;values[valuesById[7]="GENERATIVE_AI"]=7;return values}();api.ClientLibraryDestination=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"]=0;values[valuesById[10]="GITHUB"]=10;values[valuesById[20]="PACKAGE_MANAGER"]=20;return values}();api.SelectiveGapicGeneration=function(){function SelectiveGapicGeneration(properties){this.methods=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.SelectiveGapicGeneration;while(reader.pos>>3){case 1:{if(!(message.methods&&message.methods.length))message.methods=[];message.methods.push(reader.string());break}case 2:{message.generateOmittedAsInternal=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};SelectiveGapicGeneration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SelectiveGapicGeneration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.methods!=null&&message.hasOwnProperty("methods")){if(!Array.isArray(message.methods))return"methods: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.SelectiveGapicGeneration;if(object.methods){if(!Array.isArray(object.methods))throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected");message.methods=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingConfigProto;while(reader.pos>>3){case 1:{message.thresholds=$root.google.api.BatchingSettingsProto.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.batchDescriptor=$root.google.api.BatchingDescriptorProto.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BatchingConfigProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingConfigProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.thresholds!=null&&message.hasOwnProperty("thresholds")){var error=$root.google.api.BatchingSettingsProto.verify(message.thresholds,long+1);if(error)return"thresholds."+error}if(message.batchDescriptor!=null&&message.hasOwnProperty("batchDescriptor")){var error=$root.google.api.BatchingDescriptorProto.verify(message.batchDescriptor,long+1);if(error)return"batchDescriptor."+error}return null};BatchingConfigProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.BatchingConfigProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingConfigProto;if(object.thresholds!=null){if(typeof object.thresholds!=="object")throw TypeError(".google.api.BatchingConfigProto.thresholds: object expected");message.thresholds=$root.google.api.BatchingSettingsProto.fromObject(object.thresholds,long+1)}if(object.batchDescriptor!=null){if(typeof object.batchDescriptor!=="object")throw TypeError(".google.api.BatchingConfigProto.batchDescriptor: object expected");message.batchDescriptor=$root.google.api.BatchingDescriptorProto.fromObject(object.batchDescriptor,long+1)}return message};BatchingConfigProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.thresholds=null;object.batchDescriptor=null}if(message.thresholds!=null&&message.hasOwnProperty("thresholds"))object.thresholds=$root.google.api.BatchingSettingsProto.toObject(message.thresholds,options);if(message.batchDescriptor!=null&&message.hasOwnProperty("batchDescriptor"))object.batchDescriptor=$root.google.api.BatchingDescriptorProto.toObject(message.batchDescriptor,options);return object};BatchingConfigProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BatchingConfigProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.BatchingConfigProto"};return BatchingConfigProto}();api.BatchingSettingsProto=function(){function BatchingSettingsProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingSettingsProto;while(reader.pos>>3){case 1:{message.elementCountThreshold=reader.int32();break}case 2:{message.requestByteThreshold=reader.int64();break}case 3:{message.delayThreshold=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.elementCountLimit=reader.int32();break}case 5:{message.requestByteLimit=reader.int32();break}case 6:{message.flowControlElementLimit=reader.int32();break}case 7:{message.flowControlByteLimit=reader.int32();break}case 8:{message.flowControlLimitExceededBehavior=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BatchingSettingsProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingSettingsProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.elementCountThreshold!=null&&message.hasOwnProperty("elementCountThreshold"))if(!$util.isInteger(message.elementCountThreshold))return"elementCountThreshold: integer expected";if(message.requestByteThreshold!=null&&message.hasOwnProperty("requestByteThreshold"))if(!$util.isInteger(message.requestByteThreshold)&&!(message.requestByteThreshold&&$util.isInteger(message.requestByteThreshold.low)&&$util.isInteger(message.requestByteThreshold.high)))return"requestByteThreshold: integer|Long expected";if(message.delayThreshold!=null&&message.hasOwnProperty("delayThreshold")){var error=$root.google.protobuf.Duration.verify(message.delayThreshold,long+1);if(error)return"delayThreshold."+error}if(message.elementCountLimit!=null&&message.hasOwnProperty("elementCountLimit"))if(!$util.isInteger(message.elementCountLimit))return"elementCountLimit: integer expected";if(message.requestByteLimit!=null&&message.hasOwnProperty("requestByteLimit"))if(!$util.isInteger(message.requestByteLimit))return"requestByteLimit: integer expected";if(message.flowControlElementLimit!=null&&message.hasOwnProperty("flowControlElementLimit"))if(!$util.isInteger(message.flowControlElementLimit))return"flowControlElementLimit: integer expected";if(message.flowControlByteLimit!=null&&message.hasOwnProperty("flowControlByteLimit"))if(!$util.isInteger(message.flowControlByteLimit))return"flowControlByteLimit: integer expected";if(message.flowControlLimitExceededBehavior!=null&&message.hasOwnProperty("flowControlLimitExceededBehavior"))switch(message.flowControlLimitExceededBehavior){default:return"flowControlLimitExceededBehavior: enum value expected";case 0:case 1:case 2:case 3:break}return null};BatchingSettingsProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.BatchingSettingsProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingSettingsProto;if(object.elementCountThreshold!=null)message.elementCountThreshold=object.elementCountThreshold|0;if(object.requestByteThreshold!=null)if($util.Long)(message.requestByteThreshold=$util.Long.fromValue(object.requestByteThreshold)).unsigned=false;else if(typeof object.requestByteThreshold==="string")message.requestByteThreshold=parseInt(object.requestByteThreshold,10);else if(typeof object.requestByteThreshold==="number")message.requestByteThreshold=object.requestByteThreshold;else if(typeof object.requestByteThreshold==="object")message.requestByteThreshold=new $util.LongBits(object.requestByteThreshold.low>>>0,object.requestByteThreshold.high>>>0).toNumber();if(object.delayThreshold!=null){if(typeof object.delayThreshold!=="object")throw TypeError(".google.api.BatchingSettingsProto.delayThreshold: object expected");message.delayThreshold=$root.google.protobuf.Duration.fromObject(object.delayThreshold,long+1)}if(object.elementCountLimit!=null)message.elementCountLimit=object.elementCountLimit|0;if(object.requestByteLimit!=null)message.requestByteLimit=object.requestByteLimit|0;if(object.flowControlElementLimit!=null)message.flowControlElementLimit=object.flowControlElementLimit|0;if(object.flowControlByteLimit!=null)message.flowControlByteLimit=object.flowControlByteLimit|0;switch(object.flowControlLimitExceededBehavior){default:if(typeof object.flowControlLimitExceededBehavior==="number"){message.flowControlLimitExceededBehavior=object.flowControlLimitExceededBehavior;break}break;case"UNSET_BEHAVIOR":case 0:message.flowControlLimitExceededBehavior=0;break;case"THROW_EXCEPTION":case 1:message.flowControlLimitExceededBehavior=1;break;case"BLOCK":case 2:message.flowControlLimitExceededBehavior=2;break;case"IGNORE":case 3:message.flowControlLimitExceededBehavior=3;break}return message};BatchingSettingsProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.elementCountThreshold=0;if($util.Long){var long=new $util.Long(0,0,false);object.requestByteThreshold=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.requestByteThreshold=options.longs===String?"0":0;object.delayThreshold=null;object.elementCountLimit=0;object.requestByteLimit=0;object.flowControlElementLimit=0;object.flowControlByteLimit=0;object.flowControlLimitExceededBehavior=options.enums===String?"UNSET_BEHAVIOR":0}if(message.elementCountThreshold!=null&&message.hasOwnProperty("elementCountThreshold"))object.elementCountThreshold=message.elementCountThreshold;if(message.requestByteThreshold!=null&&message.hasOwnProperty("requestByteThreshold"))if(typeof message.requestByteThreshold==="number")object.requestByteThreshold=options.longs===String?String(message.requestByteThreshold):message.requestByteThreshold;else object.requestByteThreshold=options.longs===String?$util.Long.prototype.toString.call(message.requestByteThreshold):options.longs===Number?new $util.LongBits(message.requestByteThreshold.low>>>0,message.requestByteThreshold.high>>>0).toNumber():message.requestByteThreshold;if(message.delayThreshold!=null&&message.hasOwnProperty("delayThreshold"))object.delayThreshold=$root.google.protobuf.Duration.toObject(message.delayThreshold,options);if(message.elementCountLimit!=null&&message.hasOwnProperty("elementCountLimit"))object.elementCountLimit=message.elementCountLimit;if(message.requestByteLimit!=null&&message.hasOwnProperty("requestByteLimit"))object.requestByteLimit=message.requestByteLimit;if(message.flowControlElementLimit!=null&&message.hasOwnProperty("flowControlElementLimit"))object.flowControlElementLimit=message.flowControlElementLimit;if(message.flowControlByteLimit!=null&&message.hasOwnProperty("flowControlByteLimit"))object.flowControlByteLimit=message.flowControlByteLimit;if(message.flowControlLimitExceededBehavior!=null&&message.hasOwnProperty("flowControlLimitExceededBehavior"))object.flowControlLimitExceededBehavior=options.enums===String?$root.google.api.FlowControlLimitExceededBehaviorProto[message.flowControlLimitExceededBehavior]===undefined?message.flowControlLimitExceededBehavior:$root.google.api.FlowControlLimitExceededBehaviorProto[message.flowControlLimitExceededBehavior]:message.flowControlLimitExceededBehavior;return object};BatchingSettingsProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BatchingSettingsProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.BatchingSettingsProto"};return BatchingSettingsProto}();api.FlowControlLimitExceededBehaviorProto=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_BEHAVIOR"]=0;values[valuesById[1]="THROW_EXCEPTION"]=1;values[valuesById[2]="BLOCK"]=2;values[valuesById[3]="IGNORE"]=3;return values}();api.BatchingDescriptorProto=function(){function BatchingDescriptorProto(properties){this.discriminatorFields=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingDescriptorProto;while(reader.pos>>3){case 1:{message.batchedField=reader.string();break}case 2:{if(!(message.discriminatorFields&&message.discriminatorFields.length))message.discriminatorFields=[];message.discriminatorFields.push(reader.string());break}case 3:{message.subresponseField=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BatchingDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.batchedField!=null&&message.hasOwnProperty("batchedField"))if(!$util.isString(message.batchedField))return"batchedField: string expected";if(message.discriminatorFields!=null&&message.hasOwnProperty("discriminatorFields")){if(!Array.isArray(message.discriminatorFields))return"discriminatorFields: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingDescriptorProto;if(object.batchedField!=null)message.batchedField=String(object.batchedField);if(object.discriminatorFields){if(!Array.isArray(object.discriminatorFields))throw TypeError(".google.api.BatchingDescriptorProto.discriminatorFields: array expected");message.discriminatorFields=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.FieldInfo;while(reader.pos>>3){case 1:{message.format=reader.int32();break}case 2:{if(!(message.referencedTypes&&message.referencedTypes.length))message.referencedTypes=[];message.referencedTypes.push($root.google.api.TypeReference.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FieldInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.format!=null&&message.hasOwnProperty("format"))switch(message.format){default:return"format: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.referencedTypes!=null&&message.hasOwnProperty("referencedTypes")){if(!Array.isArray(message.referencedTypes))return"referencedTypes: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.FieldInfo;switch(object.format){default:if(typeof object.format==="number"){message.format=object.format;break}break;case"FORMAT_UNSPECIFIED":case 0:message.format=0;break;case"UUID4":case 1:message.format=1;break;case"IPV4":case 2:message.format=2;break;case"IPV6":case 3:message.format=3;break;case"IPV4_OR_IPV6":case 4:message.format=4;break}if(object.referencedTypes){if(!Array.isArray(object.referencedTypes))throw TypeError(".google.api.FieldInfo.referencedTypes: array expected");message.referencedTypes=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.TypeReference;while(reader.pos>>3){case 1:{message.typeName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};TypeReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TypeReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.typeName!=null&&message.hasOwnProperty("typeName"))if(!$util.isString(message.typeName))return"typeName: string expected";return null};TypeReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.TypeReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.TypeReference;if(object.typeName!=null)message.typeName=String(object.typeName);return message};TypeReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.typeName="";if(message.typeName!=null&&message.hasOwnProperty("typeName"))object.typeName=message.typeName;return object};TypeReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TypeReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.TypeReference"};return TypeReference}();api.ResourceDescriptor=function(){function ResourceDescriptor(properties){this.pattern=[];this.style=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ResourceDescriptor;while(reader.pos>>3){case 1:{message.type=reader.string();break}case 2:{if(!(message.pattern&&message.pattern.length))message.pattern=[];message.pattern.push(reader.string());break}case 3:{message.nameField=reader.string();break}case 4:{message.history=reader.int32();break}case 5:{message.plural=reader.string();break}case 6:{message.singular=reader.string();break}case 10:{if(!(message.style&&message.style.length))message.style=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.pattern!=null&&message.hasOwnProperty("pattern")){if(!Array.isArray(message.pattern))return"pattern: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ResourceDescriptor;if(object.type!=null)message.type=String(object.type);if(object.pattern){if(!Array.isArray(object.pattern))throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");message.pattern=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ResourceReference;while(reader.pos>>3){case 1:{message.type=reader.string();break}case 2:{message.childType=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ResourceReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ResourceReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.childType!=null&&message.hasOwnProperty("childType"))if(!$util.isString(message.childType))return"childType: string expected";return null};ResourceReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.ResourceReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ResourceReference;if(object.type!=null)message.type=String(object.type);if(object.childType!=null)message.childType=String(object.childType);return message};ResourceReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type="";object.childType=""}if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.childType!=null&&message.hasOwnProperty("childType"))object.childType=message.childType;return object};ResourceReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ResourceReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.ResourceReference"};return ResourceReference}();return api}();google.protobuf=function(){var protobuf={};protobuf.FileDescriptorSet=function(){function FileDescriptorSet(properties){this.file=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileDescriptorSet;while(reader.pos>>3){case 1:{if(!(message.file&&message.file.length))message.file=[];message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FileDescriptorSet.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FileDescriptorSet.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.file!=null&&message.hasOwnProperty("file")){if(!Array.isArray(message.file))return"file: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileDescriptorSet;if(object.file){if(!Array.isArray(object.file))throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");message.file=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message["package"]=reader.string();break}case 3:{if(!(message.dependency&&message.dependency.length))message.dependency=[];message.dependency.push(reader.string());break}case 10:{if(!(message.publicDependency&&message.publicDependency.length))message.publicDependency=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message["package"]!=null&&message.hasOwnProperty("package"))if(!$util.isString(message["package"]))return"package: string expected";if(message.dependency!=null&&message.hasOwnProperty("dependency")){if(!Array.isArray(message.dependency))return"dependency: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object["package"]!=null)message["package"]=String(object["package"]);if(object.dependency){if(!Array.isArray(object.dependency))throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");message.dependency=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.field&&message.field.length))message.field=[];message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{if(!(message.extension&&message.extension.length))message.extension=[];message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{if(!(message.nestedType&&message.nestedType.length))message.nestedType=[];message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{if(!(message.enumType&&message.enumType.length))message.enumType=[];message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{if(!(message.extensionRange&&message.extensionRange.length))message.extensionRange=[];message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{if(!(message.oneofDecl&&message.oneofDecl.length))message.oneofDecl=[];message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.options=$root.google.protobuf.MessageOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{if(!(message.reservedRange&&message.reservedRange.length))message.reservedRange=[];message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{if(!(message.reservedName&&message.reservedName.length))message.reservedName=[];message.reservedName.push(reader.string());break}case 11:{message.visibility=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};DescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.field!=null&&message.hasOwnProperty("field")){if(!Array.isArray(message.field))return"field: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.field){if(!Array.isArray(object.field))throw TypeError(".google.protobuf.DescriptorProto.field: array expected");message.field=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto.ExtensionRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}case 3:{message.options=$root.google.protobuf.ExtensionRangeOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ExtensionRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExtensionRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.ExtensionRangeOptions.verify(message.options,long+1);if(error)return"options."+error}return null};ExtensionRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto.ExtensionRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");message.options=$root.google.protobuf.ExtensionRangeOptions.fromObject(object.options,long+1)}return message};ExtensionRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0;object.options=null}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.ExtensionRangeOptions.toObject(message.options,options);return object};ExtensionRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ExtensionRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DescriptorProto.ExtensionRange"};return ExtensionRange}();DescriptorProto.ReservedRange=function(){function ReservedRange(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto.ReservedRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};ReservedRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ReservedRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";return null};ReservedRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto.ReservedRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;return message};ReservedRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;return object};ReservedRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ReservedRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DescriptorProto.ReservedRange"};return ReservedRange}();return DescriptorProto}();protobuf.ExtensionRangeOptions=function(){function ExtensionRangeOptions(properties){this.uninterpretedOption=[];this.declaration=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ExtensionRangeOptions;while(reader.pos>>3){case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{if(!(message.declaration&&message.declaration.length))message.declaration=[];message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader,reader.uint32(),undefined,long+1));break}case 50:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.verification=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};ExtensionRangeOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExtensionRangeOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ExtensionRangeOptions;if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ExtensionRangeOptions.Declaration;while(reader.pos>>3){case 1:{message.number=reader.int32();break}case 2:{message.fullName=reader.string();break}case 3:{message.type=reader.string();break}case 5:{message.reserved=reader.bool();break}case 6:{message.repeated=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};Declaration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Declaration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.fullName!=null&&message.hasOwnProperty("fullName"))if(!$util.isString(message.fullName))return"fullName: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.reserved!=null&&message.hasOwnProperty("reserved"))if(typeof message.reserved!=="boolean")return"reserved: boolean expected";if(message.repeated!=null&&message.hasOwnProperty("repeated"))if(typeof message.repeated!=="boolean")return"repeated: boolean expected";return null};Declaration.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ExtensionRangeOptions.Declaration;if(object.number!=null)message.number=object.number|0;if(object.fullName!=null)message.fullName=String(object.fullName);if(object.type!=null)message.type=String(object.type);if(object.reserved!=null)message.reserved=Boolean(object.reserved);if(object.repeated!=null)message.repeated=Boolean(object.repeated);return message};Declaration.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.number=0;object.fullName="";object.type="";object.reserved=false;object.repeated=false}if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.fullName!=null&&message.hasOwnProperty("fullName"))object.fullName=message.fullName;if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.reserved!=null&&message.hasOwnProperty("reserved"))object.reserved=message.reserved;if(message.repeated!=null&&message.hasOwnProperty("repeated"))object.repeated=message.repeated;return object};Declaration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Declaration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.ExtensionRangeOptions.Declaration"};return Declaration}();ExtensionRangeOptions.VerificationState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DECLARATION"]=0;values[valuesById[1]="UNVERIFIED"]=1;return values}();return ExtensionRangeOptions}();protobuf.FieldDescriptorProto=function(){function FieldDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 3:{message.number=reader.int32();break}case 4:{message.label=reader.int32();break}case 5:{message.type=reader.int32();break}case 6:{message.typeName=reader.string();break}case 2:{message.extendee=reader.string();break}case 7:{message.defaultValue=reader.string();break}case 9:{message.oneofIndex=reader.int32();break}case 10:{message.jsonName=reader.string();break}case 8:{message.options=$root.google.protobuf.FieldOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 17:{message.proto3Optional=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};FieldDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.label!=null&&message.hasOwnProperty("label"))switch(message.label){default:return"label: enum value expected";case 1:case 3:case 2:break}if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:break}if(message.typeName!=null&&message.hasOwnProperty("typeName"))if(!$util.isString(message.typeName))return"typeName: string expected";if(message.extendee!=null&&message.hasOwnProperty("extendee"))if(!$util.isString(message.extendee))return"extendee: string expected";if(message.defaultValue!=null&&message.hasOwnProperty("defaultValue"))if(!$util.isString(message.defaultValue))return"defaultValue: string expected";if(message.oneofIndex!=null&&message.hasOwnProperty("oneofIndex"))if(!$util.isInteger(message.oneofIndex))return"oneofIndex: integer expected";if(message.jsonName!=null&&message.hasOwnProperty("jsonName"))if(!$util.isString(message.jsonName))return"jsonName: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.FieldOptions.verify(message.options,long+1);if(error)return"options."+error}if(message.proto3Optional!=null&&message.hasOwnProperty("proto3Optional"))if(typeof message.proto3Optional!=="boolean")return"proto3Optional: boolean expected";return null};FieldDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.number!=null)message.number=object.number|0;switch(object.label){default:if(typeof object.label==="number"){message.label=object.label;break}break;case"LABEL_OPTIONAL":case 1:message.label=1;break;case"LABEL_REPEATED":case 3:message.label=3;break;case"LABEL_REQUIRED":case 2:message.label=2;break}switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_DOUBLE":case 1:message.type=1;break;case"TYPE_FLOAT":case 2:message.type=2;break;case"TYPE_INT64":case 3:message.type=3;break;case"TYPE_UINT64":case 4:message.type=4;break;case"TYPE_INT32":case 5:message.type=5;break;case"TYPE_FIXED64":case 6:message.type=6;break;case"TYPE_FIXED32":case 7:message.type=7;break;case"TYPE_BOOL":case 8:message.type=8;break;case"TYPE_STRING":case 9:message.type=9;break;case"TYPE_GROUP":case 10:message.type=10;break;case"TYPE_MESSAGE":case 11:message.type=11;break;case"TYPE_BYTES":case 12:message.type=12;break;case"TYPE_UINT32":case 13:message.type=13;break;case"TYPE_ENUM":case 14:message.type=14;break;case"TYPE_SFIXED32":case 15:message.type=15;break;case"TYPE_SFIXED64":case 16:message.type=16;break;case"TYPE_SINT32":case 17:message.type=17;break;case"TYPE_SINT64":case 18:message.type=18;break}if(object.typeName!=null)message.typeName=String(object.typeName);if(object.extendee!=null)message.extendee=String(object.extendee);if(object.defaultValue!=null)message.defaultValue=String(object.defaultValue);if(object.oneofIndex!=null)message.oneofIndex=object.oneofIndex|0;if(object.jsonName!=null)message.jsonName=String(object.jsonName);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");message.options=$root.google.protobuf.FieldOptions.fromObject(object.options,long+1)}if(object.proto3Optional!=null)message.proto3Optional=Boolean(object.proto3Optional);return message};FieldDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.extendee="";object.number=0;object.label=options.enums===String?"LABEL_OPTIONAL":1;object.type=options.enums===String?"TYPE_DOUBLE":1;object.typeName="";object.defaultValue="";object.options=null;object.oneofIndex=0;object.jsonName="";object.proto3Optional=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.extendee!=null&&message.hasOwnProperty("extendee"))object.extendee=message.extendee;if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.label!=null&&message.hasOwnProperty("label"))object.label=options.enums===String?$root.google.protobuf.FieldDescriptorProto.Label[message.label]===undefined?message.label:$root.google.protobuf.FieldDescriptorProto.Label[message.label]:message.label;if(message.type!=null&&message.hasOwnProperty("type"))object.type=options.enums===String?$root.google.protobuf.FieldDescriptorProto.Type[message.type]===undefined?message.type:$root.google.protobuf.FieldDescriptorProto.Type[message.type]:message.type;if(message.typeName!=null&&message.hasOwnProperty("typeName"))object.typeName=message.typeName;if(message.defaultValue!=null&&message.hasOwnProperty("defaultValue"))object.defaultValue=message.defaultValue;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.FieldOptions.toObject(message.options,options);if(message.oneofIndex!=null&&message.hasOwnProperty("oneofIndex"))object.oneofIndex=message.oneofIndex;if(message.jsonName!=null&&message.hasOwnProperty("jsonName"))object.jsonName=message.jsonName;if(message.proto3Optional!=null&&message.hasOwnProperty("proto3Optional"))object.proto3Optional=message.proto3Optional;return object};FieldDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FieldDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldDescriptorProto"};FieldDescriptorProto.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[1]="TYPE_DOUBLE"]=1;values[valuesById[2]="TYPE_FLOAT"]=2;values[valuesById[3]="TYPE_INT64"]=3;values[valuesById[4]="TYPE_UINT64"]=4;values[valuesById[5]="TYPE_INT32"]=5;values[valuesById[6]="TYPE_FIXED64"]=6;values[valuesById[7]="TYPE_FIXED32"]=7;values[valuesById[8]="TYPE_BOOL"]=8;values[valuesById[9]="TYPE_STRING"]=9;values[valuesById[10]="TYPE_GROUP"]=10;values[valuesById[11]="TYPE_MESSAGE"]=11;values[valuesById[12]="TYPE_BYTES"]=12;values[valuesById[13]="TYPE_UINT32"]=13;values[valuesById[14]="TYPE_ENUM"]=14;values[valuesById[15]="TYPE_SFIXED32"]=15;values[valuesById[16]="TYPE_SFIXED64"]=16;values[valuesById[17]="TYPE_SINT32"]=17;values[valuesById[18]="TYPE_SINT64"]=18;return values}();FieldDescriptorProto.Label=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[1]="LABEL_OPTIONAL"]=1;values[valuesById[3]="LABEL_REPEATED"]=3;values[valuesById[2]="LABEL_REQUIRED"]=2;return values}();return FieldDescriptorProto}();protobuf.OneofDescriptorProto=function(){function OneofDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.OneofDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.options=$root.google.protobuf.OneofOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};OneofDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OneofDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.OneofOptions.verify(message.options,long+1);if(error)return"options."+error}return null};OneofDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.OneofDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.OneofDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");message.options=$root.google.protobuf.OneofOptions.fromObject(object.options,long+1)}return message};OneofDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.options=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.OneofOptions.toObject(message.options,options);return object};OneofDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OneofDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.OneofDescriptorProto"};return OneofDescriptorProto}();protobuf.EnumDescriptorProto=function(){function EnumDescriptorProto(properties){this.value=[];this.reservedRange=[];this.reservedName=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.value&&message.value.length))message.value=[];message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.options=$root.google.protobuf.EnumOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{if(!(message.reservedRange&&message.reservedRange.length))message.reservedRange=[];message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{if(!(message.reservedName&&message.reservedName.length))message.reservedName=[];message.reservedName.push(reader.string());break}case 6:{message.visibility=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};EnumDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.value!=null&&message.hasOwnProperty("value")){if(!Array.isArray(message.value))return"value: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.value){if(!Array.isArray(object.value))throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");message.value=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};EnumReservedRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumReservedRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";return null};EnumReservedRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;return message};EnumReservedRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;return object};EnumReservedRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EnumReservedRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.EnumDescriptorProto.EnumReservedRange"};return EnumReservedRange}();return EnumDescriptorProto}();protobuf.EnumValueDescriptorProto=function(){function EnumValueDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumValueDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.number=reader.int32();break}case 3:{message.options=$root.google.protobuf.EnumValueOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};EnumValueDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumValueDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.EnumValueOptions.verify(message.options,long+1);if(error)return"options."+error}return null};EnumValueDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.EnumValueDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumValueDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.number!=null)message.number=object.number|0;if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");message.options=$root.google.protobuf.EnumValueOptions.fromObject(object.options,long+1)}return message};EnumValueDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.number=0;object.options=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.EnumValueOptions.toObject(message.options,options);return object};EnumValueDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EnumValueDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.EnumValueDescriptorProto"};return EnumValueDescriptorProto}();protobuf.ServiceDescriptorProto=function(){function ServiceDescriptorProto(properties){this.method=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ServiceDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.method&&message.method.length))message.method=[];message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.options=$root.google.protobuf.ServiceOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ServiceDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.method!=null&&message.hasOwnProperty("method")){if(!Array.isArray(message.method))return"method: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ServiceDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.method){if(!Array.isArray(object.method))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");message.method=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MethodDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.inputType=reader.string();break}case 3:{message.outputType=reader.string();break}case 4:{message.options=$root.google.protobuf.MethodOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.clientStreaming=reader.bool();break}case 6:{message.serverStreaming=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};MethodDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.inputType!=null&&message.hasOwnProperty("inputType"))if(!$util.isString(message.inputType))return"inputType: string expected";if(message.outputType!=null&&message.hasOwnProperty("outputType"))if(!$util.isString(message.outputType))return"outputType: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.MethodOptions.verify(message.options,long+1);if(error)return"options."+error}if(message.clientStreaming!=null&&message.hasOwnProperty("clientStreaming"))if(typeof message.clientStreaming!=="boolean")return"clientStreaming: boolean expected";if(message.serverStreaming!=null&&message.hasOwnProperty("serverStreaming"))if(typeof message.serverStreaming!=="boolean")return"serverStreaming: boolean expected";return null};MethodDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.MethodDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MethodDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.inputType!=null)message.inputType=String(object.inputType);if(object.outputType!=null)message.outputType=String(object.outputType);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");message.options=$root.google.protobuf.MethodOptions.fromObject(object.options,long+1)}if(object.clientStreaming!=null)message.clientStreaming=Boolean(object.clientStreaming);if(object.serverStreaming!=null)message.serverStreaming=Boolean(object.serverStreaming);return message};MethodDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.inputType="";object.outputType="";object.options=null;object.clientStreaming=false;object.serverStreaming=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.inputType!=null&&message.hasOwnProperty("inputType"))object.inputType=message.inputType;if(message.outputType!=null&&message.hasOwnProperty("outputType"))object.outputType=message.outputType;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.MethodOptions.toObject(message.options,options);if(message.clientStreaming!=null&&message.hasOwnProperty("clientStreaming"))object.clientStreaming=message.clientStreaming;if(message.serverStreaming!=null&&message.hasOwnProperty("serverStreaming"))object.serverStreaming=message.serverStreaming;return object};MethodDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};MethodDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.MethodDescriptorProto"};return MethodDescriptorProto}();protobuf.FileOptions=function(){function FileOptions(properties){this.uninterpretedOption=[];this[".google.api.resourceDefinition"]=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileOptions;while(reader.pos>>3){case 1:{message.javaPackage=reader.string();break}case 8:{message.javaOuterClassname=reader.string();break}case 10:{message.javaMultipleFiles=reader.bool();break}case 20:{message.javaGenerateEqualsAndHash=reader.bool();break}case 27:{message.javaStringCheckUtf8=reader.bool();break}case 9:{message.optimizeFor=reader.int32();break}case 11:{message.goPackage=reader.string();break}case 16:{message.ccGenericServices=reader.bool();break}case 17:{message.javaGenericServices=reader.bool();break}case 18:{message.pyGenericServices=reader.bool();break}case 23:{message.deprecated=reader.bool();break}case 31:{message.ccEnableArenas=reader.bool();break}case 36:{message.objcClassPrefix=reader.string();break}case 37:{message.csharpNamespace=reader.string();break}case 39:{message.swiftPrefix=reader.string();break}case 40:{message.phpClassPrefix=reader.string();break}case 41:{message.phpNamespace=reader.string();break}case 44:{message.phpMetadataNamespace=reader.string();break}case 45:{message.rubyPackage=reader.string();break}case 50:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1053:{if(!(message[".google.api.resourceDefinition"]&&message[".google.api.resourceDefinition"].length))message[".google.api.resourceDefinition"]=[];message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FileOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FileOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.javaPackage!=null&&message.hasOwnProperty("javaPackage"))if(!$util.isString(message.javaPackage))return"javaPackage: string expected";if(message.javaOuterClassname!=null&&message.hasOwnProperty("javaOuterClassname"))if(!$util.isString(message.javaOuterClassname))return"javaOuterClassname: string expected";if(message.javaMultipleFiles!=null&&message.hasOwnProperty("javaMultipleFiles"))if(typeof message.javaMultipleFiles!=="boolean")return"javaMultipleFiles: boolean expected";if(message.javaGenerateEqualsAndHash!=null&&message.hasOwnProperty("javaGenerateEqualsAndHash"))if(typeof message.javaGenerateEqualsAndHash!=="boolean")return"javaGenerateEqualsAndHash: boolean expected";if(message.javaStringCheckUtf8!=null&&message.hasOwnProperty("javaStringCheckUtf8"))if(typeof message.javaStringCheckUtf8!=="boolean")return"javaStringCheckUtf8: boolean expected";if(message.optimizeFor!=null&&message.hasOwnProperty("optimizeFor"))switch(message.optimizeFor){default:return"optimizeFor: enum value expected";case 1:case 2:case 3:break}if(message.goPackage!=null&&message.hasOwnProperty("goPackage"))if(!$util.isString(message.goPackage))return"goPackage: string expected";if(message.ccGenericServices!=null&&message.hasOwnProperty("ccGenericServices"))if(typeof message.ccGenericServices!=="boolean")return"ccGenericServices: boolean expected";if(message.javaGenericServices!=null&&message.hasOwnProperty("javaGenericServices"))if(typeof message.javaGenericServices!=="boolean")return"javaGenericServices: boolean expected";if(message.pyGenericServices!=null&&message.hasOwnProperty("pyGenericServices"))if(typeof message.pyGenericServices!=="boolean")return"pyGenericServices: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.ccEnableArenas!=null&&message.hasOwnProperty("ccEnableArenas"))if(typeof message.ccEnableArenas!=="boolean")return"ccEnableArenas: boolean expected";if(message.objcClassPrefix!=null&&message.hasOwnProperty("objcClassPrefix"))if(!$util.isString(message.objcClassPrefix))return"objcClassPrefix: string expected";if(message.csharpNamespace!=null&&message.hasOwnProperty("csharpNamespace"))if(!$util.isString(message.csharpNamespace))return"csharpNamespace: string expected";if(message.swiftPrefix!=null&&message.hasOwnProperty("swiftPrefix"))if(!$util.isString(message.swiftPrefix))return"swiftPrefix: string expected";if(message.phpClassPrefix!=null&&message.hasOwnProperty("phpClassPrefix"))if(!$util.isString(message.phpClassPrefix))return"phpClassPrefix: string expected";if(message.phpNamespace!=null&&message.hasOwnProperty("phpNamespace"))if(!$util.isString(message.phpNamespace))return"phpNamespace: string expected";if(message.phpMetadataNamespace!=null&&message.hasOwnProperty("phpMetadataNamespace"))if(!$util.isString(message.phpMetadataNamespace))return"phpMetadataNamespace: string expected";if(message.rubyPackage!=null&&message.hasOwnProperty("rubyPackage"))if(!$util.isString(message.rubyPackage))return"rubyPackage: string expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileOptions;if(object.javaPackage!=null)message.javaPackage=String(object.javaPackage);if(object.javaOuterClassname!=null)message.javaOuterClassname=String(object.javaOuterClassname);if(object.javaMultipleFiles!=null)message.javaMultipleFiles=Boolean(object.javaMultipleFiles);if(object.javaGenerateEqualsAndHash!=null)message.javaGenerateEqualsAndHash=Boolean(object.javaGenerateEqualsAndHash);if(object.javaStringCheckUtf8!=null)message.javaStringCheckUtf8=Boolean(object.javaStringCheckUtf8);switch(object.optimizeFor){default:if(typeof object.optimizeFor==="number"){message.optimizeFor=object.optimizeFor;break}break;case"SPEED":case 1:message.optimizeFor=1;break;case"CODE_SIZE":case 2:message.optimizeFor=2;break;case"LITE_RUNTIME":case 3:message.optimizeFor=3;break}if(object.goPackage!=null)message.goPackage=String(object.goPackage);if(object.ccGenericServices!=null)message.ccGenericServices=Boolean(object.ccGenericServices);if(object.javaGenericServices!=null)message.javaGenericServices=Boolean(object.javaGenericServices);if(object.pyGenericServices!=null)message.pyGenericServices=Boolean(object.pyGenericServices);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.ccEnableArenas!=null)message.ccEnableArenas=Boolean(object.ccEnableArenas);if(object.objcClassPrefix!=null)message.objcClassPrefix=String(object.objcClassPrefix);if(object.csharpNamespace!=null)message.csharpNamespace=String(object.csharpNamespace);if(object.swiftPrefix!=null)message.swiftPrefix=String(object.swiftPrefix);if(object.phpClassPrefix!=null)message.phpClassPrefix=String(object.phpClassPrefix);if(object.phpNamespace!=null)message.phpNamespace=String(object.phpNamespace);if(object.phpMetadataNamespace!=null)message.phpMetadataNamespace=String(object.phpMetadataNamespace);if(object.rubyPackage!=null)message.rubyPackage=String(object.rubyPackage);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.FileOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MessageOptions;while(reader.pos>>3){case 1:{message.messageSetWireFormat=reader.bool();break}case 2:{message.noStandardDescriptorAccessor=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 7:{message.mapEntry=reader.bool();break}case 11:{message.deprecatedLegacyJsonFieldConflicts=reader.bool();break}case 12:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1053:{message[".google.api.resource"]=$root.google.api.ResourceDescriptor.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MessageOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MessageOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.messageSetWireFormat!=null&&message.hasOwnProperty("messageSetWireFormat"))if(typeof message.messageSetWireFormat!=="boolean")return"messageSetWireFormat: boolean expected";if(message.noStandardDescriptorAccessor!=null&&message.hasOwnProperty("noStandardDescriptorAccessor"))if(typeof message.noStandardDescriptorAccessor!=="boolean")return"noStandardDescriptorAccessor: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.mapEntry!=null&&message.hasOwnProperty("mapEntry"))if(typeof message.mapEntry!=="boolean")return"mapEntry: boolean expected";if(message.deprecatedLegacyJsonFieldConflicts!=null&&message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))if(typeof message.deprecatedLegacyJsonFieldConflicts!=="boolean")return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MessageOptions;if(object.messageSetWireFormat!=null)message.messageSetWireFormat=Boolean(object.messageSetWireFormat);if(object.noStandardDescriptorAccessor!=null)message.noStandardDescriptorAccessor=Boolean(object.noStandardDescriptorAccessor);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.mapEntry!=null)message.mapEntry=Boolean(object.mapEntry);if(object.deprecatedLegacyJsonFieldConflicts!=null)message.deprecatedLegacyJsonFieldConflicts=Boolean(object.deprecatedLegacyJsonFieldConflicts);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.MessageOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions;while(reader.pos>>3){case 1:{message.ctype=reader.int32();break}case 2:{message.packed=reader.bool();break}case 6:{message.jstype=reader.int32();break}case 5:{message.lazy=reader.bool();break}case 15:{message.unverifiedLazy=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 10:{message.weak=reader.bool();break}case 16:{message.debugRedact=reader.bool();break}case 17:{message.retention=reader.int32();break}case 19:{if(!(message.targets&&message.targets.length))message.targets=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ctype!=null&&message.hasOwnProperty("ctype"))switch(message.ctype){default:return"ctype: enum value expected";case 0:case 1:case 2:break}if(message.packed!=null&&message.hasOwnProperty("packed"))if(typeof message.packed!=="boolean")return"packed: boolean expected";if(message.jstype!=null&&message.hasOwnProperty("jstype"))switch(message.jstype){default:return"jstype: enum value expected";case 0:case 1:case 2:break}if(message.lazy!=null&&message.hasOwnProperty("lazy"))if(typeof message.lazy!=="boolean")return"lazy: boolean expected";if(message.unverifiedLazy!=null&&message.hasOwnProperty("unverifiedLazy"))if(typeof message.unverifiedLazy!=="boolean")return"unverifiedLazy: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.weak!=null&&message.hasOwnProperty("weak"))if(typeof message.weak!=="boolean")return"weak: boolean expected";if(message.debugRedact!=null&&message.hasOwnProperty("debugRedact"))if(typeof message.debugRedact!=="boolean")return"debugRedact: boolean expected";if(message.retention!=null&&message.hasOwnProperty("retention"))switch(message.retention){default:return"retention: enum value expected";case 0:case 1:case 2:break}if(message.targets!=null&&message.hasOwnProperty("targets")){if(!Array.isArray(message.targets))return"targets: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions;switch(object.ctype){default:if(typeof object.ctype==="number"){message.ctype=object.ctype;break}break;case"STRING":case 0:message.ctype=0;break;case"CORD":case 1:message.ctype=1;break;case"STRING_PIECE":case 2:message.ctype=2;break}if(object.packed!=null)message.packed=Boolean(object.packed);switch(object.jstype){default:if(typeof object.jstype==="number"){message.jstype=object.jstype;break}break;case"JS_NORMAL":case 0:message.jstype=0;break;case"JS_STRING":case 1:message.jstype=1;break;case"JS_NUMBER":case 2:message.jstype=2;break}if(object.lazy!=null)message.lazy=Boolean(object.lazy);if(object.unverifiedLazy!=null)message.unverifiedLazy=Boolean(object.unverifiedLazy);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.weak!=null)message.weak=Boolean(object.weak);if(object.debugRedact!=null)message.debugRedact=Boolean(object.debugRedact);switch(object.retention){default:if(typeof object.retention==="number"){message.retention=object.retention;break}break;case"RETENTION_UNKNOWN":case 0:message.retention=0;break;case"RETENTION_RUNTIME":case 1:message.retention=1;break;case"RETENTION_SOURCE":case 2:message.retention=2;break}if(object.targets){if(!Array.isArray(object.targets))throw TypeError(".google.protobuf.FieldOptions.targets: array expected");message.targets=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions.EditionDefault;while(reader.pos>>3){case 3:{message.edition=reader.int32();break}case 2:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};EditionDefault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EditionDefault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isString(message.value))return"value: string expected";return null};EditionDefault.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldOptions.EditionDefault)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions.EditionDefault;switch(object.edition){default:if(typeof object.edition==="number"){message.edition=object.edition;break}break;case"EDITION_UNKNOWN":case 0:message.edition=0;break;case"EDITION_LEGACY":case 900:message.edition=900;break;case"EDITION_PROTO2":case 998:message.edition=998;break;case"EDITION_PROTO3":case 999:message.edition=999;break;case"EDITION_2023":case 1e3:message.edition=1e3;break;case"EDITION_2024":case 1001:message.edition=1001;break;case"EDITION_2026":case 1002:message.edition=1002;break;case"EDITION_UNSTABLE":case 9999:message.edition=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:message.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.edition=99999;break;case"EDITION_MAX":case 2147483647:message.edition=2147483647;break}if(object.value!=null)message.value=String(object.value);return message};EditionDefault.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.value="";object.edition=options.enums===String?"EDITION_UNKNOWN":0}if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;if(message.edition!=null&&message.hasOwnProperty("edition"))object.edition=options.enums===String?$root.google.protobuf.Edition[message.edition]===undefined?message.edition:$root.google.protobuf.Edition[message.edition]:message.edition;return object};EditionDefault.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EditionDefault.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldOptions.EditionDefault"};return EditionDefault}();FieldOptions.FeatureSupport=function(){function FeatureSupport(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions.FeatureSupport;while(reader.pos>>3){case 1:{message.editionIntroduced=reader.int32();break}case 2:{message.editionDeprecated=reader.int32();break}case 3:{message.deprecationWarning=reader.string();break}case 4:{message.editionRemoved=reader.int32();break}case 5:{message.removalError=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSupport.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSupport.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.editionIntroduced!=null&&message.hasOwnProperty("editionIntroduced"))switch(message.editionIntroduced){default:return"editionIntroduced: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.editionDeprecated!=null&&message.hasOwnProperty("editionDeprecated"))switch(message.editionDeprecated){default:return"editionDeprecated: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.deprecationWarning!=null&&message.hasOwnProperty("deprecationWarning"))if(!$util.isString(message.deprecationWarning))return"deprecationWarning: string expected";if(message.editionRemoved!=null&&message.hasOwnProperty("editionRemoved"))switch(message.editionRemoved){default:return"editionRemoved: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.removalError!=null&&message.hasOwnProperty("removalError"))if(!$util.isString(message.removalError))return"removalError: string expected";return null};FeatureSupport.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldOptions.FeatureSupport)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions.FeatureSupport;switch(object.editionIntroduced){default:if(typeof object.editionIntroduced==="number"){message.editionIntroduced=object.editionIntroduced;break}break;case"EDITION_UNKNOWN":case 0:message.editionIntroduced=0;break;case"EDITION_LEGACY":case 900:message.editionIntroduced=900;break;case"EDITION_PROTO2":case 998:message.editionIntroduced=998;break;case"EDITION_PROTO3":case 999:message.editionIntroduced=999;break;case"EDITION_2023":case 1e3:message.editionIntroduced=1e3;break;case"EDITION_2024":case 1001:message.editionIntroduced=1001;break;case"EDITION_2026":case 1002:message.editionIntroduced=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionIntroduced=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionIntroduced=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionIntroduced=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionIntroduced=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionIntroduced=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionIntroduced=99999;break;case"EDITION_MAX":case 2147483647:message.editionIntroduced=2147483647;break}switch(object.editionDeprecated){default:if(typeof object.editionDeprecated==="number"){message.editionDeprecated=object.editionDeprecated;break}break;case"EDITION_UNKNOWN":case 0:message.editionDeprecated=0;break;case"EDITION_LEGACY":case 900:message.editionDeprecated=900;break;case"EDITION_PROTO2":case 998:message.editionDeprecated=998;break;case"EDITION_PROTO3":case 999:message.editionDeprecated=999;break;case"EDITION_2023":case 1e3:message.editionDeprecated=1e3;break;case"EDITION_2024":case 1001:message.editionDeprecated=1001;break;case"EDITION_2026":case 1002:message.editionDeprecated=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionDeprecated=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionDeprecated=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionDeprecated=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionDeprecated=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionDeprecated=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionDeprecated=99999;break;case"EDITION_MAX":case 2147483647:message.editionDeprecated=2147483647;break}if(object.deprecationWarning!=null)message.deprecationWarning=String(object.deprecationWarning);switch(object.editionRemoved){default:if(typeof object.editionRemoved==="number"){message.editionRemoved=object.editionRemoved;break}break;case"EDITION_UNKNOWN":case 0:message.editionRemoved=0;break;case"EDITION_LEGACY":case 900:message.editionRemoved=900;break;case"EDITION_PROTO2":case 998:message.editionRemoved=998;break;case"EDITION_PROTO3":case 999:message.editionRemoved=999;break;case"EDITION_2023":case 1e3:message.editionRemoved=1e3;break;case"EDITION_2024":case 1001:message.editionRemoved=1001;break;case"EDITION_2026":case 1002:message.editionRemoved=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionRemoved=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionRemoved=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionRemoved=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionRemoved=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionRemoved=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionRemoved=99999;break;case"EDITION_MAX":case 2147483647:message.editionRemoved=2147483647;break}if(object.removalError!=null)message.removalError=String(object.removalError);return message};FeatureSupport.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.editionIntroduced=options.enums===String?"EDITION_UNKNOWN":0;object.editionDeprecated=options.enums===String?"EDITION_UNKNOWN":0;object.deprecationWarning="";object.editionRemoved=options.enums===String?"EDITION_UNKNOWN":0;object.removalError=""}if(message.editionIntroduced!=null&&message.hasOwnProperty("editionIntroduced"))object.editionIntroduced=options.enums===String?$root.google.protobuf.Edition[message.editionIntroduced]===undefined?message.editionIntroduced:$root.google.protobuf.Edition[message.editionIntroduced]:message.editionIntroduced;if(message.editionDeprecated!=null&&message.hasOwnProperty("editionDeprecated"))object.editionDeprecated=options.enums===String?$root.google.protobuf.Edition[message.editionDeprecated]===undefined?message.editionDeprecated:$root.google.protobuf.Edition[message.editionDeprecated]:message.editionDeprecated;if(message.deprecationWarning!=null&&message.hasOwnProperty("deprecationWarning"))object.deprecationWarning=message.deprecationWarning;if(message.editionRemoved!=null&&message.hasOwnProperty("editionRemoved"))object.editionRemoved=options.enums===String?$root.google.protobuf.Edition[message.editionRemoved]===undefined?message.editionRemoved:$root.google.protobuf.Edition[message.editionRemoved]:message.editionRemoved;if(message.removalError!=null&&message.hasOwnProperty("removalError"))object.removalError=message.removalError;return object};FeatureSupport.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSupport.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldOptions.FeatureSupport"};return FeatureSupport}();return FieldOptions}();protobuf.OneofOptions=function(){function OneofOptions(properties){this.uninterpretedOption=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.OneofOptions;while(reader.pos>>3){case 1:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};OneofOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OneofOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.OneofOptions;if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.OneofOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumOptions;while(reader.pos>>3){case 2:{message.allowAlias=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 6:{message.deprecatedLegacyJsonFieldConflicts=reader.bool();break}case 7:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};EnumOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.allowAlias!=null&&message.hasOwnProperty("allowAlias"))if(typeof message.allowAlias!=="boolean")return"allowAlias: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.deprecatedLegacyJsonFieldConflicts!=null&&message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))if(typeof message.deprecatedLegacyJsonFieldConflicts!=="boolean")return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumOptions;if(object.allowAlias!=null)message.allowAlias=Boolean(object.allowAlias);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.deprecatedLegacyJsonFieldConflicts!=null)message.deprecatedLegacyJsonFieldConflicts=Boolean(object.deprecatedLegacyJsonFieldConflicts);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.EnumOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumValueOptions;while(reader.pos>>3){case 1:{message.deprecated=reader.bool();break}case 2:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.debugRedact=reader.bool();break}case 4:{message.featureSupport=$root.google.protobuf.FieldOptions.FeatureSupport.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};EnumValueOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumValueOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.debugRedact!=null&&message.hasOwnProperty("debugRedact"))if(typeof message.debugRedact!=="boolean")return"debugRedact: boolean expected";if(message.featureSupport!=null&&message.hasOwnProperty("featureSupport")){var error=$root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport,long+1);if(error)return"featureSupport."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumValueOptions;if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.EnumValueOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.debugRedact!=null)message.debugRedact=Boolean(object.debugRedact);if(object.featureSupport!=null){if(typeof object.featureSupport!=="object")throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected");message.featureSupport=$root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ServiceOptions;while(reader.pos>>3){case 34:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 33:{message.deprecated=reader.bool();break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1049:{message[".google.api.defaultHost"]=reader.string();break}case 1050:{message[".google.api.oauthScopes"]=reader.string();break}case 525000001:{message[".google.api.apiVersion"]=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ServiceOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ServiceOptions;if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.ServiceOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MethodOptions;while(reader.pos>>3){case 33:{message.deprecated=reader.bool();break}case 34:{message.idempotencyLevel=reader.int32();break}case 35:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 72295728:{message[".google.api.http"]=$root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1);break}case 1051:{if(!(message[".google.api.methodSignature"]&&message[".google.api.methodSignature"].length))message[".google.api.methodSignature"]=[];message[".google.api.methodSignature"].push(reader.string());break}case 1049:{message[".google.longrunning.operationInfo"]=$root.google.longrunning.OperationInfo.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MethodOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.idempotencyLevel!=null&&message.hasOwnProperty("idempotencyLevel"))switch(message.idempotencyLevel){default:return"idempotencyLevel: enum value expected";case 0:case 1:case 2:break}if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MethodOptions;if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);switch(object.idempotencyLevel){default:if(typeof object.idempotencyLevel==="number"){message.idempotencyLevel=object.idempotencyLevel;break}break;case"IDEMPOTENCY_UNKNOWN":case 0:message.idempotencyLevel=0;break;case"NO_SIDE_EFFECTS":case 1:message.idempotencyLevel=1;break;case"IDEMPOTENT":case 2:message.idempotencyLevel=2;break}if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.MethodOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UninterpretedOption;while(reader.pos>>3){case 2:{if(!(message.name&&message.name.length))message.name=[];message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.identifierValue=reader.string();break}case 4:{message.positiveIntValue=reader.uint64();break}case 5:{message.negativeIntValue=reader.int64();break}case 6:{message.doubleValue=reader.double();break}case 7:{message.stringValue=reader.bytes();break}case 8:{message.aggregateValue=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UninterpretedOption.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UninterpretedOption.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name")){if(!Array.isArray(message.name))return"name: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UninterpretedOption;if(object.name){if(!Array.isArray(object.name))throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");message.name=[];for(var i=0;i>>0,object.positiveIntValue.high>>>0).toNumber(true);if(object.negativeIntValue!=null)if($util.Long)(message.negativeIntValue=$util.Long.fromValue(object.negativeIntValue)).unsigned=false;else if(typeof object.negativeIntValue==="string")message.negativeIntValue=parseInt(object.negativeIntValue,10);else if(typeof object.negativeIntValue==="number")message.negativeIntValue=object.negativeIntValue;else if(typeof object.negativeIntValue==="object")message.negativeIntValue=new $util.LongBits(object.negativeIntValue.low>>>0,object.negativeIntValue.high>>>0).toNumber();if(object.doubleValue!=null)message.doubleValue=Number(object.doubleValue);if(object.stringValue!=null)if(typeof object.stringValue==="string")$util.base64.decode(object.stringValue,message.stringValue=$util.newBuffer($util.base64.length(object.stringValue)),0);else if(object.stringValue.length>=0)message.stringValue=object.stringValue;if(object.aggregateValue!=null)message.aggregateValue=String(object.aggregateValue);return message};UninterpretedOption.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.arrays||options.defaults)object.name=[];if(options.defaults){object.identifierValue="";if($util.Long){var long=new $util.Long(0,0,true);object.positiveIntValue=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.positiveIntValue=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.negativeIntValue=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.negativeIntValue=options.longs===String?"0":0;object.doubleValue=0;if(options.bytes===String)object.stringValue="";else{object.stringValue=[];if(options.bytes!==Array)object.stringValue=$util.newBuffer(object.stringValue)}object.aggregateValue=""}if(message.name&&message.name.length){object.name=[];for(var j=0;j>>0,message.positiveIntValue.high>>>0).toNumber(true):message.positiveIntValue;if(message.negativeIntValue!=null&&message.hasOwnProperty("negativeIntValue"))if(typeof message.negativeIntValue==="number")object.negativeIntValue=options.longs===String?String(message.negativeIntValue):message.negativeIntValue;else object.negativeIntValue=options.longs===String?$util.Long.prototype.toString.call(message.negativeIntValue):options.longs===Number?new $util.LongBits(message.negativeIntValue.low>>>0,message.negativeIntValue.high>>>0).toNumber():message.negativeIntValue;if(message.doubleValue!=null&&message.hasOwnProperty("doubleValue"))object.doubleValue=options.json&&!isFinite(message.doubleValue)?String(message.doubleValue):message.doubleValue;if(message.stringValue!=null&&message.hasOwnProperty("stringValue"))object.stringValue=options.bytes===String?$util.base64.encode(message.stringValue,0,message.stringValue.length):options.bytes===Array?Array.prototype.slice.call(message.stringValue):message.stringValue;if(message.aggregateValue!=null&&message.hasOwnProperty("aggregateValue"))object.aggregateValue=message.aggregateValue;return object};UninterpretedOption.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UninterpretedOption.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UninterpretedOption"};UninterpretedOption.NamePart=function(){function NamePart(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UninterpretedOption.NamePart;while(reader.pos>>3){case 1:{message.namePart=reader.string();break}case 2:{message.isExtension=reader.bool();break}default:reader.skipType(tag&7,long);break}}if(!message.hasOwnProperty("namePart"))throw $util.ProtocolError("missing required 'namePart'",{instance:message});if(!message.hasOwnProperty("isExtension"))throw $util.ProtocolError("missing required 'isExtension'",{instance:message});return message};NamePart.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NamePart.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(!$util.isString(message.namePart))return"namePart: string expected";if(typeof message.isExtension!=="boolean")return"isExtension: boolean expected";return null};NamePart.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UninterpretedOption.NamePart)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UninterpretedOption.NamePart;if(object.namePart!=null)message.namePart=String(object.namePart);if(object.isExtension!=null)message.isExtension=Boolean(object.isExtension);return message};NamePart.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.namePart="";object.isExtension=false}if(message.namePart!=null&&message.hasOwnProperty("namePart"))object.namePart=message.namePart;if(message.isExtension!=null&&message.hasOwnProperty("isExtension"))object.isExtension=message.isExtension;return object};NamePart.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NamePart.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UninterpretedOption.NamePart"};return NamePart}();return UninterpretedOption}();protobuf.FeatureSet=function(){function FeatureSet(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet;while(reader.pos>>3){case 1:{message.fieldPresence=reader.int32();break}case 2:{message.enumType=reader.int32();break}case 3:{message.repeatedFieldEncoding=reader.int32();break}case 4:{message.utf8Validation=reader.int32();break}case 5:{message.messageEncoding=reader.int32();break}case 6:{message.jsonFormat=reader.int32();break}case 7:{message.enforceNamingStyle=reader.int32();break}case 8:{message.defaultSymbolVisibility=reader.int32();break}case 9:{message.enforceProtoLimits=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSet.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSet.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.fieldPresence!=null&&message.hasOwnProperty("fieldPresence"))switch(message.fieldPresence){default:return"fieldPresence: enum value expected";case 0:case 1:case 2:case 3:break}if(message.enumType!=null&&message.hasOwnProperty("enumType"))switch(message.enumType){default:return"enumType: enum value expected";case 0:case 1:case 2:break}if(message.repeatedFieldEncoding!=null&&message.hasOwnProperty("repeatedFieldEncoding"))switch(message.repeatedFieldEncoding){default:return"repeatedFieldEncoding: enum value expected";case 0:case 1:case 2:break}if(message.utf8Validation!=null&&message.hasOwnProperty("utf8Validation"))switch(message.utf8Validation){default:return"utf8Validation: enum value expected";case 0:case 2:case 3:break}if(message.messageEncoding!=null&&message.hasOwnProperty("messageEncoding"))switch(message.messageEncoding){default:return"messageEncoding: enum value expected";case 0:case 1:case 2:break}if(message.jsonFormat!=null&&message.hasOwnProperty("jsonFormat"))switch(message.jsonFormat){default:return"jsonFormat: enum value expected";case 0:case 1:case 2:break}if(message.enforceNamingStyle!=null&&message.hasOwnProperty("enforceNamingStyle"))switch(message.enforceNamingStyle){default:return"enforceNamingStyle: enum value expected";case 0:case 1:case 2:case 3:break}if(message.defaultSymbolVisibility!=null&&message.hasOwnProperty("defaultSymbolVisibility"))switch(message.defaultSymbolVisibility){default:return"defaultSymbolVisibility: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.enforceProtoLimits!=null&&message.hasOwnProperty("enforceProtoLimits"))switch(message.enforceProtoLimits){default:return"enforceProtoLimits: enum value expected";case 0:case 1:case 2:break}return null};FeatureSet.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSet;switch(object.fieldPresence){default:if(typeof object.fieldPresence==="number"){message.fieldPresence=object.fieldPresence;break}break;case"FIELD_PRESENCE_UNKNOWN":case 0:message.fieldPresence=0;break;case"EXPLICIT":case 1:message.fieldPresence=1;break;case"IMPLICIT":case 2:message.fieldPresence=2;break;case"LEGACY_REQUIRED":case 3:message.fieldPresence=3;break}switch(object.enumType){default:if(typeof object.enumType==="number"){message.enumType=object.enumType;break}break;case"ENUM_TYPE_UNKNOWN":case 0:message.enumType=0;break;case"OPEN":case 1:message.enumType=1;break;case"CLOSED":case 2:message.enumType=2;break}switch(object.repeatedFieldEncoding){default:if(typeof object.repeatedFieldEncoding==="number"){message.repeatedFieldEncoding=object.repeatedFieldEncoding;break}break;case"REPEATED_FIELD_ENCODING_UNKNOWN":case 0:message.repeatedFieldEncoding=0;break;case"PACKED":case 1:message.repeatedFieldEncoding=1;break;case"EXPANDED":case 2:message.repeatedFieldEncoding=2;break}switch(object.utf8Validation){default:if(typeof object.utf8Validation==="number"){message.utf8Validation=object.utf8Validation;break}break;case"UTF8_VALIDATION_UNKNOWN":case 0:message.utf8Validation=0;break;case"VERIFY":case 2:message.utf8Validation=2;break;case"NONE":case 3:message.utf8Validation=3;break}switch(object.messageEncoding){default:if(typeof object.messageEncoding==="number"){message.messageEncoding=object.messageEncoding;break}break;case"MESSAGE_ENCODING_UNKNOWN":case 0:message.messageEncoding=0;break;case"LENGTH_PREFIXED":case 1:message.messageEncoding=1;break;case"DELIMITED":case 2:message.messageEncoding=2;break}switch(object.jsonFormat){default:if(typeof object.jsonFormat==="number"){message.jsonFormat=object.jsonFormat;break}break;case"JSON_FORMAT_UNKNOWN":case 0:message.jsonFormat=0;break;case"ALLOW":case 1:message.jsonFormat=1;break;case"LEGACY_BEST_EFFORT":case 2:message.jsonFormat=2;break}switch(object.enforceNamingStyle){default:if(typeof object.enforceNamingStyle==="number"){message.enforceNamingStyle=object.enforceNamingStyle;break}break;case"ENFORCE_NAMING_STYLE_UNKNOWN":case 0:message.enforceNamingStyle=0;break;case"STYLE2024":case 1:message.enforceNamingStyle=1;break;case"STYLE_LEGACY":case 2:message.enforceNamingStyle=2;break;case"STYLE2026":case 3:message.enforceNamingStyle=3;break}switch(object.defaultSymbolVisibility){default:if(typeof object.defaultSymbolVisibility==="number"){message.defaultSymbolVisibility=object.defaultSymbolVisibility;break}break;case"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":case 0:message.defaultSymbolVisibility=0;break;case"EXPORT_ALL":case 1:message.defaultSymbolVisibility=1;break;case"EXPORT_TOP_LEVEL":case 2:message.defaultSymbolVisibility=2;break;case"LOCAL_ALL":case 3:message.defaultSymbolVisibility=3;break;case"STRICT":case 4:message.defaultSymbolVisibility=4;break}switch(object.enforceProtoLimits){default:if(typeof object.enforceProtoLimits==="number"){message.enforceProtoLimits=object.enforceProtoLimits;break}break;case"PROTO_LIMITS_UNKNOWN":case 0:message.enforceProtoLimits=0;break;case"LEGACY_NO_EXPLICIT_LIMITS":case 1:message.enforceProtoLimits=1;break;case"PROTO_LIMITS2026":case 2:message.enforceProtoLimits=2;break}return message};FeatureSet.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.fieldPresence=options.enums===String?"FIELD_PRESENCE_UNKNOWN":0;object.enumType=options.enums===String?"ENUM_TYPE_UNKNOWN":0;object.repeatedFieldEncoding=options.enums===String?"REPEATED_FIELD_ENCODING_UNKNOWN":0;object.utf8Validation=options.enums===String?"UTF8_VALIDATION_UNKNOWN":0;object.messageEncoding=options.enums===String?"MESSAGE_ENCODING_UNKNOWN":0;object.jsonFormat=options.enums===String?"JSON_FORMAT_UNKNOWN":0;object.enforceNamingStyle=options.enums===String?"ENFORCE_NAMING_STYLE_UNKNOWN":0;object.defaultSymbolVisibility=options.enums===String?"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":0;object.enforceProtoLimits=options.enums===String?"PROTO_LIMITS_UNKNOWN":0}if(message.fieldPresence!=null&&message.hasOwnProperty("fieldPresence"))object.fieldPresence=options.enums===String?$root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence]===undefined?message.fieldPresence:$root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence]:message.fieldPresence;if(message.enumType!=null&&message.hasOwnProperty("enumType"))object.enumType=options.enums===String?$root.google.protobuf.FeatureSet.EnumType[message.enumType]===undefined?message.enumType:$root.google.protobuf.FeatureSet.EnumType[message.enumType]:message.enumType;if(message.repeatedFieldEncoding!=null&&message.hasOwnProperty("repeatedFieldEncoding"))object.repeatedFieldEncoding=options.enums===String?$root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding]===undefined?message.repeatedFieldEncoding:$root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding]:message.repeatedFieldEncoding;if(message.utf8Validation!=null&&message.hasOwnProperty("utf8Validation"))object.utf8Validation=options.enums===String?$root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation]===undefined?message.utf8Validation:$root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation]:message.utf8Validation;if(message.messageEncoding!=null&&message.hasOwnProperty("messageEncoding"))object.messageEncoding=options.enums===String?$root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding]===undefined?message.messageEncoding:$root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding]:message.messageEncoding;if(message.jsonFormat!=null&&message.hasOwnProperty("jsonFormat"))object.jsonFormat=options.enums===String?$root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat]===undefined?message.jsonFormat:$root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat]:message.jsonFormat;if(message.enforceNamingStyle!=null&&message.hasOwnProperty("enforceNamingStyle"))object.enforceNamingStyle=options.enums===String?$root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle]===undefined?message.enforceNamingStyle:$root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle]:message.enforceNamingStyle;if(message.defaultSymbolVisibility!=null&&message.hasOwnProperty("defaultSymbolVisibility"))object.defaultSymbolVisibility=options.enums===String?$root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility]===undefined?message.defaultSymbolVisibility:$root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility]:message.defaultSymbolVisibility;if(message.enforceProtoLimits!=null&&message.hasOwnProperty("enforceProtoLimits"))object.enforceProtoLimits=options.enums===String?$root.google.protobuf.FeatureSet.ProtoLimitsFeature.EnforceProtoLimits[message.enforceProtoLimits]===undefined?message.enforceProtoLimits:$root.google.protobuf.FeatureSet.ProtoLimitsFeature.EnforceProtoLimits[message.enforceProtoLimits]:message.enforceProtoLimits;return object};FeatureSet.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSet.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet"};FeatureSet.FieldPresence=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FIELD_PRESENCE_UNKNOWN"]=0;values[valuesById[1]="EXPLICIT"]=1;values[valuesById[2]="IMPLICIT"]=2;values[valuesById[3]="LEGACY_REQUIRED"]=3;return values}();FeatureSet.EnumType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENUM_TYPE_UNKNOWN"]=0;values[valuesById[1]="OPEN"]=1;values[valuesById[2]="CLOSED"]=2;return values}();FeatureSet.RepeatedFieldEncoding=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="REPEATED_FIELD_ENCODING_UNKNOWN"]=0;values[valuesById[1]="PACKED"]=1;values[valuesById[2]="EXPANDED"]=2;return values}();FeatureSet.Utf8Validation=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UTF8_VALIDATION_UNKNOWN"]=0;values[valuesById[2]="VERIFY"]=2;values[valuesById[3]="NONE"]=3;return values}();FeatureSet.MessageEncoding=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MESSAGE_ENCODING_UNKNOWN"]=0;values[valuesById[1]="LENGTH_PREFIXED"]=1;values[valuesById[2]="DELIMITED"]=2;return values}();FeatureSet.JsonFormat=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="JSON_FORMAT_UNKNOWN"]=0;values[valuesById[1]="ALLOW"]=1;values[valuesById[2]="LEGACY_BEST_EFFORT"]=2;return values}();FeatureSet.EnforceNamingStyle=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENFORCE_NAMING_STYLE_UNKNOWN"]=0;values[valuesById[1]="STYLE2024"]=1;values[valuesById[2]="STYLE_LEGACY"]=2;values[valuesById[3]="STYLE2026"]=3;return values}();FeatureSet.VisibilityFeature=function(){function VisibilityFeature(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet.VisibilityFeature;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};VisibilityFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};VisibilityFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};VisibilityFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.FeatureSet.VisibilityFeature};VisibilityFeature.toObject=function toObject(){return{}};VisibilityFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};VisibilityFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet.VisibilityFeature"};VisibilityFeature.DefaultSymbolVisibility=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"]=0;values[valuesById[1]="EXPORT_ALL"]=1;values[valuesById[2]="EXPORT_TOP_LEVEL"]=2;values[valuesById[3]="LOCAL_ALL"]=3;values[valuesById[4]="STRICT"]=4;return values}();return VisibilityFeature}();FeatureSet.ProtoLimitsFeature=function(){function ProtoLimitsFeature(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet.ProtoLimitsFeature;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};ProtoLimitsFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ProtoLimitsFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};ProtoLimitsFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet.ProtoLimitsFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.FeatureSet.ProtoLimitsFeature};ProtoLimitsFeature.toObject=function toObject(){return{}};ProtoLimitsFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ProtoLimitsFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet.ProtoLimitsFeature"};ProtoLimitsFeature.EnforceProtoLimits=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PROTO_LIMITS_UNKNOWN"]=0;values[valuesById[1]="LEGACY_NO_EXPLICIT_LIMITS"]=1;values[valuesById[2]="PROTO_LIMITS2026"]=2;return values}();return ProtoLimitsFeature}();return FeatureSet}();protobuf.FeatureSetDefaults=function(){function FeatureSetDefaults(properties){this.defaults=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSetDefaults;while(reader.pos>>3){case 1:{if(!(message.defaults&&message.defaults.length))message.defaults=[];message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.minimumEdition=reader.int32();break}case 5:{message.maximumEdition=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSetDefaults.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSetDefaults.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.defaults!=null&&message.hasOwnProperty("defaults")){if(!Array.isArray(message.defaults))return"defaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSetDefaults;if(object.defaults){if(!Array.isArray(object.defaults))throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected");message.defaults=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;while(reader.pos>>3){case 3:{message.edition=reader.int32();break}case 4:{message.overridableFeatures=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.fixedFeatures=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};FeatureSetEditionDefault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSetEditionDefault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.overridableFeatures!=null&&message.hasOwnProperty("overridableFeatures")){var error=$root.google.protobuf.FeatureSet.verify(message.overridableFeatures,long+1);if(error)return"overridableFeatures."+error}if(message.fixedFeatures!=null&&message.hasOwnProperty("fixedFeatures")){var error=$root.google.protobuf.FeatureSet.verify(message.fixedFeatures,long+1);if(error)return"fixedFeatures."+error}return null};FeatureSetEditionDefault.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;switch(object.edition){default:if(typeof object.edition==="number"){message.edition=object.edition;break}break;case"EDITION_UNKNOWN":case 0:message.edition=0;break;case"EDITION_LEGACY":case 900:message.edition=900;break;case"EDITION_PROTO2":case 998:message.edition=998;break;case"EDITION_PROTO3":case 999:message.edition=999;break;case"EDITION_2023":case 1e3:message.edition=1e3;break;case"EDITION_2024":case 1001:message.edition=1001;break;case"EDITION_2026":case 1002:message.edition=1002;break;case"EDITION_UNSTABLE":case 9999:message.edition=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:message.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.edition=99999;break;case"EDITION_MAX":case 2147483647:message.edition=2147483647;break}if(object.overridableFeatures!=null){if(typeof object.overridableFeatures!=="object")throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected");message.overridableFeatures=$root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures,long+1)}if(object.fixedFeatures!=null){if(typeof object.fixedFeatures!=="object")throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected");message.fixedFeatures=$root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures,long+1)}return message};FeatureSetEditionDefault.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.edition=options.enums===String?"EDITION_UNKNOWN":0;object.overridableFeatures=null;object.fixedFeatures=null}if(message.edition!=null&&message.hasOwnProperty("edition"))object.edition=options.enums===String?$root.google.protobuf.Edition[message.edition]===undefined?message.edition:$root.google.protobuf.Edition[message.edition]:message.edition;if(message.overridableFeatures!=null&&message.hasOwnProperty("overridableFeatures"))object.overridableFeatures=$root.google.protobuf.FeatureSet.toObject(message.overridableFeatures,options);if(message.fixedFeatures!=null&&message.hasOwnProperty("fixedFeatures"))object.fixedFeatures=$root.google.protobuf.FeatureSet.toObject(message.fixedFeatures,options);return object};FeatureSetEditionDefault.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSetEditionDefault.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"};return FeatureSetEditionDefault}();return FeatureSetDefaults}();protobuf.SourceCodeInfo=function(){function SourceCodeInfo(properties){this.location=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.SourceCodeInfo;while(reader.pos>>3){case 1:{if(!(message.location&&message.location.length))message.location=[];message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};SourceCodeInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SourceCodeInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.location!=null&&message.hasOwnProperty("location")){if(!Array.isArray(message.location))return"location: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.SourceCodeInfo;if(object.location){if(!Array.isArray(object.location))throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");message.location=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.SourceCodeInfo.Location;while(reader.pos>>3){case 1:{if(!(message.path&&message.path.length))message.path=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.path!=null&&message.hasOwnProperty("path")){if(!Array.isArray(message.path))return"path: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.SourceCodeInfo.Location;if(object.path){if(!Array.isArray(object.path))throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");message.path=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.GeneratedCodeInfo;while(reader.pos>>3){case 1:{if(!(message.annotation&&message.annotation.length))message.annotation=[];message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};GeneratedCodeInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GeneratedCodeInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.annotation!=null&&message.hasOwnProperty("annotation")){if(!Array.isArray(message.annotation))return"annotation: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.GeneratedCodeInfo;if(object.annotation){if(!Array.isArray(object.annotation))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");message.annotation=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.GeneratedCodeInfo.Annotation;while(reader.pos>>3){case 1:{if(!(message.path&&message.path.length))message.path=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.path!=null&&message.hasOwnProperty("path")){if(!Array.isArray(message.path))return"path: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.GeneratedCodeInfo.Annotation;if(object.path){if(!Array.isArray(object.path))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");message.path=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Duration;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Duration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Duration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected";if(message.nanos!=null&&message.hasOwnProperty("nanos"))if(!$util.isInteger(message.nanos))return"nanos: integer expected";return null};Duration.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Duration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Duration;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};Duration.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.seconds=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.seconds=options.longs===String?"0":0;object.nanos=0}if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(message.nanos!=null&&message.hasOwnProperty("nanos"))object.nanos=message.nanos;return object};Duration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Duration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Duration"};return Duration}();protobuf.FieldMask=function(){function FieldMask(properties){this.paths=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldMask;while(reader.pos>>3){case 1:{if(!(message.paths&&message.paths.length))message.paths=[];message.paths.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};FieldMask.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldMask.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.paths!=null&&message.hasOwnProperty("paths")){if(!Array.isArray(message.paths))return"paths: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldMask;if(object.paths){if(!Array.isArray(object.paths))throw TypeError(".google.protobuf.FieldMask.paths: array expected");message.paths=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Timestamp;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Timestamp.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Timestamp.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected";if(message.nanos!=null&&message.hasOwnProperty("nanos"))if(!$util.isInteger(message.nanos))return"nanos: integer expected";return null};Timestamp.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Timestamp)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Timestamp;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};Timestamp.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.seconds=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.seconds=options.longs===String?"0":0;object.nanos=0}if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(message.nanos!=null&&message.hasOwnProperty("nanos"))object.nanos=message.nanos;return object};Timestamp.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Timestamp.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Timestamp"};return Timestamp}();protobuf.Any=function(){function Any(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Any;while(reader.pos>>3){case 1:{message.type_url=reader.string();break}case 2:{message.value=reader.bytes();break}default:reader.skipType(tag&7,long);break}}return message};Any.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Any.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type_url!=null&&message.hasOwnProperty("type_url"))if(!$util.isString(message.type_url))return"type_url: string expected";if(message.value!=null&&message.hasOwnProperty("value"))if(!(message.value&&typeof message.value.length==="number"||$util.isString(message.value)))return"value: buffer expected";return null};Any.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Any)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Any;if(object.type_url!=null)message.type_url=String(object.type_url);if(object.value!=null)if(typeof object.value==="string")$util.base64.decode(object.value,message.value=$util.newBuffer($util.base64.length(object.value)),0);else if(object.value.length>=0)message.value=object.value;return message};Any.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type_url="";if(options.bytes===String)object.value="";else{object.value=[];if(options.bytes!==Array)object.value=$util.newBuffer(object.value)}}if(message.type_url!=null&&message.hasOwnProperty("type_url"))object.type_url=message.type_url;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.bytes===String?$util.base64.encode(message.value,0,message.value.length):options.bytes===Array?Array.prototype.slice.call(message.value):message.value;return object};Any.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Any.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Any"};return Any}();protobuf.Empty=function(){function Empty(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Empty;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};Empty.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Empty.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};Empty.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Empty)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.Empty};Empty.toObject=function toObject(){return{}};Empty.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Empty.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Empty"};return Empty}();protobuf.DoubleValue=function(){function DoubleValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DoubleValue;while(reader.pos>>3){case 1:{message.value=reader.double();break}default:reader.skipType(tag&7,long);break}}return message};DoubleValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DoubleValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="number")return"value: number expected";return null};DoubleValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DoubleValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DoubleValue;if(object.value!=null)message.value=Number(object.value);return message};DoubleValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.json&&!isFinite(message.value)?String(message.value):message.value;return object};DoubleValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DoubleValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DoubleValue"};return DoubleValue}();protobuf.FloatValue=function(){function FloatValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FloatValue;while(reader.pos>>3){case 1:{message.value=reader.float();break}default:reader.skipType(tag&7,long);break}}return message};FloatValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FloatValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="number")return"value: number expected";return null};FloatValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FloatValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FloatValue;if(object.value!=null)message.value=Number(object.value);return message};FloatValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.json&&!isFinite(message.value)?String(message.value):message.value;return object};FloatValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FloatValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FloatValue"};return FloatValue}();protobuf.Int64Value=function(){function Int64Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Int64Value;while(reader.pos>>3){case 1:{message.value=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};Int64Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Int64Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value)&&!(message.value&&$util.isInteger(message.value.low)&&$util.isInteger(message.value.high)))return"value: integer|Long expected";return null};Int64Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Int64Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Int64Value;if(object.value!=null)if($util.Long)(message.value=$util.Long.fromValue(object.value)).unsigned=false;else if(typeof object.value==="string")message.value=parseInt(object.value,10);else if(typeof object.value==="number")message.value=object.value;else if(typeof object.value==="object")message.value=new $util.LongBits(object.value.low>>>0,object.value.high>>>0).toNumber();return message};Int64Value.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.value=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.value=options.longs===String?"0":0;if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value==="number")object.value=options.longs===String?String(message.value):message.value;else object.value=options.longs===String?$util.Long.prototype.toString.call(message.value):options.longs===Number?new $util.LongBits(message.value.low>>>0,message.value.high>>>0).toNumber():message.value;return object};Int64Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Int64Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Int64Value"};return Int64Value}();protobuf.UInt64Value=function(){function UInt64Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UInt64Value;while(reader.pos>>3){case 1:{message.value=reader.uint64();break}default:reader.skipType(tag&7,long);break}}return message};UInt64Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UInt64Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value)&&!(message.value&&$util.isInteger(message.value.low)&&$util.isInteger(message.value.high)))return"value: integer|Long expected";return null};UInt64Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UInt64Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UInt64Value;if(object.value!=null)if($util.Long)(message.value=$util.Long.fromValue(object.value)).unsigned=true;else if(typeof object.value==="string")message.value=parseInt(object.value,10);else if(typeof object.value==="number")message.value=object.value;else if(typeof object.value==="object")message.value=new $util.LongBits(object.value.low>>>0,object.value.high>>>0).toNumber(true);return message};UInt64Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)if($util.Long){var long=new $util.Long(0,0,true);object.value=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.value=options.longs===String?"0":0;if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value==="number")object.value=options.longs===String?String(message.value):message.value;else object.value=options.longs===String?$util.Long.prototype.toString.call(message.value):options.longs===Number?new $util.LongBits(message.value.low>>>0,message.value.high>>>0).toNumber(true):message.value;return object};UInt64Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UInt64Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UInt64Value"};return UInt64Value}();protobuf.Int32Value=function(){function Int32Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Int32Value;while(reader.pos>>3){case 1:{message.value=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Int32Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Int32Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value))return"value: integer expected";return null};Int32Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Int32Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Int32Value;if(object.value!=null)message.value=object.value|0;return message};Int32Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};Int32Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Int32Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Int32Value"};return Int32Value}();protobuf.UInt32Value=function(){function UInt32Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UInt32Value;while(reader.pos>>3){case 1:{message.value=reader.uint32();break}default:reader.skipType(tag&7,long);break}}return message};UInt32Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UInt32Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value))return"value: integer expected";return null};UInt32Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UInt32Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UInt32Value;if(object.value!=null)message.value=object.value>>>0;return message};UInt32Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};UInt32Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UInt32Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UInt32Value"};return UInt32Value}();protobuf.BoolValue=function(){function BoolValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.BoolValue;while(reader.pos>>3){case 1:{message.value=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};BoolValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BoolValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="boolean")return"value: boolean expected";return null};BoolValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.BoolValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.BoolValue;if(object.value!=null)message.value=Boolean(object.value);return message};BoolValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=false;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};BoolValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BoolValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.BoolValue"};return BoolValue}();protobuf.StringValue=function(){function StringValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.StringValue;while(reader.pos>>3){case 1:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};StringValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};StringValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isString(message.value))return"value: string expected";return null};StringValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.StringValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.StringValue;if(object.value!=null)message.value=String(object.value);return message};StringValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value="";if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};StringValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};StringValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.StringValue"};return StringValue}();protobuf.BytesValue=function(){function BytesValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.BytesValue;while(reader.pos>>3){case 1:{message.value=reader.bytes();break}default:reader.skipType(tag&7,long);break}}return message};BytesValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BytesValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!(message.value&&typeof message.value.length==="number"||$util.isString(message.value)))return"value: buffer expected";return null};BytesValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.BytesValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.BytesValue;if(object.value!=null)if(typeof object.value==="string")$util.base64.decode(object.value,message.value=$util.newBuffer($util.base64.length(object.value)),0);else if(object.value.length>=0)message.value=object.value;return message};BytesValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)if(options.bytes===String)object.value="";else{object.value=[];if(options.bytes!==Array)object.value=$util.newBuffer(object.value)}if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.bytes===String?$util.base64.encode(message.value,0,message.value.length):options.bytes===Array?Array.prototype.slice.call(message.value):message.value;return object};BytesValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BytesValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.BytesValue"};return BytesValue}();return protobuf}();google.type=function(){var type={};type.DayOfWeek=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DAY_OF_WEEK_UNSPECIFIED"]=0;values[valuesById[1]="MONDAY"]=1;values[valuesById[2]="TUESDAY"]=2;values[valuesById[3]="WEDNESDAY"]=3;values[valuesById[4]="THURSDAY"]=4;values[valuesById[5]="FRIDAY"]=5;values[valuesById[6]="SATURDAY"]=6;values[valuesById[7]="SUNDAY"]=7;return values}();type.Month=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MONTH_UNSPECIFIED"]=0;values[valuesById[1]="JANUARY"]=1;values[valuesById[2]="FEBRUARY"]=2;values[valuesById[3]="MARCH"]=3;values[valuesById[4]="APRIL"]=4;values[valuesById[5]="MAY"]=5;values[valuesById[6]="JUNE"]=6;values[valuesById[7]="JULY"]=7;values[valuesById[8]="AUGUST"]=8;values[valuesById[9]="SEPTEMBER"]=9;values[valuesById[10]="OCTOBER"]=10;values[valuesById[11]="NOVEMBER"]=11;values[valuesById[12]="DECEMBER"]=12;return values}();return type}();google.rpc=function(){var rpc={};rpc.Status=function(){function Status(properties){this.details=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.rpc.Status;while(reader.pos>>3){case 1:{message.code=reader.int32();break}case 2:{message.message=reader.string();break}case 3:{if(!(message.details&&message.details.length))message.details=[];message.details.push($root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Status.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Status.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.code!=null&&message.hasOwnProperty("code"))if(!$util.isInteger(message.code))return"code: integer expected";if(message.message!=null&&message.hasOwnProperty("message"))if(!$util.isString(message.message))return"message: string expected";if(message.details!=null&&message.hasOwnProperty("details")){if(!Array.isArray(message.details))return"details: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.rpc.Status;if(object.code!=null)message.code=object.code|0;if(object.message!=null)message.message=String(object.message);if(object.details){if(!Array.isArray(object.details))throw TypeError(".google.rpc.Status.details: array expected");message.details=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.Operation;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.metadata=$root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.done=reader.bool();break}case 4:{message.error=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.response=$root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};Operation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Operation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.metadata!=null&&message.hasOwnProperty("metadata")){var error=$root.google.protobuf.Any.verify(message.metadata,long+1);if(error)return"metadata."+error}if(message.done!=null&&message.hasOwnProperty("done"))if(typeof message.done!=="boolean")return"done: boolean expected";if(message.error!=null&&message.hasOwnProperty("error")){properties.result=1;{var error=$root.google.rpc.Status.verify(message.error,long+1);if(error)return"error."+error}}if(message.response!=null&&message.hasOwnProperty("response")){if(properties.result===1)return"result: multiple values";properties.result=1;{var error=$root.google.protobuf.Any.verify(message.response,long+1);if(error)return"response."+error}}return null};Operation.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.Operation)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.Operation;if(object.name!=null)message.name=String(object.name);if(object.metadata!=null){if(typeof object.metadata!=="object")throw TypeError(".google.longrunning.Operation.metadata: object expected");message.metadata=$root.google.protobuf.Any.fromObject(object.metadata,long+1)}if(object.done!=null)message.done=Boolean(object.done);if(object.error!=null){if(typeof object.error!=="object")throw TypeError(".google.longrunning.Operation.error: object expected");message.error=$root.google.rpc.Status.fromObject(object.error,long+1)}if(object.response!=null){if(typeof object.response!=="object")throw TypeError(".google.longrunning.Operation.response: object expected");message.response=$root.google.protobuf.Any.fromObject(object.response,long+1)}return message};Operation.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.metadata=null;object.done=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.metadata!=null&&message.hasOwnProperty("metadata"))object.metadata=$root.google.protobuf.Any.toObject(message.metadata,options);if(message.done!=null&&message.hasOwnProperty("done"))object.done=message.done;if(message.error!=null&&message.hasOwnProperty("error")){object.error=$root.google.rpc.Status.toObject(message.error,options);if(options.oneofs)object.result="error"}if(message.response!=null&&message.hasOwnProperty("response")){object.response=$root.google.protobuf.Any.toObject(message.response,options);if(options.oneofs)object.result="response"}return object};Operation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Operation.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.Operation"};return Operation}();longrunning.GetOperationRequest=function(){function GetOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.GetOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.GetOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.GetOperationRequest;if(object.name!=null)message.name=String(object.name);return message};GetOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.GetOperationRequest"};return GetOperationRequest}();longrunning.ListOperationsRequest=function(){function ListOperationsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.ListOperationsRequest;while(reader.pos>>3){case 4:{message.name=reader.string();break}case 1:{message.filter=reader.string();break}case 2:{message.pageSize=reader.int32();break}case 3:{message.pageToken=reader.string();break}case 5:{message.returnPartialSuccess=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ListOperationsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListOperationsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.filter!=null&&message.hasOwnProperty("filter"))if(!$util.isString(message.filter))return"filter: 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.returnPartialSuccess!=null&&message.hasOwnProperty("returnPartialSuccess"))if(typeof message.returnPartialSuccess!=="boolean")return"returnPartialSuccess: boolean expected";return null};ListOperationsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.ListOperationsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.ListOperationsRequest;if(object.name!=null)message.name=String(object.name);if(object.filter!=null)message.filter=String(object.filter);if(object.pageSize!=null)message.pageSize=object.pageSize|0;if(object.pageToken!=null)message.pageToken=String(object.pageToken);if(object.returnPartialSuccess!=null)message.returnPartialSuccess=Boolean(object.returnPartialSuccess);return message};ListOperationsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.filter="";object.pageSize=0;object.pageToken="";object.name="";object.returnPartialSuccess=false}if(message.filter!=null&&message.hasOwnProperty("filter"))object.filter=message.filter;if(message.pageSize!=null&&message.hasOwnProperty("pageSize"))object.pageSize=message.pageSize;if(message.pageToken!=null&&message.hasOwnProperty("pageToken"))object.pageToken=message.pageToken;if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.returnPartialSuccess!=null&&message.hasOwnProperty("returnPartialSuccess"))object.returnPartialSuccess=message.returnPartialSuccess;return object};ListOperationsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListOperationsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.ListOperationsRequest"};return ListOperationsRequest}();longrunning.ListOperationsResponse=function(){function ListOperationsResponse(properties){this.operations=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.ListOperationsResponse;while(reader.pos>>3){case 1:{if(!(message.operations&&message.operations.length))message.operations=[];message.operations.push($root.google.longrunning.Operation.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListOperationsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListOperationsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.operations!=null&&message.hasOwnProperty("operations")){if(!Array.isArray(message.operations))return"operations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.ListOperationsResponse;if(object.operations){if(!Array.isArray(object.operations))throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");message.operations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.CancelOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CancelOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CancelOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};CancelOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.CancelOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.CancelOperationRequest;if(object.name!=null)message.name=String(object.name);return message};CancelOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};CancelOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CancelOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.CancelOperationRequest"};return CancelOperationRequest}();longrunning.DeleteOperationRequest=function(){function DeleteOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.DeleteOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};DeleteOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.DeleteOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.DeleteOperationRequest;if(object.name!=null)message.name=String(object.name);return message};DeleteOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};DeleteOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.DeleteOperationRequest"};return DeleteOperationRequest}();longrunning.WaitOperationRequest=function(){function WaitOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.WaitOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.timeout=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};WaitOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WaitOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.timeout!=null&&message.hasOwnProperty("timeout")){var error=$root.google.protobuf.Duration.verify(message.timeout,long+1);if(error)return"timeout."+error}return null};WaitOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.WaitOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.WaitOperationRequest;if(object.name!=null)message.name=String(object.name);if(object.timeout!=null){if(typeof object.timeout!=="object")throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");message.timeout=$root.google.protobuf.Duration.fromObject(object.timeout,long+1)}return message};WaitOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.timeout=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.timeout!=null&&message.hasOwnProperty("timeout"))object.timeout=$root.google.protobuf.Duration.toObject(message.timeout,options);return object};WaitOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WaitOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.WaitOperationRequest"};return WaitOperationRequest}();longrunning.OperationInfo=function(){function OperationInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.OperationInfo;while(reader.pos>>3){case 1:{message.responseType=reader.string();break}case 2:{message.metadataType=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};OperationInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OperationInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.responseType!=null&&message.hasOwnProperty("responseType"))if(!$util.isString(message.responseType))return"responseType: string expected";if(message.metadataType!=null&&message.hasOwnProperty("metadataType"))if(!$util.isString(message.metadataType))return"metadataType: string expected";return null};OperationInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.OperationInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.OperationInfo;if(object.responseType!=null)message.responseType=String(object.responseType);if(object.metadataType!=null)message.metadataType=String(object.metadataType);return message};OperationInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.responseType="";object.metadataType=""}if(message.responseType!=null&&message.hasOwnProperty("responseType"))object.responseType=message.responseType;if(message.metadataType!=null&&message.hasOwnProperty("metadataType"))object.metadataType=message.metadataType;return object};OperationInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OperationInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.OperationInfo"};return OperationInfo}();return longrunning}();return google}();return $root}); \ No newline at end of file +(function(global,factory){if(typeof define==="function"&&define.amd)define(["protobufjs/minimal"],factory);else if(typeof require==="function"&&typeof module==="object"&&module&&module.exports)module.exports=factory(require("google-gax/build/src/protobuf").protobufMinimal)})(this,function($protobuf){"use strict";var $Reader=$protobuf.Reader,$Writer=$protobuf.Writer,$util=$protobuf.util;var $root=$protobuf.roots._google_cloud_backupdr_protos||($protobuf.roots._google_cloud_backupdr_protos={});$root.google=function(){var google={};google.cloud=function(){var cloud={};cloud.backupdr=function(){var backupdr={};backupdr.v1=function(){var v1={};v1.BackupDR=function(){function BackupDR(rpcImpl,requestDelimited,responseDelimited){$protobuf.rpc.Service.call(this,rpcImpl,requestDelimited,responseDelimited)}(BackupDR.prototype=Object.create($protobuf.rpc.Service.prototype)).constructor=BackupDR;BackupDR.create=function create(rpcImpl,requestDelimited,responseDelimited){return new this(rpcImpl,requestDelimited,responseDelimited)};Object.defineProperty(BackupDR.prototype.listManagementServers=function listManagementServers(request,callback){return this.rpcCall(listManagementServers,$root.google.cloud.backupdr.v1.ListManagementServersRequest,$root.google.cloud.backupdr.v1.ListManagementServersResponse,request,callback)},"name",{value:"ListManagementServers"});Object.defineProperty(BackupDR.prototype.getManagementServer=function getManagementServer(request,callback){return this.rpcCall(getManagementServer,$root.google.cloud.backupdr.v1.GetManagementServerRequest,$root.google.cloud.backupdr.v1.ManagementServer,request,callback)},"name",{value:"GetManagementServer"});Object.defineProperty(BackupDR.prototype.createManagementServer=function createManagementServer(request,callback){return this.rpcCall(createManagementServer,$root.google.cloud.backupdr.v1.CreateManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateManagementServer"});Object.defineProperty(BackupDR.prototype.deleteManagementServer=function deleteManagementServer(request,callback){return this.rpcCall(deleteManagementServer,$root.google.cloud.backupdr.v1.DeleteManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteManagementServer"});Object.defineProperty(BackupDR.prototype.createBackupVault=function createBackupVault(request,callback){return this.rpcCall(createBackupVault,$root.google.cloud.backupdr.v1.CreateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupVault"});Object.defineProperty(BackupDR.prototype.listBackupVaults=function listBackupVaults(request,callback){return this.rpcCall(listBackupVaults,$root.google.cloud.backupdr.v1.ListBackupVaultsRequest,$root.google.cloud.backupdr.v1.ListBackupVaultsResponse,request,callback)},"name",{value:"ListBackupVaults"});Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults=function fetchUsableBackupVaults(request,callback){return this.rpcCall(fetchUsableBackupVaults,$root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest,$root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse,request,callback)},"name",{value:"FetchUsableBackupVaults"});Object.defineProperty(BackupDR.prototype.getBackupVault=function getBackupVault(request,callback){return this.rpcCall(getBackupVault,$root.google.cloud.backupdr.v1.GetBackupVaultRequest,$root.google.cloud.backupdr.v1.BackupVault,request,callback)},"name",{value:"GetBackupVault"});Object.defineProperty(BackupDR.prototype.updateBackupVault=function updateBackupVault(request,callback){return this.rpcCall(updateBackupVault,$root.google.cloud.backupdr.v1.UpdateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupVault"});Object.defineProperty(BackupDR.prototype.deleteBackupVault=function deleteBackupVault(request,callback){return this.rpcCall(deleteBackupVault,$root.google.cloud.backupdr.v1.DeleteBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupVault"});Object.defineProperty(BackupDR.prototype.listDataSources=function listDataSources(request,callback){return this.rpcCall(listDataSources,$root.google.cloud.backupdr.v1.ListDataSourcesRequest,$root.google.cloud.backupdr.v1.ListDataSourcesResponse,request,callback)},"name",{value:"ListDataSources"});Object.defineProperty(BackupDR.prototype.getDataSource=function getDataSource(request,callback){return this.rpcCall(getDataSource,$root.google.cloud.backupdr.v1.GetDataSourceRequest,$root.google.cloud.backupdr.v1.DataSource,request,callback)},"name",{value:"GetDataSource"});Object.defineProperty(BackupDR.prototype.updateDataSource=function updateDataSource(request,callback){return this.rpcCall(updateDataSource,$root.google.cloud.backupdr.v1.UpdateDataSourceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateDataSource"});Object.defineProperty(BackupDR.prototype.listBackups=function listBackups(request,callback){return this.rpcCall(listBackups,$root.google.cloud.backupdr.v1.ListBackupsRequest,$root.google.cloud.backupdr.v1.ListBackupsResponse,request,callback)},"name",{value:"ListBackups"});Object.defineProperty(BackupDR.prototype.fetchBackupsForResourceType=function fetchBackupsForResourceType(request,callback){return this.rpcCall(fetchBackupsForResourceType,$root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupsForResourceType"});Object.defineProperty(BackupDR.prototype.getBackup=function getBackup(request,callback){return this.rpcCall(getBackup,$root.google.cloud.backupdr.v1.GetBackupRequest,$root.google.cloud.backupdr.v1.Backup,request,callback)},"name",{value:"GetBackup"});Object.defineProperty(BackupDR.prototype.updateBackup=function updateBackup(request,callback){return this.rpcCall(updateBackup,$root.google.cloud.backupdr.v1.UpdateBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackup"});Object.defineProperty(BackupDR.prototype.deleteBackup=function deleteBackup(request,callback){return this.rpcCall(deleteBackup,$root.google.cloud.backupdr.v1.DeleteBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackup"});Object.defineProperty(BackupDR.prototype.restoreBackup=function restoreBackup(request,callback){return this.rpcCall(restoreBackup,$root.google.cloud.backupdr.v1.RestoreBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"RestoreBackup"});Object.defineProperty(BackupDR.prototype.createBackupPlan=function createBackupPlan(request,callback){return this.rpcCall(createBackupPlan,$root.google.cloud.backupdr.v1.CreateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlan"});Object.defineProperty(BackupDR.prototype.updateBackupPlan=function updateBackupPlan(request,callback){return this.rpcCall(updateBackupPlan,$root.google.cloud.backupdr.v1.UpdateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlan=function getBackupPlan(request,callback){return this.rpcCall(getBackupPlan,$root.google.cloud.backupdr.v1.GetBackupPlanRequest,$root.google.cloud.backupdr.v1.BackupPlan,request,callback)},"name",{value:"GetBackupPlan"});Object.defineProperty(BackupDR.prototype.listBackupPlans=function listBackupPlans(request,callback){return this.rpcCall(listBackupPlans,$root.google.cloud.backupdr.v1.ListBackupPlansRequest,$root.google.cloud.backupdr.v1.ListBackupPlansResponse,request,callback)},"name",{value:"ListBackupPlans"});Object.defineProperty(BackupDR.prototype.deleteBackupPlan=function deleteBackupPlan(request,callback){return this.rpcCall(deleteBackupPlan,$root.google.cloud.backupdr.v1.DeleteBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlanRevision=function getBackupPlanRevision(request,callback){return this.rpcCall(getBackupPlanRevision,$root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest,$root.google.cloud.backupdr.v1.BackupPlanRevision,request,callback)},"name",{value:"GetBackupPlanRevision"});Object.defineProperty(BackupDR.prototype.listBackupPlanRevisions=function listBackupPlanRevisions(request,callback){return this.rpcCall(listBackupPlanRevisions,$root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest,$root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse,request,callback)},"name",{value:"ListBackupPlanRevisions"});Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation=function createBackupPlanAssociation(request,callback){return this.rpcCall(createBackupPlanAssociation,$root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.updateBackupPlanAssociation=function updateBackupPlanAssociation(request,callback){return this.rpcCall(updateBackupPlanAssociation,$root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation=function getBackupPlanAssociation(request,callback){return this.rpcCall(getBackupPlanAssociation,$root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest,$root.google.cloud.backupdr.v1.BackupPlanAssociation,request,callback)},"name",{value:"GetBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations=function listBackupPlanAssociations(request,callback){return this.rpcCall(listBackupPlanAssociations,$root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest,$root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse,request,callback)},"name",{value:"ListBackupPlanAssociations"});Object.defineProperty(BackupDR.prototype.fetchBackupPlanAssociationsForResourceType=function fetchBackupPlanAssociationsForResourceType(request,callback){return this.rpcCall(fetchBackupPlanAssociationsForResourceType,$root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupPlanAssociationsForResourceType"});Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation=function deleteBackupPlanAssociation(request,callback){return this.rpcCall(deleteBackupPlanAssociation,$root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.triggerBackup=function triggerBackup(request,callback){return this.rpcCall(triggerBackup,$root.google.cloud.backupdr.v1.TriggerBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"TriggerBackup"});Object.defineProperty(BackupDR.prototype.getDataSourceReference=function getDataSourceReference(request,callback){return this.rpcCall(getDataSourceReference,$root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest,$root.google.cloud.backupdr.v1.DataSourceReference,request,callback)},"name",{value:"GetDataSourceReference"});Object.defineProperty(BackupDR.prototype.listDataSourceReferences=function listDataSourceReferences(request,callback){return this.rpcCall(listDataSourceReferences,$root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest,$root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse,request,callback)},"name",{value:"ListDataSourceReferences"});Object.defineProperty(BackupDR.prototype.fetchDataSourceReferencesForResourceType=function fetchDataSourceReferencesForResourceType(request,callback){return this.rpcCall(fetchDataSourceReferencesForResourceType,$root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest,$root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse,request,callback)},"name",{value:"FetchDataSourceReferencesForResourceType"});Object.defineProperty(BackupDR.prototype.initializeService=function initializeService(request,callback){return this.rpcCall(initializeService,$root.google.cloud.backupdr.v1.InitializeServiceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"InitializeService"});return BackupDR}();v1.NetworkConfig=function(){function NetworkConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkConfig;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.peeringMode=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.network!=null&&message.hasOwnProperty("network"))if(!$util.isString(message.network))return"network: string expected";if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))switch(message.peeringMode){default:return"peeringMode: enum value expected";case 0:case 1:break}return null};NetworkConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.NetworkConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkConfig;if(object.network!=null)message.network=String(object.network);switch(object.peeringMode){default:if(typeof object.peeringMode==="number"){message.peeringMode=object.peeringMode;break}break;case"PEERING_MODE_UNSPECIFIED":case 0:message.peeringMode=0;break;case"PRIVATE_SERVICE_ACCESS":case 1:message.peeringMode=1;break}return message};NetworkConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.network="";object.peeringMode=options.enums===String?"PEERING_MODE_UNSPECIFIED":0}if(message.network!=null&&message.hasOwnProperty("network"))object.network=message.network;if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))object.peeringMode=options.enums===String?$root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode]===undefined?message.peeringMode:$root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode]:message.peeringMode;return object};NetworkConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.NetworkConfig"};NetworkConfig.PeeringMode=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PEERING_MODE_UNSPECIFIED"]=0;values[valuesById[1]="PRIVATE_SERVICE_ACCESS"]=1;return values}();return NetworkConfig}();v1.ManagementURI=function(){function ManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ManagementURI;while(reader.pos>>3){case 1:{message.webUi=reader.string();break}case 2:{message.api=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.webUi!=null&&message.hasOwnProperty("webUi"))if(!$util.isString(message.webUi))return"webUi: string expected";if(message.api!=null&&message.hasOwnProperty("api"))if(!$util.isString(message.api))return"api: string expected";return null};ManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ManagementURI;if(object.webUi!=null)message.webUi=String(object.webUi);if(object.api!=null)message.api=String(object.api);return message};ManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.webUi="";object.api=""}if(message.webUi!=null&&message.hasOwnProperty("webUi"))object.webUi=message.webUi;if(message.api!=null&&message.hasOwnProperty("api"))object.api=message.api;return object};ManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ManagementURI"};return ManagementURI}();v1.WorkforceIdentityBasedManagementURI=function(){function WorkforceIdentityBasedManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};WorkforceIdentityBasedManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};WorkforceIdentityBasedManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};WorkforceIdentityBasedManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"};return WorkforceIdentityBasedManagementURI}();v1.WorkforceIdentityBasedOAuth2ClientID=function(){function WorkforceIdentityBasedOAuth2ClientID(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID;while(reader.pos>>3){case 1:{message.firstPartyOauth2ClientId=reader.string();break}case 2:{message.thirdPartyOauth2ClientId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedOAuth2ClientID.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedOAuth2ClientID.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))if(!$util.isString(message.firstPartyOauth2ClientId))return"firstPartyOauth2ClientId: string expected";if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))if(!$util.isString(message.thirdPartyOauth2ClientId))return"thirdPartyOauth2ClientId: string expected";return null};WorkforceIdentityBasedOAuth2ClientID.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID;if(object.firstPartyOauth2ClientId!=null)message.firstPartyOauth2ClientId=String(object.firstPartyOauth2ClientId);if(object.thirdPartyOauth2ClientId!=null)message.thirdPartyOauth2ClientId=String(object.thirdPartyOauth2ClientId);return message};WorkforceIdentityBasedOAuth2ClientID.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyOauth2ClientId="";object.thirdPartyOauth2ClientId=""}if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))object.firstPartyOauth2ClientId=message.firstPartyOauth2ClientId;if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))object.thirdPartyOauth2ClientId=message.thirdPartyOauth2ClientId;return object};WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedOAuth2ClientID.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"};return WorkforceIdentityBasedOAuth2ClientID}();v1.ManagementServer=function(){function ManagementServer(properties){this.labels={};this.networks=[];this.baProxyUri=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ManagementServer,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 9:{message.description=reader.string();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 2:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 14:{message.type=reader.int32();break}case 11:{message.managementUri=$root.google.cloud.backupdr.v1.ManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.workforceIdentityBasedManagementUri=$root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.networks&&message.networks.length))message.networks=[];message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 13:{message.etag=reader.string();break}case 15:{message.oauth2ClientId=reader.string();break}case 17:{message.workforceIdentityBasedOauth2ClientId=$root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader,reader.uint32(),undefined,long+1);break}case 18:{if(!(message.baProxyUri&&message.baProxyUri.length))message.baProxyUri=[];message.baProxyUri.push(reader.string());break}case 19:{message.satisfiesPzs=$root.google.protobuf.BoolValue.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.satisfiesPzi=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ManagementServer.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementServer.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ManagementServer;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.ManagementServer.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListManagementServersRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListManagementServersRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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")){properties._filter=1;if(!$util.isString(message.filter))return"filter: string expected"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){properties._orderBy=1;if(!$util.isString(message.orderBy))return"orderBy: string expected"}return null};ListManagementServersRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListManagementServersRequest;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};ListManagementServersRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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(options.oneofs)object._filter="filter"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){object.orderBy=message.orderBy;if(options.oneofs)object._orderBy="orderBy"}return object};ListManagementServersRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListManagementServersRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListManagementServersRequest"};return ListManagementServersRequest}();v1.ListManagementServersResponse=function(){function ListManagementServersResponse(properties){this.managementServers=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListManagementServersResponse;while(reader.pos>>3){case 1:{if(!(message.managementServers&&message.managementServers.length))message.managementServers=[];message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListManagementServersResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.managementServers!=null&&message.hasOwnProperty("managementServers")){if(!Array.isArray(message.managementServers))return"managementServers: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListManagementServersResponse;if(object.managementServers){if(!Array.isArray(object.managementServers))throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected");message.managementServers=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetManagementServerRequest;if(object.name!=null)message.name=String(object.name);return message};GetManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetManagementServerRequest"};return GetManagementServerRequest}();v1.CreateManagementServerRequest=function(){function CreateManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateManagementServerRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.managementServerId=reader.string();break}case 3:{message.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))if(!$util.isString(message.managementServerId))return"managementServerId: string expected";if(message.managementServer!=null&&message.hasOwnProperty("managementServer")){var error=$root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer,long+1);if(error)return"managementServer."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateManagementServerRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.managementServerId!=null)message.managementServerId=String(object.managementServerId);if(object.managementServer!=null){if(typeof object.managementServer!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected");message.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.managementServerId="";object.managementServer=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))object.managementServerId=message.managementServerId;if(message.managementServer!=null&&message.hasOwnProperty("managementServer"))object.managementServer=$root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateManagementServerRequest"};return CreateManagementServerRequest}();v1.DeleteManagementServerRequest=function(){function DeleteManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteManagementServerRequest.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;return object};DeleteManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteManagementServerRequest"};return DeleteManagementServerRequest}();v1.InitializeServiceRequest=function(){function InitializeServiceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InitializeServiceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.requestId=reader.string();break}case 4:{message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){properties.initializationConfig=1;{var error=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.verify(message.cloudSqlInstanceInitializationConfig,long+1);if(error)return"cloudSqlInstanceInitializationConfig."+error}}return null};InitializeServiceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.InitializeServiceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InitializeServiceRequest;if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.cloudSqlInstanceInitializationConfig!=null){if(typeof object.cloudSqlInstanceInitializationConfig!=="object")throw TypeError(".google.cloud.backupdr.v1.InitializeServiceRequest.cloudSqlInstanceInitializationConfig: object expected");message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.fromObject(object.cloudSqlInstanceInitializationConfig,long+1)}return message};InitializeServiceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.resourceType="";object.requestId=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))object.resourceType=message.resourceType;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){object.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig.toObject(message.cloudSqlInstanceInitializationConfig,options);if(options.oneofs)object.initializationConfig="cloudSqlInstanceInitializationConfig"}return object};InitializeServiceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.InitializeServiceRequest"};return InitializeServiceRequest}();v1.InitializeServiceResponse=function(){function InitializeServiceResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InitializeServiceResponse;while(reader.pos>>3){case 1:{message.backupVaultName=reader.string();break}case 2:{message.backupPlanName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))if(!$util.isString(message.backupVaultName))return"backupVaultName: string expected";if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))if(!$util.isString(message.backupPlanName))return"backupPlanName: string expected";return null};InitializeServiceResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.InitializeServiceResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InitializeServiceResponse;if(object.backupVaultName!=null)message.backupVaultName=String(object.backupVaultName);if(object.backupPlanName!=null)message.backupPlanName=String(object.backupPlanName);return message};InitializeServiceResponse.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupVaultName="";object.backupPlanName=""}if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))object.backupVaultName=message.backupVaultName;if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))object.backupPlanName=message.backupPlanName;return object};InitializeServiceResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.InitializeServiceResponse"};return InitializeServiceResponse}();v1.OperationMetadata=function(){function OperationMetadata(properties){this.additionalInfo={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.OperationMetadata,key,value;while(reader.pos>>3){case 1:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.endTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.target=reader.string();break}case 4:{message.verb=reader.string();break}case 5:{message.statusMessage=reader.string();break}case 6:{message.requestedCancellation=reader.bool();break}case 7:{message.apiVersion=reader.string();break}case 8:{if(message.additionalInfo===$util.emptyObject)message.additionalInfo={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.additionalInfo,key);message.additionalInfo[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};OperationMetadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OperationMetadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.endTime!=null&&message.hasOwnProperty("endTime")){var error=$root.google.protobuf.Timestamp.verify(message.endTime,long+1);if(error)return"endTime."+error}if(message.target!=null&&message.hasOwnProperty("target"))if(!$util.isString(message.target))return"target: string expected";if(message.verb!=null&&message.hasOwnProperty("verb"))if(!$util.isString(message.verb))return"verb: string expected";if(message.statusMessage!=null&&message.hasOwnProperty("statusMessage"))if(!$util.isString(message.statusMessage))return"statusMessage: string expected";if(message.requestedCancellation!=null&&message.hasOwnProperty("requestedCancellation"))if(typeof message.requestedCancellation!=="boolean")return"requestedCancellation: boolean expected";if(message.apiVersion!=null&&message.hasOwnProperty("apiVersion"))if(!$util.isString(message.apiVersion))return"apiVersion: string expected";if(message.additionalInfo!=null&&message.hasOwnProperty("additionalInfo")){if(!$util.isObject(message.additionalInfo))return"additionalInfo: object expected";var key=Object.keys(message.additionalInfo);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.OperationMetadata;if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.endTime!=null){if(typeof object.endTime!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.endTime: object expected");message.endTime=$root.google.protobuf.Timestamp.fromObject(object.endTime,long+1)}if(object.target!=null)message.target=String(object.target);if(object.verb!=null)message.verb=String(object.verb);if(object.statusMessage!=null)message.statusMessage=String(object.statusMessage);if(object.requestedCancellation!=null)message.requestedCancellation=Boolean(object.requestedCancellation);if(object.apiVersion!=null)message.apiVersion=String(object.apiVersion);if(object.additionalInfo){if(typeof object.additionalInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected");message.additionalInfo={};for(var keys=Object.keys(object.additionalInfo),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlan,key,value;while(reader.pos>>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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{if(!(message.backupRules&&message.backupRules.length))message.backupRules=[];message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.state=reader.int32();break}case 8:{message.resourceType=reader.string();break}case 9:{message.etag=reader.string();break}case 10:{message.backupVault=reader.string();break}case 11:{message.backupVaultServiceAccount=reader.string();break}case 12:{message.logRetentionDays=reader.int64();break}case 13:{if(!(message.supportedResourceTypes&&message.supportedResourceTypes.length))message.supportedResourceTypes=[];message.supportedResourceTypes.push(reader.string());break}case 14:{message.revisionId=reader.string();break}case 15:{message.revisionName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlan.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlan.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlan;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.BackupPlan.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>0,object.logRetentionDays.high>>>0).toNumber();if(object.supportedResourceTypes){if(!Array.isArray(object.supportedResourceTypes))throw TypeError(".google.cloud.backupdr.v1.BackupPlan.supportedResourceTypes: array expected");message.supportedResourceTypes=[];for(var i=0;i>>0,message.logRetentionDays.high>>>0).toNumber():message.logRetentionDays;if(message.supportedResourceTypes&&message.supportedResourceTypes.length){object.supportedResourceTypes=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupRule;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 4:{message.backupRetentionDays=reader.int32();break}case 5:{message.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))if(!$util.isInteger(message.backupRetentionDays))return"backupRetentionDays: integer expected";if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){properties.backupScheduleOneof=1;{var error=$root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule,long+1);if(error)return"standardSchedule."+error}}return null};BackupRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupRule;if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.backupRetentionDays!=null)message.backupRetentionDays=object.backupRetentionDays|0;if(object.standardSchedule!=null){if(typeof object.standardSchedule!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected");message.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule,long+1)}return message};BackupRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.backupRetentionDays=0}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))object.backupRetentionDays=message.backupRetentionDays;if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){object.standardSchedule=$root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule,options);if(options.oneofs)object.backupScheduleOneof="standardSchedule"}return object};BackupRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupRule"};return BackupRule}();v1.StandardSchedule=function(){function StandardSchedule(properties){this.daysOfWeek=[];this.daysOfMonth=[];this.months=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.StandardSchedule;while(reader.pos>>3){case 1:{message.recurrenceType=reader.int32();break}case 2:{message.hourlyFrequency=reader.int32();break}case 3:{if(!(message.daysOfWeek&&message.daysOfWeek.length))message.daysOfWeek=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.recurrenceType!=null&&message.hasOwnProperty("recurrenceType"))switch(message.recurrenceType){default:return"recurrenceType: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.hourlyFrequency!=null&&message.hasOwnProperty("hourlyFrequency"))if(!$util.isInteger(message.hourlyFrequency))return"hourlyFrequency: integer expected";if(message.daysOfWeek!=null&&message.hasOwnProperty("daysOfWeek")){if(!Array.isArray(message.daysOfWeek))return"daysOfWeek: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.StandardSchedule;switch(object.recurrenceType){default:if(typeof object.recurrenceType==="number"){message.recurrenceType=object.recurrenceType;break}break;case"RECURRENCE_TYPE_UNSPECIFIED":case 0:message.recurrenceType=0;break;case"HOURLY":case 1:message.recurrenceType=1;break;case"DAILY":case 2:message.recurrenceType=2;break;case"WEEKLY":case 3:message.recurrenceType=3;break;case"MONTHLY":case 4:message.recurrenceType=4;break;case"YEARLY":case 5:message.recurrenceType=5;break}if(object.hourlyFrequency!=null)message.hourlyFrequency=object.hourlyFrequency|0;if(object.daysOfWeek){if(!Array.isArray(object.daysOfWeek))throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected");message.daysOfWeek=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupWindow;while(reader.pos>>3){case 1:{message.startHourOfDay=reader.int32();break}case 2:{message.endHourOfDay=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BackupWindow.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupWindow.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))if(!$util.isInteger(message.startHourOfDay))return"startHourOfDay: integer expected";if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))if(!$util.isInteger(message.endHourOfDay))return"endHourOfDay: integer expected";return null};BackupWindow.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupWindow)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupWindow;if(object.startHourOfDay!=null)message.startHourOfDay=object.startHourOfDay|0;if(object.endHourOfDay!=null)message.endHourOfDay=object.endHourOfDay|0;return message};BackupWindow.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.startHourOfDay=0;object.endHourOfDay=0}if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))object.startHourOfDay=message.startHourOfDay;if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))object.endHourOfDay=message.endHourOfDay;return object};BackupWindow.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupWindow.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupWindow"};return BackupWindow}();v1.WeekDayOfMonth=function(){function WeekDayOfMonth(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.WeekDayOfMonth;while(reader.pos>>3){case 1:{message.weekOfMonth=reader.int32();break}case 2:{message.dayOfWeek=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};WeekDayOfMonth.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WeekDayOfMonth.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))switch(message.weekOfMonth){default:return"weekOfMonth: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))switch(message.dayOfWeek){default:return"dayOfWeek: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break}return null};WeekDayOfMonth.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.WeekDayOfMonth;switch(object.weekOfMonth){default:if(typeof object.weekOfMonth==="number"){message.weekOfMonth=object.weekOfMonth;break}break;case"WEEK_OF_MONTH_UNSPECIFIED":case 0:message.weekOfMonth=0;break;case"FIRST":case 1:message.weekOfMonth=1;break;case"SECOND":case 2:message.weekOfMonth=2;break;case"THIRD":case 3:message.weekOfMonth=3;break;case"FOURTH":case 4:message.weekOfMonth=4;break;case"LAST":case 5:message.weekOfMonth=5;break}switch(object.dayOfWeek){default:if(typeof object.dayOfWeek==="number"){message.dayOfWeek=object.dayOfWeek;break}break;case"DAY_OF_WEEK_UNSPECIFIED":case 0:message.dayOfWeek=0;break;case"MONDAY":case 1:message.dayOfWeek=1;break;case"TUESDAY":case 2:message.dayOfWeek=2;break;case"WEDNESDAY":case 3:message.dayOfWeek=3;break;case"THURSDAY":case 4:message.dayOfWeek=4;break;case"FRIDAY":case 5:message.dayOfWeek=5;break;case"SATURDAY":case 6:message.dayOfWeek=6;break;case"SUNDAY":case 7:message.dayOfWeek=7;break}return message};WeekDayOfMonth.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.weekOfMonth=options.enums===String?"WEEK_OF_MONTH_UNSPECIFIED":0;object.dayOfWeek=options.enums===String?"DAY_OF_WEEK_UNSPECIFIED":0}if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))object.weekOfMonth=options.enums===String?$root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]===undefined?message.weekOfMonth:$root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]:message.weekOfMonth;if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))object.dayOfWeek=options.enums===String?$root.google.type.DayOfWeek[message.dayOfWeek]===undefined?message.dayOfWeek:$root.google.type.DayOfWeek[message.dayOfWeek]:message.dayOfWeek;return object};WeekDayOfMonth.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WeekDayOfMonth.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.WeekDayOfMonth"};WeekDayOfMonth.WeekOfMonth=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="WEEK_OF_MONTH_UNSPECIFIED"]=0;values[valuesById[1]="FIRST"]=1;values[valuesById[2]="SECOND"]=2;values[valuesById[3]="THIRD"]=3;values[valuesById[4]="FOURTH"]=4;values[valuesById[5]="LAST"]=5;return values}();return WeekDayOfMonth}();v1.CreateBackupPlanRequest=function(){function CreateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanId=reader.string();break}case 3:{message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))if(!$util.isString(message.backupPlanId))return"backupPlanId: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanId!=null)message.backupPlanId=String(object.backupPlanId);if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanId="";object.backupPlan=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))object.backupPlanId=message.backupPlanId;if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupPlanRequest"};return CreateBackupPlanRequest}();v1.ListBackupPlansRequest=function(){function ListBackupPlansRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlansRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlansRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListBackupPlansRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlansRequest;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};ListBackupPlansRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListBackupPlansRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlansRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlansRequest"};return ListBackupPlansRequest}();v1.ListBackupPlansResponse=function(){function ListBackupPlansResponse(properties){this.backupPlans=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlansResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlans&&message.backupPlans.length))message.backupPlans=[];message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlansResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlans!=null&&message.hasOwnProperty("backupPlans")){if(!Array.isArray(message.backupPlans))return"backupPlans: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlansResponse;if(object.backupPlans){if(!Array.isArray(object.backupPlans))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected");message.backupPlans=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanRequest"};return GetBackupPlanRequest}();v1.DeleteBackupPlanRequest=function(){function DeleteBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupPlanRequest.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;return object};DeleteBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupPlanRequest"};return DeleteBackupPlanRequest}();v1.UpdateBackupPlanRequest=function(){function UpdateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest;while(reader.pos>>3){case 1:{message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanRequest;if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan=null;object.updateMask=null;object.requestId=""}if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupPlanRequest"};return UpdateBackupPlanRequest}();v1.BackupPlanRevision=function(){function BackupPlanRevision(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlanRevision;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.revisionId=reader.string();break}case 3:{message.state=reader.int32();break}case 4:{message.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanRevision.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanRevision.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))if(!$util.isString(message.revisionId))return"revisionId: 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.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot")){var error=$root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlanSnapshot,long+1);if(error)return"backupPlanSnapshot."+error}if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}return null};BackupPlanRevision.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupPlanRevision)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlanRevision;if(object.name!=null)message.name=String(object.name);if(object.revisionId!=null)message.revisionId=String(object.revisionId);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"INACTIVE":case 4:message.state=4;break}if(object.backupPlanSnapshot!=null){if(typeof object.backupPlanSnapshot!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanRevision.backupPlanSnapshot: object expected");message.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlanSnapshot,long+1)}if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanRevision.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}return message};BackupPlanRevision.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.revisionId="";object.state=options.enums===String?"STATE_UNSPECIFIED":0;object.backupPlanSnapshot=null;object.createTime=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))object.revisionId=message.revisionId;if(message.state!=null&&message.hasOwnProperty("state"))object.state=options.enums===String?$root.google.cloud.backupdr.v1.BackupPlanRevision.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1.BackupPlanRevision.State[message.state]:message.state;if(message.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot"))object.backupPlanSnapshot=$root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlanSnapshot,options);if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);return object};BackupPlanRevision.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupPlanRevision.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupPlanRevision"};BackupPlanRevision.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]="INACTIVE"]=4;return values}();return BackupPlanRevision}();v1.GetBackupPlanRevisionRequest=function(){function GetBackupPlanRevisionRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRevisionRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRevisionRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRevisionRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanRevisionRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRevisionRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRevisionRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRevisionRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanRevisionRequest"};return GetBackupPlanRevisionRequest}();v1.ListBackupPlanRevisionsRequest=function(){function ListBackupPlanRevisionsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.pageSize=reader.int32();break}case 3:{message.pageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanRevisionsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanRevisionsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest;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);return message};ListBackupPlanRevisionsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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;return object};ListBackupPlanRevisionsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanRevisionsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlanRevisionsRequest"};return ListBackupPlanRevisionsRequest}();v1.ListBackupPlanRevisionsResponse=function(){function ListBackupPlanRevisionsResponse(properties){this.backupPlanRevisions=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanRevisions&&message.backupPlanRevisions.length))message.backupPlanRevisions=[];message.backupPlanRevisions.push($root.google.cloud.backupdr.v1.BackupPlanRevision.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanRevisionsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanRevisions!=null&&message.hasOwnProperty("backupPlanRevisions")){if(!Array.isArray(message.backupPlanRevisions))return"backupPlanRevisions: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse;if(object.backupPlanRevisions){if(!Array.isArray(object.backupPlanRevisions))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanRevisionsResponse.backupPlanRevisions: array expected");message.backupPlanRevisions=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupPlanAssociation;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.resource=reader.string();break}case 4:{message.backupPlan=reader.string();break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.rulesConfigInfo&&message.rulesConfigInfo.length))message.rulesConfigInfo=[];message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.dataSource=reader.string();break}case 10:{message.cloudSqlInstanceBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 15:{message.alloydbClusterBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 11:{message.backupPlanRevisionId=reader.string();break}case 12:{message.backupPlanRevisionName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanAssociation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanAssociation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.resource!=null&&message.hasOwnProperty("resource"))if(!$util.isString(message.resource))return"resource: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))if(!$util.isString(message.backupPlan))return"backupPlan: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);if(error)return"updateTime."+error}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.rulesConfigInfo!=null&&message.hasOwnProperty("rulesConfigInfo")){if(!Array.isArray(message.rulesConfigInfo))return"rulesConfigInfo: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupPlanAssociation;if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.resource!=null)message.resource=String(object.resource);if(object.backupPlan!=null)message.backupPlan=String(object.backupPlan);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.updateTime!=null){if(typeof object.updateTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.updateTime: object expected");message.updateTime=$root.google.protobuf.Timestamp.fromObject(object.updateTime,long+1)}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"INACTIVE":case 4:message.state=4;break;case"UPDATING":case 5:message.state=5;break}if(object.rulesConfigInfo){if(!Array.isArray(object.rulesConfigInfo))throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected");message.rulesConfigInfo=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RuleConfigInfo;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 3:{message.lastBackupState=reader.int32();break}case 4:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RuleConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RuleConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";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.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);if(error)return"lastBackupError."+error}if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};RuleConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.RuleConfigInfo;if(object.ruleId!=null)message.ruleId=String(object.ruleId);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"PERMISSION_DENIED":case 2:message.lastBackupState=2;break;case"SUCCEEDED":case 3:message.lastBackupState=3;break;case"FAILED":case 4:message.lastBackupState=4;break}if(object.lastBackupError!=null){if(typeof object.lastBackupError!=="object")throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected");message.lastBackupError=$root.google.rpc.Status.fromObject(object.lastBackupError,long+1)}if(object.lastSuccessfulBackupConsistencyTime!=null){if(typeof object.lastSuccessfulBackupConsistencyTime!=="object")throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};RuleConfigInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastBackupState=options.enums===String?"LAST_BACKUP_STATE_UNSPECIFIED":0;object.lastBackupError=null;object.lastSuccessfulBackupConsistencyTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastBackupState!=null&&message.hasOwnProperty("lastBackupState"))object.lastBackupState=options.enums===String?$root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState]===undefined?message.lastBackupState:$root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState]:message.lastBackupState;if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError"))object.lastBackupError=$root.google.rpc.Status.toObject(message.lastBackupError,options);if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime"))object.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime,options);return object};RuleConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RuleConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RuleConfigInfo"};RuleConfigInfo.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]="PERMISSION_DENIED"]=2;values[valuesById[3]="SUCCEEDED"]=3;values[valuesById[4]="FAILED"]=4;return values}();return RuleConfigInfo}();v1.CreateBackupPlanAssociationRequest=function(){function CreateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanAssociationId=reader.string();break}case 3:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))if(!$util.isString(message.backupPlanAssociationId))return"backupPlanAssociationId: string expected";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanAssociationId!=null)message.backupPlanAssociationId=String(object.backupPlanAssociationId);if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanAssociationId="";object.backupPlanAssociation=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))object.backupPlanAssociationId=message.backupPlanAssociationId;if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"};return CreateBackupPlanAssociationRequest}();v1.ListBackupPlanAssociationsRequest=function(){function ListBackupPlanAssociationsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanAssociationsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanAssociationsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest;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);return message};ListBackupPlanAssociationsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken="";object.filter=""}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;return object};ListBackupPlanAssociationsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanAssociationsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"};return ListBackupPlanAssociationsRequest}();v1.ListBackupPlanAssociationsResponse=function(){function ListBackupPlanAssociationsResponse(properties){this.backupPlanAssociations=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanAssociationsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchBackupPlanAssociationsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest;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);return message};FetchBackupPlanAssociationsForResourceTypeRequest.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=""}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;return object};FetchBackupPlanAssociationsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupPlanAssociationsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeRequest"};return FetchBackupPlanAssociationsForResourceTypeRequest}();v1.FetchBackupPlanAssociationsForResourceTypeResponse=function(){function FetchBackupPlanAssociationsForResourceTypeResponse(properties){this.backupPlanAssociations=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1.FetchBackupPlanAssociationsForResourceTypeResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"};return GetBackupPlanAssociationRequest}();v1.DeleteBackupPlanAssociationRequest=function(){function DeleteBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupPlanAssociationRequest.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;return object};DeleteBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"};return DeleteBackupPlanAssociationRequest}();v1.UpdateBackupPlanAssociationRequest=function(){function UpdateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest;if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlanAssociation=null;object.updateMask=null;object.requestId=""}if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupPlanAssociationRequest"};return UpdateBackupPlanAssociationRequest}();v1.TriggerBackupRequest=function(){function TriggerBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.TriggerBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.ruleId=reader.string();break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};TriggerBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TriggerBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};TriggerBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.TriggerBackupRequest;if(object.name!=null)message.name=String(object.name);if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.requestId!=null)message.requestId=String(object.requestId);return message};TriggerBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.ruleId="";object.requestId=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};TriggerBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TriggerBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.TriggerBackupRequest"};return TriggerBackupRequest}();v1.AlloyDBClusterDataSourceProperties=function(){function AlloyDBClusterDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};AlloyDBClusterDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties;if(object.name!=null)message.name=String(object.name);return message};AlloyDBClusterDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};AlloyDBClusterDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties"};return AlloyDBClusterDataSourceProperties}();v1.AlloyDbClusterBackupProperties=function(){function AlloyDbClusterBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.storedBytes=reader.int64();break}case 3:{message.chainId=reader.string();break}case 4:{message.databaseVersion=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDbClusterBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDbClusterBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};AlloyDbClusterBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};AlloyDbClusterBackupProperties.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"}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};AlloyDbClusterBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDbClusterBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDbClusterBackupProperties"};return AlloyDbClusterBackupProperties}();v1.AlloyDBClusterBackupPlanAssociationProperties=function(){function AlloyDBClusterBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.clusterUid=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))if(!$util.isString(message.clusterUid))return"clusterUid: string expected";return null};AlloyDBClusterBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties;if(object.clusterUid!=null)message.clusterUid=String(object.clusterUid);return message};AlloyDBClusterBackupPlanAssociationProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.clusterUid="";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))object.clusterUid=message.clusterUid;return object};AlloyDBClusterBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AlloyDBClusterBackupPlanAssociationProperties"};return AlloyDBClusterBackupPlanAssociationProperties}();v1.CloudSqlInstanceDataSourceProperties=function(){function CloudSqlInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};CloudSqlInstanceDataSourceProperties.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};CloudSqlInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties"};return CloudSqlInstanceDataSourceProperties}();v1.CloudSqlInstanceBackupProperties=function(){function CloudSqlInstanceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties;while(reader.pos>>3){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(),undefined,long+1);break}case 6:{message.instanceTier=reader.string();break}case 8:{message.instanceDeleteTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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,long+1);if(error)return"instanceDeleteTime."+error}return null};CloudSqlInstanceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}return message};CloudSqlInstanceBackupProperties.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(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};CloudSqlInstanceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties"};return CloudSqlInstanceBackupProperties}();v1.CloudSqlInstanceDataSourceReferenceProperties=function(){function CloudSqlInstanceDataSourceReferenceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceReferenceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceReferenceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceReferenceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};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};CloudSqlInstanceDataSourceReferenceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceReferenceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties"};return CloudSqlInstanceDataSourceReferenceProperties}();v1.CloudSqlInstanceInitializationConfig=function(){function CloudSqlInstanceInitializationConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig;while(reader.pos>>3){case 1:{message.edition=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceInitializationConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceInitializationConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 1:case 2:break}return null};CloudSqlInstanceInitializationConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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}return message};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};CloudSqlInstanceInitializationConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceInitializationConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceInitializationConfig"};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(){function CloudSqlInstanceBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.instanceCreateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.instanceCreateTime!=null&&message.hasOwnProperty("instanceCreateTime")){var error=$root.google.protobuf.Timestamp.verify(message.instanceCreateTime,long+1);if(error)return"instanceCreateTime."+error}return null};CloudSqlInstanceBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};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};CloudSqlInstanceBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CloudSqlInstanceBackupPlanAssociationProperties"};return CloudSqlInstanceBackupPlanAssociationProperties}();v1.BackupVault=function(){function BackupVault(properties){this.labels={};this.annotations={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupVault,key,value;while(reader.pos>>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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.backupMinimumEnforcedRetentionDuration=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.annotations,key);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(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupVault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupVault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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>>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>>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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig;while(reader.pos>>3){case 1:{message.kmsKeyName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};EncryptionConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EncryptionConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){properties._kmsKeyName=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}return null};EncryptionConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupVault.EncryptionConfig;if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);return message};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};EncryptionConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};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(){function DataSource(properties){this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSource,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 21:{message.state=reader.int32();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);break}case 26:{message.dataSourceGcpResource=$root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.dataSourceBackupApplianceApplication=$root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.backupBlockedByVaultAccessRestriction=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DataSource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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.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>>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,long+1)}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,long+1)}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,long+1)}if(object.backupBlockedByVaultAccessRestriction!=null)message.backupBlockedByVaultAccessRestriction=Boolean(object.backupBlockedByVaultAccessRestriction);return message};DataSource.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.objects||options.defaults)object.labels={};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(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>>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};DataSource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSource"};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.BackupConfigInfo=function(){function BackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupConfigInfo;while(reader.pos>>3){case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.gcpBackupConfig=$root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.backupApplianceBackupConfig=$root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);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,long+1);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,long+1);if(error)return"backupApplianceBackupConfig."+error}}return null};BackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};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};BackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupConfigInfo"};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.GcpBackupConfig=function(){function GcpBackupConfig(properties){this.backupPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GcpBackupConfig;while(reader.pos>>3){case 1:{message.backupPlan=reader.string();break}case 2:{message.backupPlanDescription=reader.string();break}case 3:{message.backupPlanAssociation=reader.string();break}case 4:{if(!(message.backupPlanRules&&message.backupPlanRules.length))message.backupPlanRules=[];message.backupPlanRules.push(reader.string());break}case 5:{message.backupPlanRevisionName=reader.string();break}case 6:{message.backupPlanRevisionId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig;while(reader.pos>>3){case 1:{message.backupApplianceName=reader.string();break}case 2:{message.backupApplianceId=reader.int64();break}case 3:{message.slaId=reader.int64();break}case 4:{message.applicationName=reader.string();break}case 5:{message.hostName=reader.string();break}case 6:{message.sltName=reader.string();break}case 7:{message.slpName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};BackupApplianceBackupConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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=""}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};BackupApplianceBackupConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceBackupConfig"};return BackupApplianceBackupConfig}();v1.DataSourceGcpResource=function(){function DataSourceGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceGcpResource;while(reader.pos>>3){case 1:{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(),undefined,long+1);break}case 5:{message.cloudSqlInstanceDatasourceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.alloyDbClusterDatasourceProperties=$root.google.cloud.backupdr.v1.AlloyDBClusterDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskDatasourceProperties=$root.google.cloud.backupdr.v1.DiskDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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,long+1);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,long+1);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,long+1);if(error)return"diskDatasourceProperties."+error}}return null};DataSourceGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};DataSourceGcpResource.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;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};DataSourceGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceGcpResource"};return DataSourceGcpResource}();v1.DataSourceBackupApplianceApplication=function(){function DataSourceBackupApplianceApplication(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication;while(reader.pos>>3){case 1:{message.applicationName=reader.string();break}case 2:{message.backupAppliance=reader.string();break}case 3:{message.applianceId=reader.int64();break}case 4:{message.type=reader.string();break}case 8:{message.applicationId=reader.int64();break}case 6:{message.hostname=reader.string();break}case 7:{message.hostId=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupApplianceApplication.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupApplianceApplication.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DataSourceBackupApplianceApplication.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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)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)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};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.applianceId=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else 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.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;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;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};DataSourceBackupApplianceApplication.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupApplianceApplication.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"};return DataSourceBackupApplianceApplication}();v1.ServiceLockInfo=function(){function ServiceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ServiceLockInfo;while(reader.pos>>3){case 1:{message.operation=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ServiceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.operation!=null&&message.hasOwnProperty("operation"))if(!$util.isString(message.operation))return"operation: string expected";return null};ServiceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ServiceLockInfo;if(object.operation!=null)message.operation=String(object.operation);return message};ServiceLockInfo.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};ServiceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ServiceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ServiceLockInfo"};return ServiceLockInfo}();v1.BackupApplianceLockInfo=function(){function BackupApplianceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo;while(reader.pos>>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,long);break}}return message};BackupApplianceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};BackupApplianceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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};BackupApplianceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceLockInfo"};return BackupApplianceLockInfo}();v1.BackupLock=function(){function BackupLock(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupLock;while(reader.pos>>3){case 1:{message.lockUntilTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.backupApplianceLockInfo=$root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.serviceLockInfo=$root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupLock.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLock.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.lockUntilTime!=null&&message.hasOwnProperty("lockUntilTime")){var error=$root.google.protobuf.Timestamp.verify(message.lockUntilTime,long+1);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,long+1);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,long+1);if(error)return"serviceLockInfo."+error}}return null};BackupLock.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupLock)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}return message};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"}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 object};BackupLock.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLock.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupLock"};return BackupLock}();v1.Backup=function(){function Backup(properties){this.labels={};this.serviceLocks=[];this.backupApplianceLocks=[];this.kmsKeyVersions=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Backup,key,value;while(reader.pos>>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(),undefined,long+1);break}case 4:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 6:{message.enforcedRetentionEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 30:{message.backupRetentionInheritance=reader.int32();break}case 7:{message.expireTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{message.consistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1));break}case 18:{if(!(message.backupApplianceLocks&&message.backupApplianceLocks.length))message.backupApplianceLocks=[];message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader,reader.uint32(),undefined,long+1));break}case 19:{message.computeInstanceBackupProperties=$root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 26:{message.cloudSqlInstanceBackupProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 21:{message.backupApplianceBackupProperties=$root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.alloyDbBackupProperties=$root.google.cloud.backupdr.v1.AlloyDbClusterBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.diskBackupProperties=$root.google.cloud.backupdr.v1.DiskBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.backupType=reader.int32();break}case 22:{message.gcpBackupPlanInfo=$root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);break}case 33:{if(!(message.kmsKeyVersions&&message.kmsKeyVersions.length))message.kmsKeyVersions=[];message.kmsKeyVersions.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Backup.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Backup.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"createTime."+error}}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){properties._updateTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);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$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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>>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,long+1)}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>>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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo;while(reader.pos>>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,long);break}}return message};GCPBackupPlanInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GCPBackupPlanInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GCPBackupPlanInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GCPBackupPlanInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan="";object.backupPlanRuleId="";object.backupPlanRevisionName="";object.backupPlanRevisionId=""}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};GCPBackupPlanInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GCPBackupPlanInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"};return GCPBackupPlanInfo}();return Backup}();v1.CreateBackupVaultRequest=function(){function CreateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest;while(reader.pos>>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(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}case 5:{message.validateOnly=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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};CreateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.validateOnly!=null)message.validateOnly=Boolean(object.validateOnly);return message};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.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};CreateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CreateBackupVaultRequest"};return CreateBackupVaultRequest}();v1.ListBackupVaultsRequest=function(){function ListBackupVaultsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};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};ListBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupVaultsRequest"};return ListBackupVaultsRequest}();v1.ListBackupVaultsResponse=function(){function ListBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};FetchUsableBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};FetchUsableBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest;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};FetchUsableBackupVaultsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};FetchUsableBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchUsableBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"};return FetchUsableBackupVaultsRequest}();v1.FetchUsableBackupVaultsResponse=function(){function FetchUsableBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};FetchUsableBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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:return"view: enum value expected";case 0:case 1:case 2:break}return null};FetchBackupsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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"){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};FetchBackupsForResourceTypeRequest.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"))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};FetchBackupsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchBackupsForResourceTypeRequest"};return FetchBackupsForResourceTypeRequest}();v1.FetchBackupsForResourceTypeResponse=function(){function FetchBackupsForResourceTypeResponse(properties){this.backups=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchBackupsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GetBackupVaultRequest.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}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;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};GetBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupVaultRequest"};return GetBackupVaultRequest}();v1.UpdateBackupVaultRequest=function(){function UpdateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backupVault=$root.google.cloud.backupdr.v1.BackupVault.decode(reader,reader.uint32(),undefined,long+1);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();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backupVault!=null&&message.hasOwnProperty("backupVault")){var error=$root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault,long+1);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};UpdateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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};UpdateBackupVaultRequest.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(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};UpdateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupVaultRequest"};return UpdateBackupVaultRequest}();v1.DeleteBackupVaultRequest=function(){function DeleteBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();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();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};DeleteBackupVaultRequest.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}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};DeleteBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupVaultRequest"};return DeleteBackupVaultRequest}();v1.ListDataSourcesRequest=function(){function ListDataSourcesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourcesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourcesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourcesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};ListDataSourcesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourcesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourcesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListDataSourcesRequest"};return ListDataSourcesRequest}();v1.ListDataSourcesResponse=function(){function ListDataSourcesResponse(properties){this.dataSources=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourcesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSources&&message.dataSources.length))message.dataSources=[];message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourcesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSources!=null&&message.hasOwnProperty("dataSources")){if(!Array.isArray(message.dataSources))return"dataSources: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetDataSourceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetDataSourceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetDataSourceRequest"};return GetDataSourceRequest}();v1.UpdateDataSourceRequest=function(){function UpdateDataSourceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.dataSource=$root.google.cloud.backupdr.v1.DataSource.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}case 4:{message.allowMissing=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};UpdateDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.dataSource!=null&&message.hasOwnProperty("dataSource")){var error=$root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource,long+1);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};UpdateDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.allowMissing!=null)message.allowMissing=Boolean(object.allowMissing);return message};UpdateDataSourceRequest.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(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};UpdateDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateDataSourceRequest"};return UpdateDataSourceRequest}();v1.ListBackupsRequest=function(){function ListBackupsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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}return message};ListBackupsRequest.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;return object};ListBackupsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListBackupsRequest"};return ListBackupsRequest}();v1.ListBackupsResponse=function(){function ListBackupsResponse(properties){this.backups=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListBackupsResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetBackupRequest;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_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};GetBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.view=options.enums===String?"BACKUP_VIEW_UNSPECIFIED":0}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;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};GetBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetBackupRequest"};return GetBackupRequest}();v1.UpdateBackupRequest=function(){function UpdateBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.UpdateBackupRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backup=$root.google.cloud.backupdr.v1.Backup.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backup!=null&&message.hasOwnProperty("backup")){var error=$root.google.cloud.backupdr.v1.Backup.verify(message.backup,long+1);if(error)return"backup."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};UpdateBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.UpdateBackupRequest"};return UpdateBackupRequest}();v1.DeleteBackupRequest=function(){function DeleteBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DeleteBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};DeleteBackupRequest.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;return object};DeleteBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DeleteBackupRequest"};return DeleteBackupRequest}();v1.RestoreBackupRequest=function(){function RestoreBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RestoreBackupRequest;while(reader.pos>>3){case 1:{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(),undefined,long+1);break}case 5:{message.diskTargetEnvironment=$root.google.cloud.backupdr.v1.DiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.regionDiskTargetEnvironment=$root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.computeInstanceRestoreProperties=$root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskRestoreProperties=$root.google.cloud.backupdr.v1.DiskRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.clearOverridesFieldMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment,long+1);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,long+1);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,long+1);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,long+1);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,long+1);if(error)return"diskRestoreProperties."+error}}if(message.clearOverridesFieldMask!=null&&message.hasOwnProperty("clearOverridesFieldMask")){properties._clearOverridesFieldMask=1;{var error=$root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask,long+1);if(error)return"clearOverridesFieldMask."+error}}return null};RestoreBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}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,long+1)}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,long+1)}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,long+1)}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,long+1)}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,long+1)}return message};RestoreBackupRequest.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"}return object};RestoreBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RestoreBackupRequest"};return RestoreBackupRequest}();v1.RestoreBackupResponse=function(){function RestoreBackupResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RestoreBackupResponse;while(reader.pos>>3){case 1:{message.targetResource=$root.google.cloud.backupdr.v1.TargetResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.targetResource!=null&&message.hasOwnProperty("targetResource")){var error=$root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource,long+1);if(error)return"targetResource."+error}return null};RestoreBackupResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};RestoreBackupResponse.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);return object};RestoreBackupResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.RestoreBackupResponse"};return RestoreBackupResponse}();v1.TargetResource=function(){function TargetResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.TargetResource;while(reader.pos>>3){case 1:{message.gcpResource=$root.google.cloud.backupdr.v1.GcpResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};TargetResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TargetResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpResource!=null&&message.hasOwnProperty("gcpResource")){properties.targetResourceInfo=1;{var error=$root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource,long+1);if(error)return"gcpResource."+error}}return null};TargetResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.TargetResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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,long+1)}return message};TargetResource.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.oneofs)object.targetResourceInfo="gcpResource"}return object};TargetResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TargetResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.TargetResource"};return TargetResource}();v1.GcpResource=function(){function GcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};GcpResource.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;return object};GcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GcpResource"};return GcpResource}();v1.BackupGcpResource=function(){function BackupGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupGcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};BackupGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");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};BackupGcpResource.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;return object};BackupGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupGcpResource"};return BackupGcpResource}();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}();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}();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(){function BackupApplianceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties;while(reader.pos>>3){case 1:{message.generationId=reader.int32();break}case 2:{message.finalizeTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){properties._generationId=1;if(!$util.isInteger(message.generationId))return"generationId: integer expected"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){properties._finalizeTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.finalizeTime,long+1);if(error)return"finalizeTime."+error}}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){properties._recoveryRangeStartTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime,long+1);if(error)return"recoveryRangeStartTime."+error}}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){properties._recoveryRangeEndTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime,long+1);if(error)return"recoveryRangeEndTime."+error}}return null};BackupApplianceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties;if(object.generationId!=null)message.generationId=object.generationId|0;if(object.finalizeTime!=null){if(typeof object.finalizeTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected");message.finalizeTime=$root.google.protobuf.Timestamp.fromObject(object.finalizeTime,long+1)}if(object.recoveryRangeStartTime!=null){if(typeof object.recoveryRangeStartTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected");message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime,long+1)}if(object.recoveryRangeEndTime!=null){if(typeof object.recoveryRangeEndTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected");message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime,long+1)}return message};BackupApplianceBackupProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){object.generationId=message.generationId;if(options.oneofs)object._generationId="generationId"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){object.finalizeTime=$root.google.protobuf.Timestamp.toObject(message.finalizeTime,options);if(options.oneofs)object._finalizeTime="finalizeTime"}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){object.recoveryRangeStartTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime,options);if(options.oneofs)object._recoveryRangeStartTime="recoveryRangeStartTime"}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){object.recoveryRangeEndTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime,options);if(options.oneofs)object._recoveryRangeEndTime="recoveryRangeEndTime"}return object};BackupApplianceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupApplianceBackupProperties"};return BackupApplianceBackupProperties}();v1.DiskTargetEnvironment=function(){function DiskTargetEnvironment(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";return null};DiskTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DiskTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);return message};DiskTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;return object};DiskTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DiskTargetEnvironment"};return DiskTargetEnvironment}();v1.RegionDiskTargetEnvironment=function(){function RegionDiskTargetEnvironment(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.region=reader.string();break}case 3:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};RegionDiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RegionDiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.region!=null&&message.hasOwnProperty("region"))if(!$util.isString(message.region))return"region: string expected";if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.RegionDiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.region!=null)message.region=String(object.region);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.RegionDiskTargetEnvironment.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskRestoreProperties,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.sizeGb=reader.int64();break}case 4:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 5:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.physicalBlockSizeBytes=reader.int64();break}case 8:{message.provisionedIops=reader.int64();break}case 9:{message.provisionedThroughput=reader.int64();break}case 10:{message.enableConfidentialCompute=reader.bool();break}case 11:{message.storagePool=reader.string();break}case 12:{message.accessMode=reader.int32();break}case 14:{message.architecture=reader.int32();break}case 15:{if(!(message.resourcePolicy&&message.resourcePolicy.length))message.resourcePolicy=[];message.resourcePolicy.push(reader.string());break}case 16:{message.type=reader.string();break}case 17:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 18:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};DiskRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;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.sizeGb!=null&&message.hasOwnProperty("sizeGb")){properties._sizeGb=1;if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskRestoreProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1.DiskRestoreProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.physicalBlockSizeBytes.high>>>0).toNumber();if(object.provisionedIops!=null)if($util.Long)(message.provisionedIops=$util.Long.fromValue(object.provisionedIops)).unsigned=false;else if(typeof object.provisionedIops==="string")message.provisionedIops=parseInt(object.provisionedIops,10);else if(typeof object.provisionedIops==="number")message.provisionedIops=object.provisionedIops;else if(typeof object.provisionedIops==="object")message.provisionedIops=new $util.LongBits(object.provisionedIops.low>>>0,object.provisionedIops.high>>>0).toNumber();if(object.provisionedThroughput!=null)if($util.Long)(message.provisionedThroughput=$util.Long.fromValue(object.provisionedThroughput)).unsigned=false;else if(typeof object.provisionedThroughput==="string")message.provisionedThroughput=parseInt(object.provisionedThroughput,10);else if(typeof object.provisionedThroughput==="number")message.provisionedThroughput=object.provisionedThroughput;else if(typeof object.provisionedThroughput==="object")message.provisionedThroughput=new $util.LongBits(object.provisionedThroughput.low>>>0,object.provisionedThroughput.high>>>0).toNumber();if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);if(object.storagePool!=null)message.storagePool=String(object.storagePool);switch(object.accessMode){default:if(typeof object.accessMode==="number"){message.accessMode=object.accessMode;break}break;case"READ_WRITE_SINGLE":case 0:message.accessMode=0;break;case"READ_WRITE_MANY":case 1:message.accessMode=1;break;case"READ_ONLY_MANY":case 2:message.accessMode=2;break}switch(object.architecture){default:if(typeof object.architecture==="number"){message.architecture=object.architecture;break}break;case"ARCHITECTURE_UNSPECIFIED":case 0:message.architecture=0;break;case"X86_64":case 1:message.architecture=1;break;case"ARM64":case 2:message.architecture=2;break}if(object.resourcePolicy){if(!Array.isArray(object.resourcePolicy))throw TypeError(".google.cloud.backupdr.v1.DiskRestoreProperties.resourcePolicy: array expected");message.resourcePolicy=[];for(var i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.licenses&&message.licenses.length){object.licenses=[];for(var j=0;j>>0,message.physicalBlockSizeBytes.high>>>0).toNumber():message.physicalBlockSizeBytes;if(options.oneofs)object._physicalBlockSizeBytes="physicalBlockSizeBytes"}if(message.provisionedIops!=null&&message.hasOwnProperty("provisionedIops")){if(typeof message.provisionedIops==="number")object.provisionedIops=options.longs===String?String(message.provisionedIops):message.provisionedIops;else object.provisionedIops=options.longs===String?$util.Long.prototype.toString.call(message.provisionedIops):options.longs===Number?new $util.LongBits(message.provisionedIops.low>>>0,message.provisionedIops.high>>>0).toNumber():message.provisionedIops;if(options.oneofs)object._provisionedIops="provisionedIops"}if(message.provisionedThroughput!=null&&message.hasOwnProperty("provisionedThroughput")){if(typeof message.provisionedThroughput==="number")object.provisionedThroughput=options.longs===String?String(message.provisionedThroughput):message.provisionedThroughput;else object.provisionedThroughput=options.longs===String?$util.Long.prototype.toString.call(message.provisionedThroughput):options.longs===Number?new $util.LongBits(message.provisionedThroughput.low>>>0,message.provisionedThroughput.high>>>0).toNumber():message.provisionedThroughput;if(options.oneofs)object._provisionedThroughput="provisionedThroughput"}if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}if(message.storagePool!=null&&message.hasOwnProperty("storagePool")){object.storagePool=message.storagePool;if(options.oneofs)object._storagePool="storagePool"}if(message.accessMode!=null&&message.hasOwnProperty("accessMode")){object.accessMode=options.enums===String?$root.google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode[message.accessMode]===undefined?message.accessMode:$root.google.cloud.backupdr.v1.DiskRestoreProperties.AccessMode[message.accessMode]:message.accessMode;if(options.oneofs)object._accessMode="accessMode"}if(message.architecture!=null&&message.hasOwnProperty("architecture")){object.architecture=options.enums===String?$root.google.cloud.backupdr.v1.DiskRestoreProperties.Architecture[message.architecture]===undefined?message.architecture:$root.google.cloud.backupdr.v1.DiskRestoreProperties.Architecture[message.architecture]:message.architecture;if(options.oneofs)object._architecture="architecture"}if(message.resourcePolicy&&message.resourcePolicy.length){object.resourcePolicy=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskBackupProperties;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 3:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.architecture=reader.int32();break}case 5:{message.type=reader.string();break}case 6:{message.sizeGb=reader.int64();break}case 7:{message.region=reader.string();break}case 8:{message.zone=reader.string();break}case 9:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}case 10:{message.sourceDisk=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DiskBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1.DiskBackupProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.sizeGb.high>>>0).toNumber();if(object.region!=null)message.region=String(object.region);if(object.zone!=null)message.zone=String(object.zone);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.DiskBackupProperties.replicaZones: array expected");message.replicaZones=[];for(var i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.region!=null&&message.hasOwnProperty("region")){object.region=message.region;if(options.oneofs)object._region="region"}if(message.zone!=null&&message.hasOwnProperty("zone")){object.zone=message.zone;if(options.oneofs)object._zone="zone"}if(message.replicaZones&&message.replicaZones.length){object.replicaZones=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DiskDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.type=reader.string();break}case 4:{message.sizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DiskDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected";return null};DiskDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DiskDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DiskDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.type!=null)message.type=String(object.type);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();return message};DiskDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.type="";if($util.Long){var long=new $util.Long(0,0,false);object.sizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.sizeGb=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(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(typeof message.sizeGb==="number")object.sizeGb=options.longs===String?String(message.sizeGb):message.sizeGb;else object.sizeGb=options.longs===String?$util.Long.prototype.toString.call(message.sizeGb):options.longs===Number?new $util.LongBits(message.sizeGb.low>>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;return object};DiskDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DiskDataSourceProperties"};return DiskDataSourceProperties}();v1.ComputeInstanceBackupProperties=function(){function ComputeInstanceBackupProperties(properties){this.networkInterface=[];this.disk=[];this.serviceAccount=[];this.guestAccelerator=[];this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties,key,value;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.tags=$root.google.cloud.backupdr.v1.Tags.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.machineType=reader.string();break}case 4:{message.canIpForward=reader.bool();break}case 5:{if(!(message.networkInterface&&message.networkInterface.length))message.networkInterface=[];message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{if(!(message.disk&&message.disk.length))message.disk=[];message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.metadata=$root.google.cloud.backupdr.v1.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{if(!(message.serviceAccount&&message.serviceAccount.length))message.serviceAccount=[];message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.scheduling=$root.google.cloud.backupdr.v1.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 10:{if(!(message.guestAccelerator&&message.guestAccelerator.length))message.guestAccelerator=[];message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 11:{message.minCpuPlatform=reader.string();break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{message.sourceInstance=reader.string();break}case 14:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.tags!=null&&message.hasOwnProperty("tags")){properties._tags=1;{var error=$root.google.cloud.backupdr.v1.Tags.verify(message.tags,long+1);if(error)return"tags."+error}}if(message.machineType!=null&&message.hasOwnProperty("machineType")){properties._machineType=1;if(!$util.isString(message.machineType))return"machineType: string expected"}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.networkInterface!=null&&message.hasOwnProperty("networkInterface")){if(!Array.isArray(message.networkInterface))return"networkInterface: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.tags!=null){if(typeof object.tags!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected");message.tags=$root.google.cloud.backupdr.v1.Tags.fromObject(object.tags,long+1)}if(object.machineType!=null)message.machineType=String(object.machineType);if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.networkInterface){if(!Array.isArray(object.networkInterface))throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected");message.networkInterface=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.advancedMachineFeatures=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.canIpForward=reader.bool();break}case 4:{message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.deletionProtection=reader.bool();break}case 6:{message.description=reader.string();break}case 7:{if(!(message.disks&&message.disks.length))message.disks=[];message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.displayDevice=$root.google.cloud.backupdr.v1.DisplayDevice.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{if(!(message.guestAccelerators&&message.guestAccelerators.length))message.guestAccelerators=[];message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.hostname=reader.string();break}case 11:{message.instanceEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 14:{message.machineType=reader.string();break}case 15:{message.metadata=$root.google.cloud.backupdr.v1.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.minCpuPlatform=reader.string();break}case 17:{if(!(message.networkInterfaces&&message.networkInterfaces.length))message.networkInterfaces=[];message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 18:{message.networkPerformanceConfig=$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 19:{message.params=$root.google.cloud.backupdr.v1.InstanceParams.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.privateIpv6GoogleAccess=reader.int32();break}case 21:{message.allocationAffinity=$root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{if(!(message.resourcePolicies&&message.resourcePolicies.length))message.resourcePolicies=[];message.resourcePolicies.push(reader.string());break}case 23:{message.scheduling=$root.google.cloud.backupdr.v1.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 24:{if(!(message.serviceAccounts&&message.serviceAccounts.length))message.serviceAccounts=[];message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 26:{message.tags=$root.google.cloud.backupdr.v1.Tags.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.advancedMachineFeatures!=null&&message.hasOwnProperty("advancedMachineFeatures")){properties._advancedMachineFeatures=1;{var error=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures,long+1);if(error)return"advancedMachineFeatures."+error}}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.confidentialInstanceConfig!=null&&message.hasOwnProperty("confidentialInstanceConfig")){properties._confidentialInstanceConfig=1;{var error=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig,long+1);if(error)return"confidentialInstanceConfig."+error}}if(message.deletionProtection!=null&&message.hasOwnProperty("deletionProtection")){properties._deletionProtection=1;if(typeof message.deletionProtection!=="boolean")return"deletionProtection: boolean expected"}if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.disks!=null&&message.hasOwnProperty("disks")){if(!Array.isArray(message.disks))return"disks: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties;if(object.name!=null)message.name=String(object.name);if(object.advancedMachineFeatures!=null){if(typeof object.advancedMachineFeatures!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected");message.advancedMachineFeatures=$root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures,long+1)}if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.confidentialInstanceConfig!=null){if(typeof object.confidentialInstanceConfig!=="object")throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected");message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig,long+1)}if(object.deletionProtection!=null)message.deletionProtection=Boolean(object.deletionProtection);if(object.description!=null)message.description=String(object.description);if(object.disks){if(!Array.isArray(object.disks))throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected");message.disks=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";return null};ComputeInstanceTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);return message};ComputeInstanceTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;return object};ComputeInstanceTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"};return ComputeInstanceTargetEnvironment}();v1.ComputeInstanceDataSourceProperties=function(){function ComputeInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.machineType=reader.string();break}case 4:{message.totalDiskCount=reader.int64();break}case 5:{message.totalDiskSizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.machineType!=null&&message.hasOwnProperty("machineType"))if(!$util.isString(message.machineType))return"machineType: string expected";if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(!$util.isInteger(message.totalDiskCount)&&!(message.totalDiskCount&&$util.isInteger(message.totalDiskCount.low)&&$util.isInteger(message.totalDiskCount.high)))return"totalDiskCount: integer|Long expected";if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(!$util.isInteger(message.totalDiskSizeGb)&&!(message.totalDiskSizeGb&&$util.isInteger(message.totalDiskSizeGb.low)&&$util.isInteger(message.totalDiskSizeGb.high)))return"totalDiskSizeGb: integer|Long expected";return null};ComputeInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.machineType!=null)message.machineType=String(object.machineType);if(object.totalDiskCount!=null)if($util.Long)(message.totalDiskCount=$util.Long.fromValue(object.totalDiskCount)).unsigned=false;else if(typeof object.totalDiskCount==="string")message.totalDiskCount=parseInt(object.totalDiskCount,10);else if(typeof object.totalDiskCount==="number")message.totalDiskCount=object.totalDiskCount;else if(typeof object.totalDiskCount==="object")message.totalDiskCount=new $util.LongBits(object.totalDiskCount.low>>>0,object.totalDiskCount.high>>>0).toNumber();if(object.totalDiskSizeGb!=null)if($util.Long)(message.totalDiskSizeGb=$util.Long.fromValue(object.totalDiskSizeGb)).unsigned=false;else if(typeof object.totalDiskSizeGb==="string")message.totalDiskSizeGb=parseInt(object.totalDiskSizeGb,10);else if(typeof object.totalDiskSizeGb==="number")message.totalDiskSizeGb=object.totalDiskSizeGb;else if(typeof object.totalDiskSizeGb==="object")message.totalDiskSizeGb=new $util.LongBits(object.totalDiskSizeGb.low>>>0,object.totalDiskSizeGb.high>>>0).toNumber();return message};ComputeInstanceDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.machineType="";if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskSizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskSizeGb=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(message.machineType!=null&&message.hasOwnProperty("machineType"))object.machineType=message.machineType;if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(typeof message.totalDiskCount==="number")object.totalDiskCount=options.longs===String?String(message.totalDiskCount):message.totalDiskCount;else object.totalDiskCount=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskCount):options.longs===Number?new $util.LongBits(message.totalDiskCount.low>>>0,message.totalDiskCount.high>>>0).toNumber():message.totalDiskCount;if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(typeof message.totalDiskSizeGb==="number")object.totalDiskSizeGb=options.longs===String?String(message.totalDiskSizeGb):message.totalDiskSizeGb;else object.totalDiskSizeGb=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskSizeGb):options.longs===Number?new $util.LongBits(message.totalDiskSizeGb.low>>>0,message.totalDiskSizeGb.high>>>0).toNumber():message.totalDiskSizeGb;return object};ComputeInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"};return ComputeInstanceDataSourceProperties}();v1.AdvancedMachineFeatures=function(){function AdvancedMachineFeatures(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures;while(reader.pos>>3){case 1:{message.enableNestedVirtualization=reader.bool();break}case 2:{message.threadsPerCore=reader.int32();break}case 3:{message.visibleCoreCount=reader.int32();break}case 4:{message.enableUefiNetworking=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};AdvancedMachineFeatures.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AdvancedMachineFeatures.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){properties._enableNestedVirtualization=1;if(typeof message.enableNestedVirtualization!=="boolean")return"enableNestedVirtualization: boolean expected"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){properties._threadsPerCore=1;if(!$util.isInteger(message.threadsPerCore))return"threadsPerCore: integer expected"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){properties._visibleCoreCount=1;if(!$util.isInteger(message.visibleCoreCount))return"visibleCoreCount: integer expected"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){properties._enableUefiNetworking=1;if(typeof message.enableUefiNetworking!=="boolean")return"enableUefiNetworking: boolean expected"}return null};AdvancedMachineFeatures.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures;if(object.enableNestedVirtualization!=null)message.enableNestedVirtualization=Boolean(object.enableNestedVirtualization);if(object.threadsPerCore!=null)message.threadsPerCore=object.threadsPerCore|0;if(object.visibleCoreCount!=null)message.visibleCoreCount=object.visibleCoreCount|0;if(object.enableUefiNetworking!=null)message.enableUefiNetworking=Boolean(object.enableUefiNetworking);return message};AdvancedMachineFeatures.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){object.enableNestedVirtualization=message.enableNestedVirtualization;if(options.oneofs)object._enableNestedVirtualization="enableNestedVirtualization"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){object.threadsPerCore=message.threadsPerCore;if(options.oneofs)object._threadsPerCore="threadsPerCore"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){object.visibleCoreCount=message.visibleCoreCount;if(options.oneofs)object._visibleCoreCount="visibleCoreCount"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){object.enableUefiNetworking=message.enableUefiNetworking;if(options.oneofs)object._enableUefiNetworking="enableUefiNetworking"}return object};AdvancedMachineFeatures.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AdvancedMachineFeatures.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AdvancedMachineFeatures"};return AdvancedMachineFeatures}();v1.ConfidentialInstanceConfig=function(){function ConfidentialInstanceConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig;while(reader.pos>>3){case 1:{message.enableConfidentialCompute=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ConfidentialInstanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ConfidentialInstanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){properties._enableConfidentialCompute=1;if(typeof message.enableConfidentialCompute!=="boolean")return"enableConfidentialCompute: boolean expected"}return null};ConfidentialInstanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig;if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);return message};ConfidentialInstanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}return object};ConfidentialInstanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ConfidentialInstanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ConfidentialInstanceConfig"};return ConfidentialInstanceConfig}();v1.DisplayDevice=function(){function DisplayDevice(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DisplayDevice;while(reader.pos>>3){case 1:{message.enableDisplay=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DisplayDevice.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DisplayDevice.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){properties._enableDisplay=1;if(typeof message.enableDisplay!=="boolean")return"enableDisplay: boolean expected"}return null};DisplayDevice.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DisplayDevice)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DisplayDevice;if(object.enableDisplay!=null)message.enableDisplay=Boolean(object.enableDisplay);return message};DisplayDevice.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){object.enableDisplay=message.enableDisplay;if(options.oneofs)object._enableDisplay="enableDisplay"}return object};DisplayDevice.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DisplayDevice.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DisplayDevice"};return DisplayDevice}();v1.AcceleratorConfig=function(){function AcceleratorConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AcceleratorConfig;while(reader.pos>>3){case 1:{message.acceleratorType=reader.string();break}case 2:{message.acceleratorCount=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AcceleratorConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AcceleratorConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){properties._acceleratorType=1;if(!$util.isString(message.acceleratorType))return"acceleratorType: string expected"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){properties._acceleratorCount=1;if(!$util.isInteger(message.acceleratorCount))return"acceleratorCount: integer expected"}return null};AcceleratorConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AcceleratorConfig;if(object.acceleratorType!=null)message.acceleratorType=String(object.acceleratorType);if(object.acceleratorCount!=null)message.acceleratorCount=object.acceleratorCount|0;return message};AcceleratorConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){object.acceleratorType=message.acceleratorType;if(options.oneofs)object._acceleratorType="acceleratorType"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){object.acceleratorCount=message.acceleratorCount;if(options.oneofs)object._acceleratorCount="acceleratorCount"}return object};AcceleratorConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcceleratorConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AcceleratorConfig"};return AcceleratorConfig}();v1.CustomerEncryptionKey=function(){function CustomerEncryptionKey(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.CustomerEncryptionKey;while(reader.pos>>3){case 1:{message.rawKey=reader.string();break}case 2:{message.rsaEncryptedKey=reader.string();break}case 3:{message.kmsKeyName=reader.string();break}case 4:{message.kmsKeyServiceAccount=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CustomerEncryptionKey.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CustomerEncryptionKey.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){properties.key=1;if(!$util.isString(message.rawKey))return"rawKey: string expected"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.rsaEncryptedKey))return"rsaEncryptedKey: string expected"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){properties._kmsKeyServiceAccount=1;if(!$util.isString(message.kmsKeyServiceAccount))return"kmsKeyServiceAccount: string expected"}return null};CustomerEncryptionKey.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.CustomerEncryptionKey;if(object.rawKey!=null)message.rawKey=String(object.rawKey);if(object.rsaEncryptedKey!=null)message.rsaEncryptedKey=String(object.rsaEncryptedKey);if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);if(object.kmsKeyServiceAccount!=null)message.kmsKeyServiceAccount=String(object.kmsKeyServiceAccount);return message};CustomerEncryptionKey.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){object.rawKey=message.rawKey;if(options.oneofs)object.key="rawKey"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){object.rsaEncryptedKey=message.rsaEncryptedKey;if(options.oneofs)object.key="rsaEncryptedKey"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){object.kmsKeyName=message.kmsKeyName;if(options.oneofs)object.key="kmsKeyName"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){object.kmsKeyServiceAccount=message.kmsKeyServiceAccount;if(options.oneofs)object._kmsKeyServiceAccount="kmsKeyServiceAccount"}return object};CustomerEncryptionKey.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CustomerEncryptionKey.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.CustomerEncryptionKey"};return CustomerEncryptionKey}();v1.Entry=function(){function Entry(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Entry;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};Entry.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Entry.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.value!=null&&message.hasOwnProperty("value")){properties._value=1;if(!$util.isString(message.value))return"value: string expected"}return null};Entry.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.Entry)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Entry;if(object.key!=null)message.key=String(object.key);if(object.value!=null)message.value=String(object.value);return message};Entry.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.key!=null&&message.hasOwnProperty("key")){object.key=message.key;if(options.oneofs)object._key="key"}if(message.value!=null&&message.hasOwnProperty("value")){object.value=message.value;if(options.oneofs)object._value="value"}return object};Entry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Entry.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.Entry"};return Entry}();v1.Metadata=function(){function Metadata(properties){this.items=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Metadata;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Metadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Metadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Metadata;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkInterface;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.subnetwork=reader.string();break}case 3:{message.ipAddress=reader.string();break}case 4:{message.ipv6Address=reader.string();break}case 5:{message.internalIpv6PrefixLength=reader.int32();break}case 6:{message.name=reader.string();break}case 7:{if(!(message.accessConfigs&&message.accessConfigs.length))message.accessConfigs=[];message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{if(!(message.ipv6AccessConfigs&&message.ipv6AccessConfigs.length))message.ipv6AccessConfigs=[];message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{if(!(message.aliasIpRanges&&message.aliasIpRanges.length))message.aliasIpRanges=[];message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.stackType=reader.int32();break}case 11:{message.ipv6AccessType=reader.int32();break}case 12:{message.queueCount=reader.int32();break}case 13:{message.nicType=reader.int32();break}case 14:{message.networkAttachment=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};NetworkInterface.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkInterface.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.network!=null&&message.hasOwnProperty("network")){properties._network=1;if(!$util.isString(message.network))return"network: string expected"}if(message.subnetwork!=null&&message.hasOwnProperty("subnetwork")){properties._subnetwork=1;if(!$util.isString(message.subnetwork))return"subnetwork: string expected"}if(message.ipAddress!=null&&message.hasOwnProperty("ipAddress")){properties._ipAddress=1;if(!$util.isString(message.ipAddress))return"ipAddress: string expected"}if(message.ipv6Address!=null&&message.hasOwnProperty("ipv6Address")){properties._ipv6Address=1;if(!$util.isString(message.ipv6Address))return"ipv6Address: string expected"}if(message.internalIpv6PrefixLength!=null&&message.hasOwnProperty("internalIpv6PrefixLength")){properties._internalIpv6PrefixLength=1;if(!$util.isInteger(message.internalIpv6PrefixLength))return"internalIpv6PrefixLength: integer expected"}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.accessConfigs!=null&&message.hasOwnProperty("accessConfigs")){if(!Array.isArray(message.accessConfigs))return"accessConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkInterface;if(object.network!=null)message.network=String(object.network);if(object.subnetwork!=null)message.subnetwork=String(object.subnetwork);if(object.ipAddress!=null)message.ipAddress=String(object.ipAddress);if(object.ipv6Address!=null)message.ipv6Address=String(object.ipv6Address);if(object.internalIpv6PrefixLength!=null)message.internalIpv6PrefixLength=object.internalIpv6PrefixLength|0;if(object.name!=null)message.name=String(object.name);if(object.accessConfigs){if(!Array.isArray(object.accessConfigs))throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected");message.accessConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig;while(reader.pos>>3){case 1:{message.totalEgressBandwidthTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkPerformanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkPerformanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){properties._totalEgressBandwidthTier=1;switch(message.totalEgressBandwidthTier){default:return"totalEgressBandwidthTier: enum value expected";case 0:case 1:case 2:break}}return null};NetworkPerformanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig;switch(object.totalEgressBandwidthTier){default:if(typeof object.totalEgressBandwidthTier==="number"){message.totalEgressBandwidthTier=object.totalEgressBandwidthTier;break}break;case"TIER_UNSPECIFIED":case 0:message.totalEgressBandwidthTier=0;break;case"DEFAULT":case 1:message.totalEgressBandwidthTier=1;break;case"TIER_1":case 2:message.totalEgressBandwidthTier=2;break}return message};NetworkPerformanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){object.totalEgressBandwidthTier=options.enums===String?$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]===undefined?message.totalEgressBandwidthTier:$root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]:message.totalEgressBandwidthTier;if(options.oneofs)object._totalEgressBandwidthTier="totalEgressBandwidthTier"}return object};NetworkPerformanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkPerformanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.NetworkPerformanceConfig"};NetworkPerformanceConfig.Tier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TIER_UNSPECIFIED"]=0;values[valuesById[1]="DEFAULT"]=1;values[valuesById[2]="TIER_1"]=2;return values}();return NetworkPerformanceConfig}();v1.AccessConfig=function(){function AccessConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AccessConfig;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.name=reader.string();break}case 3:{message.externalIp=reader.string();break}case 4:{message.externalIpv6=reader.string();break}case 5:{message.externalIpv6PrefixLength=reader.int32();break}case 6:{message.setPublicPtr=reader.bool();break}case 7:{message.publicPtrDomainName=reader.string();break}case 8:{message.networkTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AccessConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AccessConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:break}}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){properties._externalIp=1;if(!$util.isString(message.externalIp))return"externalIp: string expected"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){properties._externalIpv6=1;if(!$util.isString(message.externalIpv6))return"externalIpv6: string expected"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){properties._externalIpv6PrefixLength=1;if(!$util.isInteger(message.externalIpv6PrefixLength))return"externalIpv6PrefixLength: integer expected"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){properties._setPublicPtr=1;if(typeof message.setPublicPtr!=="boolean")return"setPublicPtr: boolean expected"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){properties._publicPtrDomainName=1;if(!$util.isString(message.publicPtrDomainName))return"publicPtrDomainName: string expected"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){properties._networkTier=1;switch(message.networkTier){default:return"networkTier: enum value expected";case 0:case 1:case 2:break}}return null};AccessConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AccessConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AccessConfig;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"ACCESS_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ONE_TO_ONE_NAT":case 1:message.type=1;break;case"DIRECT_IPV6":case 2:message.type=2;break}if(object.name!=null)message.name=String(object.name);if(object.externalIp!=null)message.externalIp=String(object.externalIp);if(object.externalIpv6!=null)message.externalIpv6=String(object.externalIpv6);if(object.externalIpv6PrefixLength!=null)message.externalIpv6PrefixLength=object.externalIpv6PrefixLength|0;if(object.setPublicPtr!=null)message.setPublicPtr=Boolean(object.setPublicPtr);if(object.publicPtrDomainName!=null)message.publicPtrDomainName=String(object.publicPtrDomainName);switch(object.networkTier){default:if(typeof object.networkTier==="number"){message.networkTier=object.networkTier;break}break;case"NETWORK_TIER_UNSPECIFIED":case 0:message.networkTier=0;break;case"PREMIUM":case 1:message.networkTier=1;break;case"STANDARD":case 2:message.networkTier=2;break}return message};AccessConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type]:message.type;if(options.oneofs)object._type="type"}if(message.name!=null&&message.hasOwnProperty("name")){object.name=message.name;if(options.oneofs)object._name="name"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){object.externalIp=message.externalIp;if(options.oneofs)object._externalIp="externalIp"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){object.externalIpv6=message.externalIpv6;if(options.oneofs)object._externalIpv6="externalIpv6"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){object.externalIpv6PrefixLength=message.externalIpv6PrefixLength;if(options.oneofs)object._externalIpv6PrefixLength="externalIpv6PrefixLength"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){object.setPublicPtr=message.setPublicPtr;if(options.oneofs)object._setPublicPtr="setPublicPtr"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){object.publicPtrDomainName=message.publicPtrDomainName;if(options.oneofs)object._publicPtrDomainName="publicPtrDomainName"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){object.networkTier=options.enums===String?$root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier]===undefined?message.networkTier:$root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier]:message.networkTier;if(options.oneofs)object._networkTier="networkTier"}return object};AccessConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AccessConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AccessConfig"};AccessConfig.AccessType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ACCESS_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ONE_TO_ONE_NAT"]=1;values[valuesById[2]="DIRECT_IPV6"]=2;return values}();AccessConfig.NetworkTier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NETWORK_TIER_UNSPECIFIED"]=0;values[valuesById[1]="PREMIUM"]=1;values[valuesById[2]="STANDARD"]=2;return values}();return AccessConfig}();v1.AliasIpRange=function(){function AliasIpRange(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AliasIpRange;while(reader.pos>>3){case 1:{message.ipCidrRange=reader.string();break}case 2:{message.subnetworkRangeName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AliasIpRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AliasIpRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){properties._ipCidrRange=1;if(!$util.isString(message.ipCidrRange))return"ipCidrRange: string expected"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){properties._subnetworkRangeName=1;if(!$util.isString(message.subnetworkRangeName))return"subnetworkRangeName: string expected"}return null};AliasIpRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.AliasIpRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AliasIpRange;if(object.ipCidrRange!=null)message.ipCidrRange=String(object.ipCidrRange);if(object.subnetworkRangeName!=null)message.subnetworkRangeName=String(object.subnetworkRangeName);return message};AliasIpRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){object.ipCidrRange=message.ipCidrRange;if(options.oneofs)object._ipCidrRange="ipCidrRange"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){object.subnetworkRangeName=message.subnetworkRangeName;if(options.oneofs)object._subnetworkRangeName="subnetworkRangeName"}return object};AliasIpRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AliasIpRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AliasIpRange"};return AliasIpRange}();v1.InstanceParams=function(){function InstanceParams(properties){this.resourceManagerTags={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.InstanceParams,key,value;while(reader.pos>>3){case 1:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};InstanceParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InstanceParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceManagerTags!=null&&message.hasOwnProperty("resourceManagerTags")){if(!$util.isObject(message.resourceManagerTags))return"resourceManagerTags: object expected";var key=Object.keys(message.resourceManagerTags);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.InstanceParams;if(object.resourceManagerTags){if(typeof object.resourceManagerTags!=="object")throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected");message.resourceManagerTags={};for(var keys=Object.keys(object.resourceManagerTags),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AllocationAffinity;while(reader.pos>>3){case 1:{message.consumeAllocationType=reader.int32();break}case 2:{message.key=reader.string();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};AllocationAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AllocationAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.consumeAllocationType!=null&&message.hasOwnProperty("consumeAllocationType")){properties._consumeAllocationType=1;switch(message.consumeAllocationType){default:return"consumeAllocationType: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AllocationAffinity;switch(object.consumeAllocationType){default:if(typeof object.consumeAllocationType==="number"){message.consumeAllocationType=object.consumeAllocationType;break}break;case"TYPE_UNSPECIFIED":case 0:message.consumeAllocationType=0;break;case"NO_RESERVATION":case 1:message.consumeAllocationType=1;break;case"ANY_RESERVATION":case 2:message.consumeAllocationType=2;break;case"SPECIFIC_RESERVATION":case 3:message.consumeAllocationType=3;break}if(object.key!=null)message.key=String(object.key);if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Scheduling;while(reader.pos>>3){case 1:{message.onHostMaintenance=reader.int32();break}case 2:{message.automaticRestart=reader.bool();break}case 3:{message.preemptible=reader.bool();break}case 4:{if(!(message.nodeAffinities&&message.nodeAffinities.length))message.nodeAffinities=[];message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{message.minNodeCpus=reader.int32();break}case 6:{message.provisioningModel=reader.int32();break}case 7:{message.instanceTerminationAction=reader.int32();break}case 10:{message.localSsdRecoveryTimeout=$root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};Scheduling.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Scheduling.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.onHostMaintenance!=null&&message.hasOwnProperty("onHostMaintenance")){properties._onHostMaintenance=1;switch(message.onHostMaintenance){default:return"onHostMaintenance: enum value expected";case 0:case 1:case 1e3:break}}if(message.automaticRestart!=null&&message.hasOwnProperty("automaticRestart")){properties._automaticRestart=1;if(typeof message.automaticRestart!=="boolean")return"automaticRestart: boolean expected"}if(message.preemptible!=null&&message.hasOwnProperty("preemptible")){properties._preemptible=1;if(typeof message.preemptible!=="boolean")return"preemptible: boolean expected"}if(message.nodeAffinities!=null&&message.hasOwnProperty("nodeAffinities")){if(!Array.isArray(message.nodeAffinities))return"nodeAffinities: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Scheduling;switch(object.onHostMaintenance){default:if(typeof object.onHostMaintenance==="number"){message.onHostMaintenance=object.onHostMaintenance;break}break;case"ON_HOST_MAINTENANCE_UNSPECIFIED":case 0:message.onHostMaintenance=0;break;case"TERMINATE":case 1:message.onHostMaintenance=1;break;case"MIGRATE":case 1e3:message.onHostMaintenance=1e3;break}if(object.automaticRestart!=null)message.automaticRestart=Boolean(object.automaticRestart);if(object.preemptible!=null)message.preemptible=Boolean(object.preemptible);if(object.nodeAffinities){if(!Array.isArray(object.nodeAffinities))throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected");message.nodeAffinities=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.operator=reader.int32();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};NodeAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NodeAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.operator!=null&&message.hasOwnProperty("operator")){properties._operator=1;switch(message.operator){default:return"operator: enum value expected";case 0:case 1:case 2:break}}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity;if(object.key!=null)message.key=String(object.key);switch(object.operator){default:if(typeof object.operator==="number"){message.operator=object.operator;break}break;case"OPERATOR_UNSPECIFIED":case 0:message.operator=0;break;case"IN":case 1:message.operator=1;break;case"NOT_IN":case 2:message.operator=2;break}if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.SchedulingDuration;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};SchedulingDuration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SchedulingDuration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){properties._seconds=1;if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){properties._nanos=1;if(!$util.isInteger(message.nanos))return"nanos: integer expected"}return null};SchedulingDuration.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.SchedulingDuration;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};SchedulingDuration.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(options.oneofs)object._seconds="seconds"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){object.nanos=message.nanos;if(options.oneofs)object._nanos="nanos"}return object};SchedulingDuration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SchedulingDuration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.SchedulingDuration"};return SchedulingDuration}();v1.ServiceAccount=function(){function ServiceAccount(properties){this.scopes=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ServiceAccount;while(reader.pos>>3){case 1:{message.email=reader.string();break}case 2:{if(!(message.scopes&&message.scopes.length))message.scopes=[];message.scopes.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};ServiceAccount.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceAccount.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.email!=null&&message.hasOwnProperty("email")){properties._email=1;if(!$util.isString(message.email))return"email: string expected"}if(message.scopes!=null&&message.hasOwnProperty("scopes")){if(!Array.isArray(message.scopes))return"scopes: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ServiceAccount;if(object.email!=null)message.email=String(object.email);if(object.scopes){if(!Array.isArray(object.scopes))throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected");message.scopes=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.Tags;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Tags.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Tags.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.Tags;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AttachedDisk;while(reader.pos>>3){case 1:{message.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.deviceName=reader.string();break}case 5:{message.kind=reader.string();break}case 6:{message.diskTypeDeprecated=reader.int32();break}case 7:{message.mode=reader.int32();break}case 8:{message.source=reader.string();break}case 9:{message.index=reader.int64();break}case 10:{message.boot=reader.bool();break}case 11:{message.autoDelete=reader.bool();break}case 12:{if(!(message.license&&message.license.length))message.license=[];message.license.push(reader.string());break}case 13:{message.diskInterface=reader.int32();break}case 14:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 15:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.diskSizeGb=reader.int64();break}case 17:{message.savedState=reader.int32();break}case 18:{message.diskType=reader.string();break}case 19:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AttachedDisk.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AttachedDisk.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){properties._initializeParams=1;{var error=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams,long+1);if(error)return"initializeParams."+error}}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){properties._deviceName=1;if(!$util.isString(message.deviceName))return"deviceName: string expected"}if(message.kind!=null&&message.hasOwnProperty("kind")){properties._kind=1;if(!$util.isString(message.kind))return"kind: string expected"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){properties._diskTypeDeprecated=1;switch(message.diskTypeDeprecated){default:return"diskTypeDeprecated: enum value expected";case 0:case 1:case 2:break}}if(message.mode!=null&&message.hasOwnProperty("mode")){properties._mode=1;switch(message.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.source!=null&&message.hasOwnProperty("source")){properties._source=1;if(!$util.isString(message.source))return"source: string expected"}if(message.index!=null&&message.hasOwnProperty("index")){properties._index=1;if(!$util.isInteger(message.index)&&!(message.index&&$util.isInteger(message.index.low)&&$util.isInteger(message.index.high)))return"index: integer|Long expected"}if(message.boot!=null&&message.hasOwnProperty("boot")){properties._boot=1;if(typeof message.boot!=="boolean")return"boot: boolean expected"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){properties._autoDelete=1;if(typeof message.autoDelete!=="boolean")return"autoDelete: boolean expected"}if(message.license!=null&&message.hasOwnProperty("license")){if(!Array.isArray(message.license))return"license: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AttachedDisk;if(object.initializeParams!=null){if(typeof object.initializeParams!=="object")throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected");message.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams,long+1)}if(object.deviceName!=null)message.deviceName=String(object.deviceName);if(object.kind!=null)message.kind=String(object.kind);switch(object.diskTypeDeprecated){default:if(typeof object.diskTypeDeprecated==="number"){message.diskTypeDeprecated=object.diskTypeDeprecated;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.diskTypeDeprecated=0;break;case"SCRATCH":case 1:message.diskTypeDeprecated=1;break;case"PERSISTENT":case 2:message.diskTypeDeprecated=2;break}switch(object.mode){default:if(typeof object.mode==="number"){message.mode=object.mode;break}break;case"DISK_MODE_UNSPECIFIED":case 0:message.mode=0;break;case"READ_WRITE":case 1:message.mode=1;break;case"READ_ONLY":case 2:message.mode=2;break;case"LOCKED":case 3:message.mode=3;break}if(object.source!=null)message.source=String(object.source);if(object.index!=null)if($util.Long)(message.index=$util.Long.fromValue(object.index)).unsigned=false;else if(typeof object.index==="string")message.index=parseInt(object.index,10);else if(typeof object.index==="number")message.index=object.index;else if(typeof object.index==="object")message.index=new $util.LongBits(object.index.low>>>0,object.index.high>>>0).toNumber();if(object.boot!=null)message.boot=Boolean(object.boot);if(object.autoDelete!=null)message.autoDelete=Boolean(object.autoDelete);if(object.license){if(!Array.isArray(object.license))throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected");message.license=[];for(var i=0;i>>0,object.diskSizeGb.high>>>0).toNumber();switch(object.savedState){default:if(typeof object.savedState==="number"){message.savedState=object.savedState;break}break;case"DISK_SAVED_STATE_UNSPECIFIED":case 0:message.savedState=0;break;case"PRESERVED":case 1:message.savedState=1;break}if(object.diskType!=null)message.diskType=String(object.diskType);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"SCRATCH":case 1:message.type=1;break;case"PERSISTENT":case 2:message.type=2;break}return message};AttachedDisk.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.arrays||options.defaults){object.license=[];object.guestOsFeature=[]}if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){object.initializeParams=$root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams,options);if(options.oneofs)object._initializeParams="initializeParams"}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){object.deviceName=message.deviceName;if(options.oneofs)object._deviceName="deviceName"}if(message.kind!=null&&message.hasOwnProperty("kind")){object.kind=message.kind;if(options.oneofs)object._kind="kind"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){object.diskTypeDeprecated=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated]===undefined?message.diskTypeDeprecated:$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated]:message.diskTypeDeprecated;if(options.oneofs)object._diskTypeDeprecated="diskTypeDeprecated"}if(message.mode!=null&&message.hasOwnProperty("mode")){object.mode=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode]===undefined?message.mode:$root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode]:message.mode;if(options.oneofs)object._mode="mode"}if(message.source!=null&&message.hasOwnProperty("source")){object.source=message.source;if(options.oneofs)object._source="source"}if(message.index!=null&&message.hasOwnProperty("index")){if(typeof message.index==="number")object.index=options.longs===String?String(message.index):message.index;else object.index=options.longs===String?$util.Long.prototype.toString.call(message.index):options.longs===Number?new $util.LongBits(message.index.low>>>0,message.index.high>>>0).toNumber():message.index;if(options.oneofs)object._index="index"}if(message.boot!=null&&message.hasOwnProperty("boot")){object.boot=message.boot;if(options.oneofs)object._boot="boot"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){object.autoDelete=message.autoDelete;if(options.oneofs)object._autoDelete="autoDelete"}if(message.license&&message.license.length){object.license=[];for(var j=0;j>>0,message.diskSizeGb.high>>>0).toNumber():message.diskSizeGb;if(options.oneofs)object._diskSizeGb="diskSizeGb"}if(message.savedState!=null&&message.hasOwnProperty("savedState")){object.savedState=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState]===undefined?message.savedState:$root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState]:message.savedState;if(options.oneofs)object._savedState="savedState"}if(message.diskType!=null&&message.hasOwnProperty("diskType")){object.diskType=message.diskType;if(options.oneofs)object._diskType="diskType"}if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};AttachedDisk.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AttachedDisk.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.AttachedDisk"};AttachedDisk.InitializeParams=function(){function InitializeParams(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams;while(reader.pos>>3){case 1:{message.diskName=reader.string();break}case 2:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};InitializeParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.diskName!=null&&message.hasOwnProperty("diskName")){properties._diskName=1;if(!$util.isString(message.diskName))return"diskName: string expected"}if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams;if(object.diskName!=null)message.diskName=String(object.diskName);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GuestOsFeature;while(reader.pos>>3){case 1:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GuestOsFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GuestOsFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:break}}return null};GuestOsFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GuestOsFeature;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"FEATURE_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"VIRTIO_SCSI_MULTIQUEUE":case 1:message.type=1;break;case"WINDOWS":case 2:message.type=2;break;case"MULTI_IP_SUBNET":case 3:message.type=3;break;case"UEFI_COMPATIBLE":case 4:message.type=4;break;case"SECURE_BOOT":case 5:message.type=5;break;case"GVNIC":case 6:message.type=6;break;case"SEV_CAPABLE":case 7:message.type=7;break;case"BARE_METAL_LINUX_COMPATIBLE":case 8:message.type=8;break;case"SUSPEND_RESUME_COMPATIBLE":case 9:message.type=9;break;case"SEV_LIVE_MIGRATABLE":case 10:message.type=10;break;case"SEV_SNP_CAPABLE":case 11:message.type=11;break;case"TDX_CAPABLE":case 12:message.type=12;break;case"IDPF":case 13:message.type=13;break;case"SEV_LIVE_MIGRATABLE_V2":case 14:message.type=14;break}return message};GuestOsFeature.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};GuestOsFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GuestOsFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GuestOsFeature"};GuestOsFeature.FeatureType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FEATURE_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="VIRTIO_SCSI_MULTIQUEUE"]=1;values[valuesById[2]="WINDOWS"]=2;values[valuesById[3]="MULTI_IP_SUBNET"]=3;values[valuesById[4]="UEFI_COMPATIBLE"]=4;values[valuesById[5]="SECURE_BOOT"]=5;values[valuesById[6]="GVNIC"]=6;values[valuesById[7]="SEV_CAPABLE"]=7;values[valuesById[8]="BARE_METAL_LINUX_COMPATIBLE"]=8;values[valuesById[9]="SUSPEND_RESUME_COMPATIBLE"]=9;values[valuesById[10]="SEV_LIVE_MIGRATABLE"]=10;values[valuesById[11]="SEV_SNP_CAPABLE"]=11;values[valuesById[12]="TDX_CAPABLE"]=12;values[valuesById[13]="IDPF"]=13;values[valuesById[14]="SEV_LIVE_MIGRATABLE_V2"]=14;return values}();return GuestOsFeature}();v1.KeyRevocationActionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="NONE"]=1;values[valuesById[2]="STOP"]=2;return values}();v1.DataSourceReference=function(){function DataSourceReference(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceReference;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.dataSource=reader.string();break}case 3:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.dataSourceBackupConfigState=reader.int32();break}case 5:{message.dataSourceBackupCount=reader.int64();break}case 6:{message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.totalStoredBytes=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))if(!$util.isString(message.dataSource))return"dataSource: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))switch(message.dataSourceBackupConfigState){default:return"dataSourceBackupConfigState: enum value expected";case 0:case 1:case 2:break}if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(!$util.isInteger(message.dataSourceBackupCount)&&!(message.dataSourceBackupCount&&$util.isInteger(message.dataSourceBackupCount.low)&&$util.isInteger(message.dataSourceBackupCount.high)))return"dataSourceBackupCount: integer|Long expected";if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo")){var error=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.verify(message.dataSourceBackupConfigInfo,long+1);if(error)return"dataSourceBackupConfigInfo."+error}if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo")){var error=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.verify(message.dataSourceGcpResourceInfo,long+1);if(error)return"dataSourceGcpResourceInfo."+error}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"}return null};DataSourceReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceReference;if(object.name!=null)message.name=String(object.name);if(object.dataSource!=null)message.dataSource=String(object.dataSource);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}switch(object.dataSourceBackupConfigState){default:if(typeof object.dataSourceBackupConfigState==="number"){message.dataSourceBackupConfigState=object.dataSourceBackupConfigState;break}break;case"BACKUP_CONFIG_STATE_UNSPECIFIED":case 0:message.dataSourceBackupConfigState=0;break;case"ACTIVE":case 1:message.dataSourceBackupConfigState=1;break;case"PASSIVE":case 2:message.dataSourceBackupConfigState=2;break}if(object.dataSourceBackupCount!=null)if($util.Long)(message.dataSourceBackupCount=$util.Long.fromValue(object.dataSourceBackupCount)).unsigned=false;else if(typeof object.dataSourceBackupCount==="string")message.dataSourceBackupCount=parseInt(object.dataSourceBackupCount,10);else if(typeof object.dataSourceBackupCount==="number")message.dataSourceBackupCount=object.dataSourceBackupCount;else if(typeof object.dataSourceBackupCount==="object")message.dataSourceBackupCount=new $util.LongBits(object.dataSourceBackupCount.low>>>0,object.dataSourceBackupCount.high>>>0).toNumber();if(object.dataSourceBackupConfigInfo!=null){if(typeof object.dataSourceBackupConfigInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.dataSourceBackupConfigInfo: object expected");message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.fromObject(object.dataSourceBackupConfigInfo,long+1)}if(object.dataSourceGcpResourceInfo!=null){if(typeof object.dataSourceGcpResourceInfo!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceReference.dataSourceGcpResourceInfo: object expected");message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.fromObject(object.dataSourceGcpResourceInfo,long+1)}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();return message};DataSourceReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.dataSource="";object.createTime=null;object.dataSourceBackupConfigState=options.enums===String?"BACKUP_CONFIG_STATE_UNSPECIFIED":0;if($util.Long){var long=new $util.Long(0,0,false);object.dataSourceBackupCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.dataSourceBackupCount=options.longs===String?"0":0;object.dataSourceBackupConfigInfo=null;object.dataSourceGcpResourceInfo=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))object.dataSource=message.dataSource;if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))object.dataSourceBackupConfigState=options.enums===String?$root.google.cloud.backupdr.v1.BackupConfigState[message.dataSourceBackupConfigState]===undefined?message.dataSourceBackupConfigState:$root.google.cloud.backupdr.v1.BackupConfigState[message.dataSourceBackupConfigState]:message.dataSourceBackupConfigState;if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(typeof message.dataSourceBackupCount==="number")object.dataSourceBackupCount=options.longs===String?String(message.dataSourceBackupCount):message.dataSourceBackupCount;else object.dataSourceBackupCount=options.longs===String?$util.Long.prototype.toString.call(message.dataSourceBackupCount):options.longs===Number?new $util.LongBits(message.dataSourceBackupCount.low>>>0,message.dataSourceBackupCount.high>>>0).toNumber():message.dataSourceBackupCount;if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo"))object.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo.toObject(message.dataSourceBackupConfigInfo,options);if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo"))object.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo.toObject(message.dataSourceGcpResourceInfo,options);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"}return object};DataSourceReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceReference"};return DataSourceReference}();v1.DataSourceBackupConfigInfo=function(){function DataSourceBackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo;while(reader.pos>>3){case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};DataSourceBackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceBackupConfigInfo;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.DataSourceBackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};DataSourceBackupConfigInfo.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}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);return object};DataSourceBackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceBackupConfigInfo"};return DataSourceBackupConfigInfo}();v1.DataSourceGcpResourceInfo=function(){function DataSourceGcpResourceInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.type=reader.string();break}case 3:{message.location=reader.string();break}case 4:{message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResourceInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResourceInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))if(!$util.isString(message.gcpResourcename))return"gcpResourcename: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.location!=null&&message.hasOwnProperty("location"))if(!$util.isString(message.location))return"location: string expected";if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.verify(message.cloudSqlInstanceProperties,long+1);if(error)return"cloudSqlInstanceProperties."+error}}return null};DataSourceGcpResourceInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.DataSourceGcpResourceInfo;if(object.gcpResourcename!=null)message.gcpResourcename=String(object.gcpResourcename);if(object.type!=null)message.type=String(object.type);if(object.location!=null)message.location=String(object.location);if(object.cloudSqlInstanceProperties!=null){if(typeof object.cloudSqlInstanceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResourceInfo.cloudSqlInstanceProperties: object expected");message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.fromObject(object.cloudSqlInstanceProperties,long+1)}return message};DataSourceGcpResourceInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.gcpResourcename="";object.type="";object.location=""}if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))object.gcpResourcename=message.gcpResourcename;if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.location!=null&&message.hasOwnProperty("location"))object.location=message.location;if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){object.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1.CloudSqlInstanceDataSourceReferenceProperties.toObject(message.cloudSqlInstanceProperties,options);if(options.oneofs)object.resourceProperties="cloudSqlInstanceProperties"}return object};DataSourceGcpResourceInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResourceInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.DataSourceGcpResourceInfo"};return DataSourceGcpResourceInfo}();v1.GetDataSourceReferenceRequest=function(){function GetDataSourceReferenceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceReferenceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceReferenceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceReferenceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.GetDataSourceReferenceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceReferenceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceReferenceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceReferenceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.GetDataSourceReferenceRequest"};return GetDataSourceReferenceRequest}();v1.ListDataSourceReferencesRequest=function(){function ListDataSourceReferencesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourceReferencesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourceReferencesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesRequest;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};ListDataSourceReferencesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourceReferencesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourceReferencesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListDataSourceReferencesRequest"};return ListDataSourceReferencesRequest}();v1.ListDataSourceReferencesResponse=function(){function ListDataSourceReferencesResponse(properties){this.dataSourceReferences=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourceReferencesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListDataSourceReferencesResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1.ListDataSourceReferencesResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchDataSourceReferencesForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest;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);return message};FetchDataSourceReferencesForResourceTypeRequest.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=""}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;return object};FetchDataSourceReferencesForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchDataSourceReferencesForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeRequest"};return FetchDataSourceReferencesForResourceTypeRequest}();v1.FetchDataSourceReferencesForResourceTypeResponse=function(){function FetchDataSourceReferencesForResourceTypeResponse(properties){this.dataSourceReferences=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1.FetchDataSourceReferencesForResourceTypeResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListResourceBackupConfigsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsRequest;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};ListResourceBackupConfigsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListResourceBackupConfigsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListResourceBackupConfigsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.ListResourceBackupConfigsRequest"};return ListResourceBackupConfigsRequest}();v1.ListResourceBackupConfigsResponse=function(){function ListResourceBackupConfigsResponse(properties){this.resourceBackupConfigs=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse;while(reader.pos>>3){case 1:{if(!(message.resourceBackupConfigs&&message.resourceBackupConfigs.length))message.resourceBackupConfigs=[];message.resourceBackupConfigs.push($root.google.cloud.backupdr.v1.ResourceBackupConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceBackupConfigs!=null&&message.hasOwnProperty("resourceBackupConfigs")){if(!Array.isArray(message.resourceBackupConfigs))return"resourceBackupConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ListResourceBackupConfigsResponse;if(object.resourceBackupConfigs){if(!Array.isArray(object.resourceBackupConfigs))throw TypeError(".google.cloud.backupdr.v1.ListResourceBackupConfigsResponse.resourceBackupConfigs: array expected");message.resourceBackupConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.ResourceBackupConfig,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.uid=reader.string();break}case 3:{message.targetResource=reader.string();break}case 4:{message.targetResourceDisplayName=reader.string();break}case 5:{message.targetResourceType=reader.int32();break}case 6:{if(message.targetResourceLabels===$util.emptyObject)message.targetResourceLabels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.targetResourceLabels,key);message.targetResourceLabels[key]=value;break}case 7:{if(!(message.backupConfigsDetails&&message.backupConfigsDetails.length))message.backupConfigsDetails=[];message.backupConfigsDetails.push($root.google.cloud.backupdr.v1.BackupConfigDetails.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.backupConfigured=reader.bool();break}case 9:{message.vaulted=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ResourceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ResourceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.uid!=null&&message.hasOwnProperty("uid"))if(!$util.isString(message.uid))return"uid: string expected";if(message.targetResource!=null&&message.hasOwnProperty("targetResource"))if(!$util.isString(message.targetResource))return"targetResource: string expected";if(message.targetResourceDisplayName!=null&&message.hasOwnProperty("targetResourceDisplayName"))if(!$util.isString(message.targetResourceDisplayName))return"targetResourceDisplayName: string expected";if(message.targetResourceType!=null&&message.hasOwnProperty("targetResourceType"))switch(message.targetResourceType){default:return"targetResourceType: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.targetResourceLabels!=null&&message.hasOwnProperty("targetResourceLabels")){if(!$util.isObject(message.targetResourceLabels))return"targetResourceLabels: object expected";var key=Object.keys(message.targetResourceLabels);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.ResourceBackupConfig;if(object.name!=null)message.name=String(object.name);if(object.uid!=null)message.uid=String(object.uid);if(object.targetResource!=null)message.targetResource=String(object.targetResource);if(object.targetResourceDisplayName!=null)message.targetResourceDisplayName=String(object.targetResourceDisplayName);switch(object.targetResourceType){default:if(typeof object.targetResourceType==="number"){message.targetResourceType=object.targetResourceType;break}break;case"RESOURCE_TYPE_UNSPECIFIED":case 0:message.targetResourceType=0;break;case"CLOUD_SQL_INSTANCE":case 1:message.targetResourceType=1;break;case"COMPUTE_ENGINE_VM":case 2:message.targetResourceType=2;break;case"COMPUTE_ENGINE_DISK":case 3:message.targetResourceType=3;break;case"COMPUTE_ENGINE_REGIONAL_DISK":case 4:message.targetResourceType=4;break}if(object.targetResourceLabels){if(typeof object.targetResourceLabels!=="object")throw TypeError(".google.cloud.backupdr.v1.ResourceBackupConfig.targetResourceLabels: object expected");message.targetResourceLabels={};for(var keys=Object.keys(object.targetResourceLabels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupConfigDetails;while(reader.pos>>3){case 1:{message.backupConfigSource=reader.string();break}case 2:{message.backupConfigSourceDisplayName=reader.string();break}case 3:{message.type=reader.int32();break}case 4:{message.state=reader.int32();break}case 5:{message.pitrSettings=$root.google.cloud.backupdr.v1.PitrSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.applicableResource=reader.string();break}case 8:{message.backupVault=reader.string();break}case 12:{if(!(message.backupLocations&&message.backupLocations.length))message.backupLocations=[];message.backupLocations.push($root.google.cloud.backupdr.v1.BackupLocation.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.backupDrPlanConfig=$root.google.cloud.backupdr.v1.BackupDrPlanConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 11:{message.backupDrTemplateConfig=$root.google.cloud.backupdr.v1.BackupDrTemplateConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigDetails.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigDetails.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.backupConfigSource!=null&&message.hasOwnProperty("backupConfigSource"))if(!$util.isString(message.backupConfigSource))return"backupConfigSource: string expected";if(message.backupConfigSourceDisplayName!=null&&message.hasOwnProperty("backupConfigSourceDisplayName"))if(!$util.isString(message.backupConfigSourceDisplayName))return"backupConfigSourceDisplayName: string expected";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.state!=null&&message.hasOwnProperty("state"))switch(message.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:break}if(message.pitrSettings!=null&&message.hasOwnProperty("pitrSettings")){var error=$root.google.cloud.backupdr.v1.PitrSettings.verify(message.pitrSettings,long+1);if(error)return"pitrSettings."+error}if(message.latestSuccessfulBackupTime!=null&&message.hasOwnProperty("latestSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.latestSuccessfulBackupTime,long+1);if(error)return"latestSuccessfulBackupTime."+error}if(message.applicableResource!=null&&message.hasOwnProperty("applicableResource"))if(!$util.isString(message.applicableResource))return"applicableResource: string expected";if(message.backupVault!=null&&message.hasOwnProperty("backupVault"))if(!$util.isString(message.backupVault))return"backupVault: string expected";if(message.backupLocations!=null&&message.hasOwnProperty("backupLocations")){if(!Array.isArray(message.backupLocations))return"backupLocations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupConfigDetails;if(object.backupConfigSource!=null)message.backupConfigSource=String(object.backupConfigSource);if(object.backupConfigSourceDisplayName!=null)message.backupConfigSourceDisplayName=String(object.backupConfigSourceDisplayName);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"CLOUD_SQL_INSTANCE_BACKUP_CONFIG":case 1:message.type=1;break;case"COMPUTE_ENGINE_RESOURCE_POLICY":case 2:message.type=2;break;case"BACKUPDR_BACKUP_PLAN":case 3:message.type=3;break;case"BACKUPDR_TEMPLATE":case 4:message.type=4;break}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"ACTIVE":case 1:message.state=1;break;case"INACTIVE":case 2:message.state=2;break;case"ERROR":case 3:message.state=3;break}if(object.pitrSettings!=null){if(typeof object.pitrSettings!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.pitrSettings: object expected");message.pitrSettings=$root.google.cloud.backupdr.v1.PitrSettings.fromObject(object.pitrSettings,long+1)}if(object.latestSuccessfulBackupTime!=null){if(typeof object.latestSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.latestSuccessfulBackupTime: object expected");message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.latestSuccessfulBackupTime,long+1)}if(object.applicableResource!=null)message.applicableResource=String(object.applicableResource);if(object.backupVault!=null)message.backupVault=String(object.backupVault);if(object.backupLocations){if(!Array.isArray(object.backupLocations))throw TypeError(".google.cloud.backupdr.v1.BackupConfigDetails.backupLocations: array expected");message.backupLocations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.PitrSettings;while(reader.pos>>3){case 1:{message.retentionDays=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};PitrSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PitrSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))if(!$util.isInteger(message.retentionDays))return"retentionDays: integer expected";return null};PitrSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.PitrSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.PitrSettings;if(object.retentionDays!=null)message.retentionDays=object.retentionDays|0;return message};PitrSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.retentionDays=0;if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))object.retentionDays=message.retentionDays;return object};PitrSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PitrSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.PitrSettings"};return PitrSettings}();v1.BackupDrTemplateConfig=function(){function BackupDrTemplateConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrTemplateConfig;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupDrTemplateConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrTemplateConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};BackupDrTemplateConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupDrTemplateConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrTemplateConfig;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};BackupDrTemplateConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};BackupDrTemplateConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrTemplateConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupDrTemplateConfig"};return BackupDrTemplateConfig}();v1.BackupDrPlanConfig=function(){function BackupDrPlanConfig(properties){this.backupDrPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrPlanConfig;while(reader.pos>>3){case 1:{if(!(message.backupDrPlanRules&&message.backupDrPlanRules.length))message.backupDrPlanRules=[];message.backupDrPlanRules.push($root.google.cloud.backupdr.v1.BackupDrPlanRule.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupDrPlanRules!=null&&message.hasOwnProperty("backupDrPlanRules")){if(!Array.isArray(message.backupDrPlanRules))return"backupDrPlanRules: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrPlanConfig;if(object.backupDrPlanRules){if(!Array.isArray(object.backupDrPlanRules))throw TypeError(".google.cloud.backupdr.v1.BackupDrPlanConfig.backupDrPlanRules: array expected");message.backupDrPlanRules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupDrPlanRule;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 2:{message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupTime,long+1);if(error)return"lastSuccessfulBackupTime."+error}return null};BackupDrPlanRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupDrPlanRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupDrPlanRule;if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.lastSuccessfulBackupTime!=null){if(typeof object.lastSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1.BackupDrPlanRule.lastSuccessfulBackupTime: object expected");message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupTime,long+1)}return message};BackupDrPlanRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastSuccessfulBackupTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime"))object.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupTime,options);return object};BackupDrPlanRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrPlanRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupDrPlanRule"};return BackupDrPlanRule}();v1.BackupLocation=function(){function BackupLocation(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1.BackupLocation;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.locationId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupLocation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLocation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(message.locationId!=null&&message.hasOwnProperty("locationId"))if(!$util.isString(message.locationId))return"locationId: string expected";return null};BackupLocation.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1.BackupLocation)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1.BackupLocation;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ZONAL":case 1:message.type=1;break;case"REGIONAL":case 2:message.type=2;break;case"MULTI_REGIONAL":case 3:message.type=3;break}if(object.locationId!=null)message.locationId=String(object.locationId);return message};BackupLocation.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type=options.enums===String?"TYPE_UNSPECIFIED":0;object.locationId=""}if(message.type!=null&&message.hasOwnProperty("type"))object.type=options.enums===String?$root.google.cloud.backupdr.v1.BackupLocation.Type[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1.BackupLocation.Type[message.type]:message.type;if(message.locationId!=null&&message.hasOwnProperty("locationId"))object.locationId=message.locationId;return object};BackupLocation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLocation.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1.BackupLocation"};BackupLocation.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ZONAL"]=1;values[valuesById[2]="REGIONAL"]=2;values[valuesById[3]="MULTI_REGIONAL"]=3;return values}();return BackupLocation}();return v1}();backupdr.v1beta=function(){var v1beta={};v1beta.AppliedAutoProtectionPolicy=function(){function AppliedAutoProtectionPolicy(properties){this.backupPlanDetails=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.sourceBinding=reader.string();break}case 3:{message.criteria=$root.google.cloud.backupdr.v1beta.Criteria.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{if(!(message.backupPlanDetails&&message.backupPlanDetails.length))message.backupPlanDetails=[];message.backupPlanDetails.push($root.google.cloud.backupdr.v1beta.BackupPlanDetail.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.bindingEvaluationSummary=$root.google.cloud.backupdr.v1beta.BindingEvaluationSummary.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.status=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AppliedAutoProtectionPolicy.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AppliedAutoProtectionPolicy.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.sourceBinding!=null&&message.hasOwnProperty("sourceBinding"))if(!$util.isString(message.sourceBinding))return"sourceBinding: string expected";if(message.criteria!=null&&message.hasOwnProperty("criteria")){var error=$root.google.cloud.backupdr.v1beta.Criteria.verify(message.criteria,long+1);if(error)return"criteria."+error}if(message.backupPlanDetails!=null&&message.hasOwnProperty("backupPlanDetails")){if(!Array.isArray(message.backupPlanDetails))return"backupPlanDetails: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy;if(object.name!=null)message.name=String(object.name);if(object.sourceBinding!=null)message.sourceBinding=String(object.sourceBinding);if(object.criteria!=null){if(typeof object.criteria!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.criteria: object expected");message.criteria=$root.google.cloud.backupdr.v1beta.Criteria.fromObject(object.criteria,long+1)}if(object.backupPlanDetails){if(!Array.isArray(object.backupPlanDetails))throw TypeError(".google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.backupPlanDetails: array expected");message.backupPlanDetails=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListAppliedAutoProtectionPoliciesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAppliedAutoProtectionPoliciesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListAppliedAutoProtectionPoliciesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest;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};ListAppliedAutoProtectionPoliciesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListAppliedAutoProtectionPoliciesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListAppliedAutoProtectionPoliciesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest"};return ListAppliedAutoProtectionPoliciesRequest}();v1beta.ListAppliedAutoProtectionPoliciesResponse=function(){function ListAppliedAutoProtectionPoliciesResponse(properties){this.appliedAutoProtectionPolicies=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse;while(reader.pos>>3){case 1:{if(!(message.appliedAutoProtectionPolicies&&message.appliedAutoProtectionPolicies.length))message.appliedAutoProtectionPolicies=[];message.appliedAutoProtectionPolicies.push($root.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListAppliedAutoProtectionPoliciesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAppliedAutoProtectionPoliciesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.appliedAutoProtectionPolicies!=null&&message.hasOwnProperty("appliedAutoProtectionPolicies")){if(!Array.isArray(message.appliedAutoProtectionPolicies))return"appliedAutoProtectionPolicies: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse;if(object.appliedAutoProtectionPolicies){if(!Array.isArray(object.appliedAutoProtectionPolicies))throw TypeError(".google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.appliedAutoProtectionPolicies: array expected");message.appliedAutoProtectionPolicies=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AutoProtectionPolicy;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{if(!(message.backupPlanDetails&&message.backupPlanDetails.length))message.backupPlanDetails=[];message.backupPlanDetails.push($root.google.cloud.backupdr.v1beta.BackupPlanDetail.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.criteria=$root.google.cloud.backupdr.v1beta.Criteria.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.state=reader.int32();break}case 6:{message.etag=reader.string();break}case 7:{message.bindingSummary=$root.google.cloud.backupdr.v1beta.BindingSummary.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.policyEvaluationSummary=$root.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 10:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};AutoProtectionPolicy.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AutoProtectionPolicy.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.backupPlanDetails!=null&&message.hasOwnProperty("backupPlanDetails")){if(!Array.isArray(message.backupPlanDetails))return"backupPlanDetails: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AutoProtectionPolicy;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.backupPlanDetails){if(!Array.isArray(object.backupPlanDetails))throw TypeError(".google.cloud.backupdr.v1beta.AutoProtectionPolicy.backupPlanDetails: array expected");message.backupPlanDetails=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupPlanDetail;while(reader.pos>>3){case 1:{message.resourceType=reader.string();break}case 2:{message.backupPlan=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanDetail.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanDetail.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))if(!$util.isString(message.backupPlan))return"backupPlan: string expected";return null};BackupPlanDetail.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupPlanDetail)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupPlanDetail;if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.backupPlan!=null)message.backupPlan=String(object.backupPlan);return message};BackupPlanDetail.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.resourceType="";object.backupPlan=""}if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))object.resourceType=message.resourceType;if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=message.backupPlan;return object};BackupPlanDetail.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupPlanDetail.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupPlanDetail"};return BackupPlanDetail}();v1beta.Criteria=function(){function Criteria(properties){this.matchingConditions=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Criteria;while(reader.pos>>3){case 1:{if(!(message.matchingConditions&&message.matchingConditions.length))message.matchingConditions=[];message.matchingConditions.push($root.google.cloud.backupdr.v1beta.MatchingCondition.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Criteria.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Criteria.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.matchingConditions!=null&&message.hasOwnProperty("matchingConditions")){if(!Array.isArray(message.matchingConditions))return"matchingConditions: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Criteria;if(object.matchingConditions){if(!Array.isArray(object.matchingConditions))throw TypeError(".google.cloud.backupdr.v1beta.Criteria.matchingConditions: array expected");message.matchingConditions=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.MatchingCondition;while(reader.pos>>3){case 1:{message.labelCondition=$root.google.cloud.backupdr.v1beta.KeyValuePair.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MatchingCondition.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MatchingCondition.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.labelCondition!=null&&message.hasOwnProperty("labelCondition")){properties.condition=1;{var error=$root.google.cloud.backupdr.v1beta.KeyValuePair.verify(message.labelCondition,long+1);if(error)return"labelCondition."+error}}return null};MatchingCondition.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.MatchingCondition)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.MatchingCondition;if(object.labelCondition!=null){if(typeof object.labelCondition!=="object")throw TypeError(".google.cloud.backupdr.v1beta.MatchingCondition.labelCondition: object expected");message.labelCondition=$root.google.cloud.backupdr.v1beta.KeyValuePair.fromObject(object.labelCondition,long+1)}return message};MatchingCondition.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.labelCondition!=null&&message.hasOwnProperty("labelCondition")){object.labelCondition=$root.google.cloud.backupdr.v1beta.KeyValuePair.toObject(message.labelCondition,options);if(options.oneofs)object.condition="labelCondition"}return object};MatchingCondition.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};MatchingCondition.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.MatchingCondition"};return MatchingCondition}();v1beta.PolicyEvaluationSummary=function(){function PolicyEvaluationSummary(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.PolicyEvaluationSummary;while(reader.pos>>3){case 1:{message.matchingResourceCount=reader.int64();break}case 2:{message.protectedResourceCount=reader.int64();break}case 3:{message.failedResourceCount=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};PolicyEvaluationSummary.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PolicyEvaluationSummary.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.matchingResourceCount!=null&&message.hasOwnProperty("matchingResourceCount"))if(!$util.isInteger(message.matchingResourceCount)&&!(message.matchingResourceCount&&$util.isInteger(message.matchingResourceCount.low)&&$util.isInteger(message.matchingResourceCount.high)))return"matchingResourceCount: integer|Long expected";if(message.protectedResourceCount!=null&&message.hasOwnProperty("protectedResourceCount"))if(!$util.isInteger(message.protectedResourceCount)&&!(message.protectedResourceCount&&$util.isInteger(message.protectedResourceCount.low)&&$util.isInteger(message.protectedResourceCount.high)))return"protectedResourceCount: integer|Long expected";if(message.failedResourceCount!=null&&message.hasOwnProperty("failedResourceCount"))if(!$util.isInteger(message.failedResourceCount)&&!(message.failedResourceCount&&$util.isInteger(message.failedResourceCount.low)&&$util.isInteger(message.failedResourceCount.high)))return"failedResourceCount: integer|Long expected";return null};PolicyEvaluationSummary.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.PolicyEvaluationSummary)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.PolicyEvaluationSummary;if(object.matchingResourceCount!=null)if($util.Long)(message.matchingResourceCount=$util.Long.fromValue(object.matchingResourceCount)).unsigned=false;else if(typeof object.matchingResourceCount==="string")message.matchingResourceCount=parseInt(object.matchingResourceCount,10);else if(typeof object.matchingResourceCount==="number")message.matchingResourceCount=object.matchingResourceCount;else if(typeof object.matchingResourceCount==="object")message.matchingResourceCount=new $util.LongBits(object.matchingResourceCount.low>>>0,object.matchingResourceCount.high>>>0).toNumber();if(object.protectedResourceCount!=null)if($util.Long)(message.protectedResourceCount=$util.Long.fromValue(object.protectedResourceCount)).unsigned=false;else if(typeof object.protectedResourceCount==="string")message.protectedResourceCount=parseInt(object.protectedResourceCount,10);else if(typeof object.protectedResourceCount==="number")message.protectedResourceCount=object.protectedResourceCount;else if(typeof object.protectedResourceCount==="object")message.protectedResourceCount=new $util.LongBits(object.protectedResourceCount.low>>>0,object.protectedResourceCount.high>>>0).toNumber();if(object.failedResourceCount!=null)if($util.Long)(message.failedResourceCount=$util.Long.fromValue(object.failedResourceCount)).unsigned=false;else if(typeof object.failedResourceCount==="string")message.failedResourceCount=parseInt(object.failedResourceCount,10);else if(typeof object.failedResourceCount==="number")message.failedResourceCount=object.failedResourceCount;else if(typeof object.failedResourceCount==="object")message.failedResourceCount=new $util.LongBits(object.failedResourceCount.low>>>0,object.failedResourceCount.high>>>0).toNumber();return message};PolicyEvaluationSummary.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.matchingResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.matchingResourceCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.protectedResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.protectedResourceCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.failedResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.failedResourceCount=options.longs===String?"0":0}if(message.matchingResourceCount!=null&&message.hasOwnProperty("matchingResourceCount"))if(typeof message.matchingResourceCount==="number")object.matchingResourceCount=options.longs===String?String(message.matchingResourceCount):message.matchingResourceCount;else object.matchingResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.matchingResourceCount):options.longs===Number?new $util.LongBits(message.matchingResourceCount.low>>>0,message.matchingResourceCount.high>>>0).toNumber():message.matchingResourceCount;if(message.protectedResourceCount!=null&&message.hasOwnProperty("protectedResourceCount"))if(typeof message.protectedResourceCount==="number")object.protectedResourceCount=options.longs===String?String(message.protectedResourceCount):message.protectedResourceCount;else object.protectedResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.protectedResourceCount):options.longs===Number?new $util.LongBits(message.protectedResourceCount.low>>>0,message.protectedResourceCount.high>>>0).toNumber():message.protectedResourceCount;if(message.failedResourceCount!=null&&message.hasOwnProperty("failedResourceCount"))if(typeof message.failedResourceCount==="number")object.failedResourceCount=options.longs===String?String(message.failedResourceCount):message.failedResourceCount;else object.failedResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.failedResourceCount):options.longs===Number?new $util.LongBits(message.failedResourceCount.low>>>0,message.failedResourceCount.high>>>0).toNumber():message.failedResourceCount;return object};PolicyEvaluationSummary.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PolicyEvaluationSummary.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.PolicyEvaluationSummary"};return PolicyEvaluationSummary}();v1beta.BindingSummary=function(){function BindingSummary(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BindingSummary;while(reader.pos>>3){case 1:{message.projectCount=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};BindingSummary.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BindingSummary.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.projectCount!=null&&message.hasOwnProperty("projectCount"))if(!$util.isInteger(message.projectCount)&&!(message.projectCount&&$util.isInteger(message.projectCount.low)&&$util.isInteger(message.projectCount.high)))return"projectCount: integer|Long expected";return null};BindingSummary.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BindingSummary)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BindingSummary;if(object.projectCount!=null)if($util.Long)(message.projectCount=$util.Long.fromValue(object.projectCount)).unsigned=false;else if(typeof object.projectCount==="string")message.projectCount=parseInt(object.projectCount,10);else if(typeof object.projectCount==="number")message.projectCount=object.projectCount;else if(typeof object.projectCount==="object")message.projectCount=new $util.LongBits(object.projectCount.low>>>0,object.projectCount.high>>>0).toNumber();return message};BindingSummary.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.projectCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.projectCount=options.longs===String?"0":0;if(message.projectCount!=null&&message.hasOwnProperty("projectCount"))if(typeof message.projectCount==="number")object.projectCount=options.longs===String?String(message.projectCount):message.projectCount;else object.projectCount=options.longs===String?$util.Long.prototype.toString.call(message.projectCount):options.longs===Number?new $util.LongBits(message.projectCount.low>>>0,message.projectCount.high>>>0).toNumber():message.projectCount;return object};BindingSummary.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BindingSummary.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BindingSummary"};return BindingSummary}();v1beta.KeyValuePair=function(){function KeyValuePair(properties){this.values=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.KeyValuePair;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};KeyValuePair.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};KeyValuePair.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.key!=null&&message.hasOwnProperty("key"))if(!$util.isString(message.key))return"key: string expected";if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.KeyValuePair;if(object.key!=null)message.key=String(object.key);if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1beta.KeyValuePair.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.autoProtectionPolicyId=reader.string();break}case 3:{message.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CreateAutoProtectionPolicyRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateAutoProtectionPolicyRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.autoProtectionPolicyId!=null&&message.hasOwnProperty("autoProtectionPolicyId"))if(!$util.isString(message.autoProtectionPolicyId))return"autoProtectionPolicyId: string expected";if(message.autoProtectionPolicy!=null&&message.hasOwnProperty("autoProtectionPolicy")){var error=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.verify(message.autoProtectionPolicy,long+1);if(error)return"autoProtectionPolicy."+error}return null};CreateAutoProtectionPolicyRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.autoProtectionPolicyId!=null)message.autoProtectionPolicyId=String(object.autoProtectionPolicyId);if(object.autoProtectionPolicy!=null){if(typeof object.autoProtectionPolicy!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.autoProtectionPolicy: object expected");message.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.fromObject(object.autoProtectionPolicy,long+1)}return message};CreateAutoProtectionPolicyRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.autoProtectionPolicyId="";object.autoProtectionPolicy=null}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.autoProtectionPolicyId!=null&&message.hasOwnProperty("autoProtectionPolicyId"))object.autoProtectionPolicyId=message.autoProtectionPolicyId;if(message.autoProtectionPolicy!=null&&message.hasOwnProperty("autoProtectionPolicy"))object.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.toObject(message.autoProtectionPolicy,options);return object};CreateAutoProtectionPolicyRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateAutoProtectionPolicyRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest"};return CreateAutoProtectionPolicyRequest}();v1beta.GetAutoProtectionPolicyRequest=function(){function GetAutoProtectionPolicyRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetAutoProtectionPolicyRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetAutoProtectionPolicyRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetAutoProtectionPolicyRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest;if(object.name!=null)message.name=String(object.name);return message};GetAutoProtectionPolicyRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetAutoProtectionPolicyRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetAutoProtectionPolicyRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest"};return GetAutoProtectionPolicyRequest}();v1beta.UpdateAutoProtectionPolicyRequest=function(){function UpdateAutoProtectionPolicyRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest;while(reader.pos>>3){case 1:{message.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};UpdateAutoProtectionPolicyRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateAutoProtectionPolicyRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.autoProtectionPolicy!=null&&message.hasOwnProperty("autoProtectionPolicy")){var error=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.verify(message.autoProtectionPolicy,long+1);if(error)return"autoProtectionPolicy."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}return null};UpdateAutoProtectionPolicyRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest;if(object.autoProtectionPolicy!=null){if(typeof object.autoProtectionPolicy!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.autoProtectionPolicy: object expected");message.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.fromObject(object.autoProtectionPolicy,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}return message};UpdateAutoProtectionPolicyRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.autoProtectionPolicy=null;object.updateMask=null}if(message.autoProtectionPolicy!=null&&message.hasOwnProperty("autoProtectionPolicy"))object.autoProtectionPolicy=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.toObject(message.autoProtectionPolicy,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);return object};UpdateAutoProtectionPolicyRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateAutoProtectionPolicyRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest"};return UpdateAutoProtectionPolicyRequest}();v1beta.DeleteAutoProtectionPolicyRequest=function(){function DeleteAutoProtectionPolicyRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.etag=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteAutoProtectionPolicyRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteAutoProtectionPolicyRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.etag!=null&&message.hasOwnProperty("etag"))if(!$util.isString(message.etag))return"etag: string expected";return null};DeleteAutoProtectionPolicyRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest;if(object.name!=null)message.name=String(object.name);if(object.etag!=null)message.etag=String(object.etag);return message};DeleteAutoProtectionPolicyRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.etag=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.etag!=null&&message.hasOwnProperty("etag"))object.etag=message.etag;return object};DeleteAutoProtectionPolicyRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteAutoProtectionPolicyRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest"};return DeleteAutoProtectionPolicyRequest}();v1beta.ListAutoProtectionPoliciesRequest=function(){function ListAutoProtectionPoliciesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListAutoProtectionPoliciesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAutoProtectionPoliciesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListAutoProtectionPoliciesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest;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};ListAutoProtectionPoliciesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListAutoProtectionPoliciesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListAutoProtectionPoliciesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest"};return ListAutoProtectionPoliciesRequest}();v1beta.ListAutoProtectionPoliciesResponse=function(){function ListAutoProtectionPoliciesResponse(properties){this.autoProtectionPolicies=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse;while(reader.pos>>3){case 1:{if(!(message.autoProtectionPolicies&&message.autoProtectionPolicies.length))message.autoProtectionPolicies=[];message.autoProtectionPolicies.push($root.google.cloud.backupdr.v1beta.AutoProtectionPolicy.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListAutoProtectionPoliciesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAutoProtectionPoliciesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.autoProtectionPolicies!=null&&message.hasOwnProperty("autoProtectionPolicies")){if(!Array.isArray(message.autoProtectionPolicies))return"autoProtectionPolicies: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse;if(object.autoProtectionPolicies){if(!Array.isArray(object.autoProtectionPolicies))throw TypeError(".google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.autoProtectionPolicies: array expected");message.autoProtectionPolicies=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.state=reader.int32();break}case 4:{message.scope=reader.string();break}case 5:{message.bindingEvaluationSummary=$root.google.cloud.backupdr.v1beta.BindingEvaluationSummary.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.etag=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AutoProtectionPolicyBinding.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AutoProtectionPolicyBinding.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: 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:break}if(message.scope!=null&&message.hasOwnProperty("scope"))if(!$util.isString(message.scope))return"scope: string expected";if(message.bindingEvaluationSummary!=null&&message.hasOwnProperty("bindingEvaluationSummary")){var error=$root.google.cloud.backupdr.v1beta.BindingEvaluationSummary.verify(message.bindingEvaluationSummary,long+1);if(error)return"bindingEvaluationSummary."+error}if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);if(error)return"updateTime."+error}if(message.etag!=null&&message.hasOwnProperty("etag"))if(!$util.isString(message.etag))return"etag: string expected";return null};AutoProtectionPolicyBinding.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);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"DELETION_INITIATED":case 3:message.state=3;break}if(object.scope!=null)message.scope=String(object.scope);if(object.bindingEvaluationSummary!=null){if(typeof object.bindingEvaluationSummary!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.bindingEvaluationSummary: object expected");message.bindingEvaluationSummary=$root.google.cloud.backupdr.v1beta.BindingEvaluationSummary.fromObject(object.bindingEvaluationSummary,long+1)}if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.updateTime!=null){if(typeof object.updateTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.updateTime: object expected");message.updateTime=$root.google.protobuf.Timestamp.fromObject(object.updateTime,long+1)}if(object.etag!=null)message.etag=String(object.etag);return message};AutoProtectionPolicyBinding.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.state=options.enums===String?"STATE_UNSPECIFIED":0;object.scope="";object.bindingEvaluationSummary=null;object.createTime=null;object.updateTime=null;object.etag=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.description!=null&&message.hasOwnProperty("description"))object.description=message.description;if(message.state!=null&&message.hasOwnProperty("state"))object.state=options.enums===String?$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State[message.state]:message.state;if(message.scope!=null&&message.hasOwnProperty("scope"))object.scope=message.scope;if(message.bindingEvaluationSummary!=null&&message.hasOwnProperty("bindingEvaluationSummary"))object.bindingEvaluationSummary=$root.google.cloud.backupdr.v1beta.BindingEvaluationSummary.toObject(message.bindingEvaluationSummary,options);if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);if(message.updateTime!=null&&message.hasOwnProperty("updateTime"))object.updateTime=$root.google.protobuf.Timestamp.toObject(message.updateTime,options);if(message.etag!=null&&message.hasOwnProperty("etag"))object.etag=message.etag;return object};AutoProtectionPolicyBinding.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AutoProtectionPolicyBinding.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding"};AutoProtectionPolicyBinding.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]="DELETION_INITIATED"]=3;return values}();return AutoProtectionPolicyBinding}();v1beta.BindingEvaluationSummary=function(){function BindingEvaluationSummary(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BindingEvaluationSummary;while(reader.pos>>3){case 1:{message.matchingResourceCount=reader.int64();break}case 2:{message.protectedResourceCount=reader.int64();break}case 3:{message.failedResourceCount=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};BindingEvaluationSummary.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BindingEvaluationSummary.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.matchingResourceCount!=null&&message.hasOwnProperty("matchingResourceCount"))if(!$util.isInteger(message.matchingResourceCount)&&!(message.matchingResourceCount&&$util.isInteger(message.matchingResourceCount.low)&&$util.isInteger(message.matchingResourceCount.high)))return"matchingResourceCount: integer|Long expected";if(message.protectedResourceCount!=null&&message.hasOwnProperty("protectedResourceCount"))if(!$util.isInteger(message.protectedResourceCount)&&!(message.protectedResourceCount&&$util.isInteger(message.protectedResourceCount.low)&&$util.isInteger(message.protectedResourceCount.high)))return"protectedResourceCount: integer|Long expected";if(message.failedResourceCount!=null&&message.hasOwnProperty("failedResourceCount"))if(!$util.isInteger(message.failedResourceCount)&&!(message.failedResourceCount&&$util.isInteger(message.failedResourceCount.low)&&$util.isInteger(message.failedResourceCount.high)))return"failedResourceCount: integer|Long expected";return null};BindingEvaluationSummary.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BindingEvaluationSummary)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BindingEvaluationSummary;if(object.matchingResourceCount!=null)if($util.Long)(message.matchingResourceCount=$util.Long.fromValue(object.matchingResourceCount)).unsigned=false;else if(typeof object.matchingResourceCount==="string")message.matchingResourceCount=parseInt(object.matchingResourceCount,10);else if(typeof object.matchingResourceCount==="number")message.matchingResourceCount=object.matchingResourceCount;else if(typeof object.matchingResourceCount==="object")message.matchingResourceCount=new $util.LongBits(object.matchingResourceCount.low>>>0,object.matchingResourceCount.high>>>0).toNumber();if(object.protectedResourceCount!=null)if($util.Long)(message.protectedResourceCount=$util.Long.fromValue(object.protectedResourceCount)).unsigned=false;else if(typeof object.protectedResourceCount==="string")message.protectedResourceCount=parseInt(object.protectedResourceCount,10);else if(typeof object.protectedResourceCount==="number")message.protectedResourceCount=object.protectedResourceCount;else if(typeof object.protectedResourceCount==="object")message.protectedResourceCount=new $util.LongBits(object.protectedResourceCount.low>>>0,object.protectedResourceCount.high>>>0).toNumber();if(object.failedResourceCount!=null)if($util.Long)(message.failedResourceCount=$util.Long.fromValue(object.failedResourceCount)).unsigned=false;else if(typeof object.failedResourceCount==="string")message.failedResourceCount=parseInt(object.failedResourceCount,10);else if(typeof object.failedResourceCount==="number")message.failedResourceCount=object.failedResourceCount;else if(typeof object.failedResourceCount==="object")message.failedResourceCount=new $util.LongBits(object.failedResourceCount.low>>>0,object.failedResourceCount.high>>>0).toNumber();return message};BindingEvaluationSummary.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.matchingResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.matchingResourceCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.protectedResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.protectedResourceCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.failedResourceCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.failedResourceCount=options.longs===String?"0":0}if(message.matchingResourceCount!=null&&message.hasOwnProperty("matchingResourceCount"))if(typeof message.matchingResourceCount==="number")object.matchingResourceCount=options.longs===String?String(message.matchingResourceCount):message.matchingResourceCount;else object.matchingResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.matchingResourceCount):options.longs===Number?new $util.LongBits(message.matchingResourceCount.low>>>0,message.matchingResourceCount.high>>>0).toNumber():message.matchingResourceCount;if(message.protectedResourceCount!=null&&message.hasOwnProperty("protectedResourceCount"))if(typeof message.protectedResourceCount==="number")object.protectedResourceCount=options.longs===String?String(message.protectedResourceCount):message.protectedResourceCount;else object.protectedResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.protectedResourceCount):options.longs===Number?new $util.LongBits(message.protectedResourceCount.low>>>0,message.protectedResourceCount.high>>>0).toNumber():message.protectedResourceCount;if(message.failedResourceCount!=null&&message.hasOwnProperty("failedResourceCount"))if(typeof message.failedResourceCount==="number")object.failedResourceCount=options.longs===String?String(message.failedResourceCount):message.failedResourceCount;else object.failedResourceCount=options.longs===String?$util.Long.prototype.toString.call(message.failedResourceCount):options.longs===Number?new $util.LongBits(message.failedResourceCount.low>>>0,message.failedResourceCount.high>>>0).toNumber():message.failedResourceCount;return object};BindingEvaluationSummary.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BindingEvaluationSummary.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BindingEvaluationSummary"};return BindingEvaluationSummary}();v1beta.CreateAutoProtectionPolicyBindingRequest=function(){function CreateAutoProtectionPolicyBindingRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.autoProtectionPolicyBindingId=reader.string();break}case 3:{message.autoProtectionPolicyBinding=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CreateAutoProtectionPolicyBindingRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateAutoProtectionPolicyBindingRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.autoProtectionPolicyBindingId!=null&&message.hasOwnProperty("autoProtectionPolicyBindingId"))if(!$util.isString(message.autoProtectionPolicyBindingId))return"autoProtectionPolicyBindingId: string expected";if(message.autoProtectionPolicyBinding!=null&&message.hasOwnProperty("autoProtectionPolicyBinding")){var error=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.verify(message.autoProtectionPolicyBinding,long+1);if(error)return"autoProtectionPolicyBinding."+error}return null};CreateAutoProtectionPolicyBindingRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.autoProtectionPolicyBindingId!=null)message.autoProtectionPolicyBindingId=String(object.autoProtectionPolicyBindingId);if(object.autoProtectionPolicyBinding!=null){if(typeof object.autoProtectionPolicyBinding!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.autoProtectionPolicyBinding: object expected");message.autoProtectionPolicyBinding=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.fromObject(object.autoProtectionPolicyBinding,long+1)}return message};CreateAutoProtectionPolicyBindingRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.autoProtectionPolicyBindingId="";object.autoProtectionPolicyBinding=null}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.autoProtectionPolicyBindingId!=null&&message.hasOwnProperty("autoProtectionPolicyBindingId"))object.autoProtectionPolicyBindingId=message.autoProtectionPolicyBindingId;if(message.autoProtectionPolicyBinding!=null&&message.hasOwnProperty("autoProtectionPolicyBinding"))object.autoProtectionPolicyBinding=$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.toObject(message.autoProtectionPolicyBinding,options);return object};CreateAutoProtectionPolicyBindingRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateAutoProtectionPolicyBindingRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest"};return CreateAutoProtectionPolicyBindingRequest}();v1beta.GetAutoProtectionPolicyBindingRequest=function(){function GetAutoProtectionPolicyBindingRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetAutoProtectionPolicyBindingRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetAutoProtectionPolicyBindingRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetAutoProtectionPolicyBindingRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest;if(object.name!=null)message.name=String(object.name);return message};GetAutoProtectionPolicyBindingRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetAutoProtectionPolicyBindingRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetAutoProtectionPolicyBindingRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest"};return GetAutoProtectionPolicyBindingRequest}();v1beta.ListAutoProtectionPolicyBindingsRequest=function(){function ListAutoProtectionPolicyBindingsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListAutoProtectionPolicyBindingsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAutoProtectionPolicyBindingsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListAutoProtectionPolicyBindingsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest;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};ListAutoProtectionPolicyBindingsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListAutoProtectionPolicyBindingsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListAutoProtectionPolicyBindingsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest"};return ListAutoProtectionPolicyBindingsRequest}();v1beta.ListAutoProtectionPolicyBindingsResponse=function(){function ListAutoProtectionPolicyBindingsResponse(properties){this.autoProtectionPolicyBindings=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse;while(reader.pos>>3){case 1:{if(!(message.autoProtectionPolicyBindings&&message.autoProtectionPolicyBindings.length))message.autoProtectionPolicyBindings=[];message.autoProtectionPolicyBindings.push($root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListAutoProtectionPolicyBindingsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListAutoProtectionPolicyBindingsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.autoProtectionPolicyBindings!=null&&message.hasOwnProperty("autoProtectionPolicyBindings")){if(!Array.isArray(message.autoProtectionPolicyBindings))return"autoProtectionPolicyBindings: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse;if(object.autoProtectionPolicyBindings){if(!Array.isArray(object.autoProtectionPolicyBindings))throw TypeError(".google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.autoProtectionPolicyBindings: array expected");message.autoProtectionPolicyBindings=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};InitiateDeleteAutoProtectionPolicyBindingRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitiateDeleteAutoProtectionPolicyBindingRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};InitiateDeleteAutoProtectionPolicyBindingRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest;if(object.name!=null)message.name=String(object.name);return message};InitiateDeleteAutoProtectionPolicyBindingRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};InitiateDeleteAutoProtectionPolicyBindingRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitiateDeleteAutoProtectionPolicyBindingRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest"};return InitiateDeleteAutoProtectionPolicyBindingRequest}();v1beta.BackupDR=function(){function BackupDR(rpcImpl,requestDelimited,responseDelimited){$protobuf.rpc.Service.call(this,rpcImpl,requestDelimited,responseDelimited)}(BackupDR.prototype=Object.create($protobuf.rpc.Service.prototype)).constructor=BackupDR;BackupDR.create=function create(rpcImpl,requestDelimited,responseDelimited){return new this(rpcImpl,requestDelimited,responseDelimited)};Object.defineProperty(BackupDR.prototype.listManagementServers=function listManagementServers(request,callback){return this.rpcCall(listManagementServers,$root.google.cloud.backupdr.v1beta.ListManagementServersRequest,$root.google.cloud.backupdr.v1beta.ListManagementServersResponse,request,callback)},"name",{value:"ListManagementServers"});Object.defineProperty(BackupDR.prototype.getManagementServer=function getManagementServer(request,callback){return this.rpcCall(getManagementServer,$root.google.cloud.backupdr.v1beta.GetManagementServerRequest,$root.google.cloud.backupdr.v1beta.ManagementServer,request,callback)},"name",{value:"GetManagementServer"});Object.defineProperty(BackupDR.prototype.createManagementServer=function createManagementServer(request,callback){return this.rpcCall(createManagementServer,$root.google.cloud.backupdr.v1beta.CreateManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateManagementServer"});Object.defineProperty(BackupDR.prototype.deleteManagementServer=function deleteManagementServer(request,callback){return this.rpcCall(deleteManagementServer,$root.google.cloud.backupdr.v1beta.DeleteManagementServerRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteManagementServer"});Object.defineProperty(BackupDR.prototype.createBackupVault=function createBackupVault(request,callback){return this.rpcCall(createBackupVault,$root.google.cloud.backupdr.v1beta.CreateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupVault"});Object.defineProperty(BackupDR.prototype.listBackupVaults=function listBackupVaults(request,callback){return this.rpcCall(listBackupVaults,$root.google.cloud.backupdr.v1beta.ListBackupVaultsRequest,$root.google.cloud.backupdr.v1beta.ListBackupVaultsResponse,request,callback)},"name",{value:"ListBackupVaults"});Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults=function fetchUsableBackupVaults(request,callback){return this.rpcCall(fetchUsableBackupVaults,$root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest,$root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse,request,callback)},"name",{value:"FetchUsableBackupVaults"});Object.defineProperty(BackupDR.prototype.getBackupVault=function getBackupVault(request,callback){return this.rpcCall(getBackupVault,$root.google.cloud.backupdr.v1beta.GetBackupVaultRequest,$root.google.cloud.backupdr.v1beta.BackupVault,request,callback)},"name",{value:"GetBackupVault"});Object.defineProperty(BackupDR.prototype.updateBackupVault=function updateBackupVault(request,callback){return this.rpcCall(updateBackupVault,$root.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupVault"});Object.defineProperty(BackupDR.prototype.deleteBackupVault=function deleteBackupVault(request,callback){return this.rpcCall(deleteBackupVault,$root.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupVault"});Object.defineProperty(BackupDR.prototype.listDataSources=function listDataSources(request,callback){return this.rpcCall(listDataSources,$root.google.cloud.backupdr.v1beta.ListDataSourcesRequest,$root.google.cloud.backupdr.v1beta.ListDataSourcesResponse,request,callback)},"name",{value:"ListDataSources"});Object.defineProperty(BackupDR.prototype.getDataSource=function getDataSource(request,callback){return this.rpcCall(getDataSource,$root.google.cloud.backupdr.v1beta.GetDataSourceRequest,$root.google.cloud.backupdr.v1beta.DataSource,request,callback)},"name",{value:"GetDataSource"});Object.defineProperty(BackupDR.prototype.updateDataSource=function updateDataSource(request,callback){return this.rpcCall(updateDataSource,$root.google.cloud.backupdr.v1beta.UpdateDataSourceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateDataSource"});Object.defineProperty(BackupDR.prototype.listBackups=function listBackups(request,callback){return this.rpcCall(listBackups,$root.google.cloud.backupdr.v1beta.ListBackupsRequest,$root.google.cloud.backupdr.v1beta.ListBackupsResponse,request,callback)},"name",{value:"ListBackups"});Object.defineProperty(BackupDR.prototype.fetchBackupsForResourceType=function fetchBackupsForResourceType(request,callback){return this.rpcCall(fetchBackupsForResourceType,$root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest,$root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupsForResourceType"});Object.defineProperty(BackupDR.prototype.getBackup=function getBackup(request,callback){return this.rpcCall(getBackup,$root.google.cloud.backupdr.v1beta.GetBackupRequest,$root.google.cloud.backupdr.v1beta.Backup,request,callback)},"name",{value:"GetBackup"});Object.defineProperty(BackupDR.prototype.updateBackup=function updateBackup(request,callback){return this.rpcCall(updateBackup,$root.google.cloud.backupdr.v1beta.UpdateBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackup"});Object.defineProperty(BackupDR.prototype.deleteBackup=function deleteBackup(request,callback){return this.rpcCall(deleteBackup,$root.google.cloud.backupdr.v1beta.DeleteBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackup"});Object.defineProperty(BackupDR.prototype.restoreBackup=function restoreBackup(request,callback){return this.rpcCall(restoreBackup,$root.google.cloud.backupdr.v1beta.RestoreBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"RestoreBackup"});Object.defineProperty(BackupDR.prototype.createBackupPlan=function createBackupPlan(request,callback){return this.rpcCall(createBackupPlan,$root.google.cloud.backupdr.v1beta.CreateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlan"});Object.defineProperty(BackupDR.prototype.updateBackupPlan=function updateBackupPlan(request,callback){return this.rpcCall(updateBackupPlan,$root.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlan=function getBackupPlan(request,callback){return this.rpcCall(getBackupPlan,$root.google.cloud.backupdr.v1beta.GetBackupPlanRequest,$root.google.cloud.backupdr.v1beta.BackupPlan,request,callback)},"name",{value:"GetBackupPlan"});Object.defineProperty(BackupDR.prototype.listBackupPlans=function listBackupPlans(request,callback){return this.rpcCall(listBackupPlans,$root.google.cloud.backupdr.v1beta.ListBackupPlansRequest,$root.google.cloud.backupdr.v1beta.ListBackupPlansResponse,request,callback)},"name",{value:"ListBackupPlans"});Object.defineProperty(BackupDR.prototype.deleteBackupPlan=function deleteBackupPlan(request,callback){return this.rpcCall(deleteBackupPlan,$root.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlan"});Object.defineProperty(BackupDR.prototype.getBackupPlanRevision=function getBackupPlanRevision(request,callback){return this.rpcCall(getBackupPlanRevision,$root.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest,$root.google.cloud.backupdr.v1beta.BackupPlanRevision,request,callback)},"name",{value:"GetBackupPlanRevision"});Object.defineProperty(BackupDR.prototype.listBackupPlanRevisions=function listBackupPlanRevisions(request,callback){return this.rpcCall(listBackupPlanRevisions,$root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest,$root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse,request,callback)},"name",{value:"ListBackupPlanRevisions"});Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation=function createBackupPlanAssociation(request,callback){return this.rpcCall(createBackupPlanAssociation,$root.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.updateBackupPlanAssociation=function updateBackupPlanAssociation(request,callback){return this.rpcCall(updateBackupPlanAssociation,$root.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation=function getBackupPlanAssociation(request,callback){return this.rpcCall(getBackupPlanAssociation,$root.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest,$root.google.cloud.backupdr.v1beta.BackupPlanAssociation,request,callback)},"name",{value:"GetBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations=function listBackupPlanAssociations(request,callback){return this.rpcCall(listBackupPlanAssociations,$root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest,$root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse,request,callback)},"name",{value:"ListBackupPlanAssociations"});Object.defineProperty(BackupDR.prototype.fetchBackupPlanAssociationsForResourceType=function fetchBackupPlanAssociationsForResourceType(request,callback){return this.rpcCall(fetchBackupPlanAssociationsForResourceType,$root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest,$root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse,request,callback)},"name",{value:"FetchBackupPlanAssociationsForResourceType"});Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation=function deleteBackupPlanAssociation(request,callback){return this.rpcCall(deleteBackupPlanAssociation,$root.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteBackupPlanAssociation"});Object.defineProperty(BackupDR.prototype.triggerBackup=function triggerBackup(request,callback){return this.rpcCall(triggerBackup,$root.google.cloud.backupdr.v1beta.TriggerBackupRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"TriggerBackup"});Object.defineProperty(BackupDR.prototype.getDataSourceReference=function getDataSourceReference(request,callback){return this.rpcCall(getDataSourceReference,$root.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest,$root.google.cloud.backupdr.v1beta.DataSourceReference,request,callback)},"name",{value:"GetDataSourceReference"});Object.defineProperty(BackupDR.prototype.listDataSourceReferences=function listDataSourceReferences(request,callback){return this.rpcCall(listDataSourceReferences,$root.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest,$root.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse,request,callback)},"name",{value:"ListDataSourceReferences"});Object.defineProperty(BackupDR.prototype.fetchDataSourceReferencesForResourceType=function fetchDataSourceReferencesForResourceType(request,callback){return this.rpcCall(fetchDataSourceReferencesForResourceType,$root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest,$root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse,request,callback)},"name",{value:"FetchDataSourceReferencesForResourceType"});Object.defineProperty(BackupDR.prototype.initializeService=function initializeService(request,callback){return this.rpcCall(initializeService,$root.google.cloud.backupdr.v1beta.InitializeServiceRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"InitializeService"});Object.defineProperty(BackupDR.prototype.createAutoProtectionPolicy=function createAutoProtectionPolicy(request,callback){return this.rpcCall(createAutoProtectionPolicy,$root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateAutoProtectionPolicy"});Object.defineProperty(BackupDR.prototype.listAutoProtectionPolicies=function listAutoProtectionPolicies(request,callback){return this.rpcCall(listAutoProtectionPolicies,$root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest,$root.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse,request,callback)},"name",{value:"ListAutoProtectionPolicies"});Object.defineProperty(BackupDR.prototype.getAutoProtectionPolicy=function getAutoProtectionPolicy(request,callback){return this.rpcCall(getAutoProtectionPolicy,$root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest,$root.google.cloud.backupdr.v1beta.AutoProtectionPolicy,request,callback)},"name",{value:"GetAutoProtectionPolicy"});Object.defineProperty(BackupDR.prototype.updateAutoProtectionPolicy=function updateAutoProtectionPolicy(request,callback){return this.rpcCall(updateAutoProtectionPolicy,$root.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"UpdateAutoProtectionPolicy"});Object.defineProperty(BackupDR.prototype.deleteAutoProtectionPolicy=function deleteAutoProtectionPolicy(request,callback){return this.rpcCall(deleteAutoProtectionPolicy,$root.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"DeleteAutoProtectionPolicy"});Object.defineProperty(BackupDR.prototype.createAutoProtectionPolicyBinding=function createAutoProtectionPolicyBinding(request,callback){return this.rpcCall(createAutoProtectionPolicyBinding,$root.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"CreateAutoProtectionPolicyBinding"});Object.defineProperty(BackupDR.prototype.getAutoProtectionPolicyBinding=function getAutoProtectionPolicyBinding(request,callback){return this.rpcCall(getAutoProtectionPolicyBinding,$root.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest,$root.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding,request,callback)},"name",{value:"GetAutoProtectionPolicyBinding"});Object.defineProperty(BackupDR.prototype.listAutoProtectionPolicyBindings=function listAutoProtectionPolicyBindings(request,callback){return this.rpcCall(listAutoProtectionPolicyBindings,$root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest,$root.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse,request,callback)},"name",{value:"ListAutoProtectionPolicyBindings"});Object.defineProperty(BackupDR.prototype.listAppliedAutoProtectionPolicies=function listAppliedAutoProtectionPolicies(request,callback){return this.rpcCall(listAppliedAutoProtectionPolicies,$root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest,$root.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse,request,callback)},"name",{value:"ListAppliedAutoProtectionPolicies"});Object.defineProperty(BackupDR.prototype.initiateDeleteAutoProtectionPolicyBinding=function initiateDeleteAutoProtectionPolicyBinding(request,callback){return this.rpcCall(initiateDeleteAutoProtectionPolicyBinding,$root.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest,$root.google.longrunning.Operation,request,callback)},"name",{value:"InitiateDeleteAutoProtectionPolicyBinding"});Object.defineProperty(BackupDR.prototype.getBindingMatchingResource=function getBindingMatchingResource(request,callback){return this.rpcCall(getBindingMatchingResource,$root.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest,$root.google.cloud.backupdr.v1beta.BindingMatchingResource,request,callback)},"name",{value:"GetBindingMatchingResource"});Object.defineProperty(BackupDR.prototype.listBindingMatchingResources=function listBindingMatchingResources(request,callback){return this.rpcCall(listBindingMatchingResources,$root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest,$root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse,request,callback)},"name",{value:"ListBindingMatchingResources"});return BackupDR}();v1beta.NetworkConfig=function(){function NetworkConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.NetworkConfig;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.peeringMode=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.network!=null&&message.hasOwnProperty("network"))if(!$util.isString(message.network))return"network: string expected";if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))switch(message.peeringMode){default:return"peeringMode: enum value expected";case 0:case 1:break}return null};NetworkConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.NetworkConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.NetworkConfig;if(object.network!=null)message.network=String(object.network);switch(object.peeringMode){default:if(typeof object.peeringMode==="number"){message.peeringMode=object.peeringMode;break}break;case"PEERING_MODE_UNSPECIFIED":case 0:message.peeringMode=0;break;case"PRIVATE_SERVICE_ACCESS":case 1:message.peeringMode=1;break}return message};NetworkConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.network="";object.peeringMode=options.enums===String?"PEERING_MODE_UNSPECIFIED":0}if(message.network!=null&&message.hasOwnProperty("network"))object.network=message.network;if(message.peeringMode!=null&&message.hasOwnProperty("peeringMode"))object.peeringMode=options.enums===String?$root.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode[message.peeringMode]===undefined?message.peeringMode:$root.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode[message.peeringMode]:message.peeringMode;return object};NetworkConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.NetworkConfig"};NetworkConfig.PeeringMode=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PEERING_MODE_UNSPECIFIED"]=0;values[valuesById[1]="PRIVATE_SERVICE_ACCESS"]=1;return values}();return NetworkConfig}();v1beta.ManagementURI=function(){function ManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ManagementURI;while(reader.pos>>3){case 1:{message.webUi=reader.string();break}case 2:{message.api=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.webUi!=null&&message.hasOwnProperty("webUi"))if(!$util.isString(message.webUi))return"webUi: string expected";if(message.api!=null&&message.hasOwnProperty("api"))if(!$util.isString(message.api))return"api: string expected";return null};ManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ManagementURI;if(object.webUi!=null)message.webUi=String(object.webUi);if(object.api!=null)message.api=String(object.api);return message};ManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.webUi="";object.api=""}if(message.webUi!=null&&message.hasOwnProperty("webUi"))object.webUi=message.webUi;if(message.api!=null&&message.hasOwnProperty("api"))object.api=message.api;return object};ManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ManagementURI"};return ManagementURI}();v1beta.WorkforceIdentityBasedManagementURI=function(){function WorkforceIdentityBasedManagementURI(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedManagementURI.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedManagementURI.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};WorkforceIdentityBasedManagementURI.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};WorkforceIdentityBasedManagementURI.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};WorkforceIdentityBasedManagementURI.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedManagementURI.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI"};return WorkforceIdentityBasedManagementURI}();v1beta.WorkforceIdentityBasedOAuth2ClientID=function(){function WorkforceIdentityBasedOAuth2ClientID(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID;while(reader.pos>>3){case 1:{message.firstPartyOauth2ClientId=reader.string();break}case 2:{message.thirdPartyOauth2ClientId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};WorkforceIdentityBasedOAuth2ClientID.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WorkforceIdentityBasedOAuth2ClientID.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))if(!$util.isString(message.firstPartyOauth2ClientId))return"firstPartyOauth2ClientId: string expected";if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))if(!$util.isString(message.thirdPartyOauth2ClientId))return"thirdPartyOauth2ClientId: string expected";return null};WorkforceIdentityBasedOAuth2ClientID.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID;if(object.firstPartyOauth2ClientId!=null)message.firstPartyOauth2ClientId=String(object.firstPartyOauth2ClientId);if(object.thirdPartyOauth2ClientId!=null)message.thirdPartyOauth2ClientId=String(object.thirdPartyOauth2ClientId);return message};WorkforceIdentityBasedOAuth2ClientID.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyOauth2ClientId="";object.thirdPartyOauth2ClientId=""}if(message.firstPartyOauth2ClientId!=null&&message.hasOwnProperty("firstPartyOauth2ClientId"))object.firstPartyOauth2ClientId=message.firstPartyOauth2ClientId;if(message.thirdPartyOauth2ClientId!=null&&message.hasOwnProperty("thirdPartyOauth2ClientId"))object.thirdPartyOauth2ClientId=message.thirdPartyOauth2ClientId;return object};WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WorkforceIdentityBasedOAuth2ClientID.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID"};return WorkforceIdentityBasedOAuth2ClientID}();v1beta.ManagementServer=function(){function ManagementServer(properties){this.labels={};this.networks=[];this.baProxyUri=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ManagementServer,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 9:{message.description=reader.string();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 2:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 14:{message.type=reader.int32();break}case 11:{message.managementUri=$root.google.cloud.backupdr.v1beta.ManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.workforceIdentityBasedManagementUri=$root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.networks&&message.networks.length))message.networks=[];message.networks.push($root.google.cloud.backupdr.v1beta.NetworkConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 13:{message.etag=reader.string();break}case 15:{message.oauth2ClientId=reader.string();break}case 17:{message.workforceIdentityBasedOauth2ClientId=$root.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.decode(reader,reader.uint32(),undefined,long+1);break}case 18:{if(!(message.baProxyUri&&message.baProxyUri.length))message.baProxyUri=[];message.baProxyUri.push(reader.string());break}case 19:{message.satisfiesPzs=$root.google.protobuf.BoolValue.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.satisfiesPzi=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ManagementServer.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ManagementServer.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ManagementServer;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.v1beta.ManagementServer.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListManagementServersRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListManagementServersRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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")){properties._filter=1;if(!$util.isString(message.filter))return"filter: string expected"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){properties._orderBy=1;if(!$util.isString(message.orderBy))return"orderBy: string expected"}return null};ListManagementServersRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListManagementServersRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListManagementServersRequest;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};ListManagementServersRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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(options.oneofs)object._filter="filter"}if(message.orderBy!=null&&message.hasOwnProperty("orderBy")){object.orderBy=message.orderBy;if(options.oneofs)object._orderBy="orderBy"}return object};ListManagementServersRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListManagementServersRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListManagementServersRequest"};return ListManagementServersRequest}();v1beta.ListManagementServersResponse=function(){function ListManagementServersResponse(properties){this.managementServers=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListManagementServersResponse;while(reader.pos>>3){case 1:{if(!(message.managementServers&&message.managementServers.length))message.managementServers=[];message.managementServers.push($root.google.cloud.backupdr.v1beta.ManagementServer.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListManagementServersResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListManagementServersResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.managementServers!=null&&message.hasOwnProperty("managementServers")){if(!Array.isArray(message.managementServers))return"managementServers: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListManagementServersResponse;if(object.managementServers){if(!Array.isArray(object.managementServers))throw TypeError(".google.cloud.backupdr.v1beta.ListManagementServersResponse.managementServers: array expected");message.managementServers=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetManagementServerRequest;if(object.name!=null)message.name=String(object.name);return message};GetManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetManagementServerRequest"};return GetManagementServerRequest}();v1beta.CreateManagementServerRequest=function(){function CreateManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateManagementServerRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.managementServerId=reader.string();break}case 3:{message.managementServer=$root.google.cloud.backupdr.v1beta.ManagementServer.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))if(!$util.isString(message.managementServerId))return"managementServerId: string expected";if(message.managementServer!=null&&message.hasOwnProperty("managementServer")){var error=$root.google.cloud.backupdr.v1beta.ManagementServer.verify(message.managementServer,long+1);if(error)return"managementServer."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CreateManagementServerRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.managementServerId!=null)message.managementServerId=String(object.managementServerId);if(object.managementServer!=null){if(typeof object.managementServer!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CreateManagementServerRequest.managementServer: object expected");message.managementServer=$root.google.cloud.backupdr.v1beta.ManagementServer.fromObject(object.managementServer,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateManagementServerRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.managementServerId="";object.managementServer=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.managementServerId!=null&&message.hasOwnProperty("managementServerId"))object.managementServerId=message.managementServerId;if(message.managementServer!=null&&message.hasOwnProperty("managementServer"))object.managementServer=$root.google.cloud.backupdr.v1beta.ManagementServer.toObject(message.managementServer,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateManagementServerRequest"};return CreateManagementServerRequest}();v1beta.DeleteManagementServerRequest=function(){function DeleteManagementServerRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteManagementServerRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteManagementServerRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteManagementServerRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteManagementServerRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteManagementServerRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DeleteManagementServerRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteManagementServerRequest.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;return object};DeleteManagementServerRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteManagementServerRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteManagementServerRequest"};return DeleteManagementServerRequest}();v1beta.InitializeServiceRequest=function(){function InitializeServiceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.InitializeServiceRequest;while(reader.pos>>3){case 4:{message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.requestId=reader.string();break}case 6:{message.backupPlanLocation=reader.string();break}case 7:{message.validateOnly=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){properties.initializationConfig=1;{var error=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.verify(message.cloudSqlInstanceInitializationConfig,long+1);if(error)return"cloudSqlInstanceInitializationConfig."+error}}if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";if(message.backupPlanLocation!=null&&message.hasOwnProperty("backupPlanLocation"))if(!$util.isString(message.backupPlanLocation))return"backupPlanLocation: string expected";if(message.validateOnly!=null&&message.hasOwnProperty("validateOnly"))if(typeof message.validateOnly!=="boolean")return"validateOnly: boolean expected";return null};InitializeServiceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.InitializeServiceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.InitializeServiceRequest;if(object.cloudSqlInstanceInitializationConfig!=null){if(typeof object.cloudSqlInstanceInitializationConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.InitializeServiceRequest.cloudSqlInstanceInitializationConfig: object expected");message.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.fromObject(object.cloudSqlInstanceInitializationConfig,long+1)}if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.backupPlanLocation!=null)message.backupPlanLocation=String(object.backupPlanLocation);if(object.validateOnly!=null)message.validateOnly=Boolean(object.validateOnly);return message};InitializeServiceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.resourceType="";object.requestId="";object.backupPlanLocation="";object.validateOnly=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))object.resourceType=message.resourceType;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;if(message.cloudSqlInstanceInitializationConfig!=null&&message.hasOwnProperty("cloudSqlInstanceInitializationConfig")){object.cloudSqlInstanceInitializationConfig=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.toObject(message.cloudSqlInstanceInitializationConfig,options);if(options.oneofs)object.initializationConfig="cloudSqlInstanceInitializationConfig"}if(message.backupPlanLocation!=null&&message.hasOwnProperty("backupPlanLocation"))object.backupPlanLocation=message.backupPlanLocation;if(message.validateOnly!=null&&message.hasOwnProperty("validateOnly"))object.validateOnly=message.validateOnly;return object};InitializeServiceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.InitializeServiceRequest"};return InitializeServiceRequest}();v1beta.InitializeServiceResponse=function(){function InitializeServiceResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.InitializeServiceResponse;while(reader.pos>>3){case 1:{message.backupVaultName=reader.string();break}case 2:{message.backupPlanName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};InitializeServiceResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeServiceResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))if(!$util.isString(message.backupVaultName))return"backupVaultName: string expected";if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))if(!$util.isString(message.backupPlanName))return"backupPlanName: string expected";return null};InitializeServiceResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.InitializeServiceResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.InitializeServiceResponse;if(object.backupVaultName!=null)message.backupVaultName=String(object.backupVaultName);if(object.backupPlanName!=null)message.backupPlanName=String(object.backupPlanName);return message};InitializeServiceResponse.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupVaultName="";object.backupPlanName=""}if(message.backupVaultName!=null&&message.hasOwnProperty("backupVaultName"))object.backupVaultName=message.backupVaultName;if(message.backupPlanName!=null&&message.hasOwnProperty("backupPlanName"))object.backupPlanName=message.backupPlanName;return object};InitializeServiceResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InitializeServiceResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.InitializeServiceResponse"};return InitializeServiceResponse}();v1beta.OperationMetadata=function(){function OperationMetadata(properties){this.additionalInfo={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.OperationMetadata,key,value;while(reader.pos>>3){case 1:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.endTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.target=reader.string();break}case 4:{message.verb=reader.string();break}case 5:{message.statusMessage=reader.string();break}case 6:{message.requestedCancellation=reader.bool();break}case 7:{message.apiVersion=reader.string();break}case 8:{if(message.additionalInfo===$util.emptyObject)message.additionalInfo={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.additionalInfo,key);message.additionalInfo[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};OperationMetadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OperationMetadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.endTime!=null&&message.hasOwnProperty("endTime")){var error=$root.google.protobuf.Timestamp.verify(message.endTime,long+1);if(error)return"endTime."+error}if(message.target!=null&&message.hasOwnProperty("target"))if(!$util.isString(message.target))return"target: string expected";if(message.verb!=null&&message.hasOwnProperty("verb"))if(!$util.isString(message.verb))return"verb: string expected";if(message.statusMessage!=null&&message.hasOwnProperty("statusMessage"))if(!$util.isString(message.statusMessage))return"statusMessage: string expected";if(message.requestedCancellation!=null&&message.hasOwnProperty("requestedCancellation"))if(typeof message.requestedCancellation!=="boolean")return"requestedCancellation: boolean expected";if(message.apiVersion!=null&&message.hasOwnProperty("apiVersion"))if(!$util.isString(message.apiVersion))return"apiVersion: string expected";if(message.additionalInfo!=null&&message.hasOwnProperty("additionalInfo")){if(!$util.isObject(message.additionalInfo))return"additionalInfo: object expected";var key=Object.keys(message.additionalInfo);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.OperationMetadata;if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.OperationMetadata.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.endTime!=null){if(typeof object.endTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.OperationMetadata.endTime: object expected");message.endTime=$root.google.protobuf.Timestamp.fromObject(object.endTime,long+1)}if(object.target!=null)message.target=String(object.target);if(object.verb!=null)message.verb=String(object.verb);if(object.statusMessage!=null)message.statusMessage=String(object.statusMessage);if(object.requestedCancellation!=null)message.requestedCancellation=Boolean(object.requestedCancellation);if(object.apiVersion!=null)message.apiVersion=String(object.apiVersion);if(object.additionalInfo){if(typeof object.additionalInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.OperationMetadata.additionalInfo: object expected");message.additionalInfo={};for(var keys=Object.keys(object.additionalInfo),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupPlan,key,value;while(reader.pos>>3){case 19:{message.diskBackupPlanProperties=$root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.computeInstanceBackupPlanProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.decode(reader,reader.uint32(),undefined,long+1);break}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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{if(!(message.backupRules&&message.backupRules.length))message.backupRules=[];message.backupRules.push($root.google.cloud.backupdr.v1beta.BackupRule.decode(reader,reader.uint32(),undefined,long+1));break}case 18:{message.maxCustomOnDemandRetentionDays=reader.int32();break}case 7:{message.state=reader.int32();break}case 8:{message.resourceType=reader.string();break}case 9:{message.etag=reader.string();break}case 10:{message.backupVault=reader.string();break}case 11:{message.backupVaultServiceAccount=reader.string();break}case 12:{message.logRetentionDays=reader.int64();break}case 13:{if(!(message.supportedResourceTypes&&message.supportedResourceTypes.length))message.supportedResourceTypes=[];message.supportedResourceTypes.push(reader.string());break}case 14:{message.revisionId=reader.string();break}case 15:{message.revisionName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlan.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlan.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.diskBackupPlanProperties!=null&&message.hasOwnProperty("diskBackupPlanProperties")){properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.verify(message.diskBackupPlanProperties,long+1);if(error)return"diskBackupPlanProperties."+error}}if(message.computeInstanceBackupPlanProperties!=null&&message.hasOwnProperty("computeInstanceBackupPlanProperties")){if(properties.resourceProperties===1)return"resourceProperties: multiple values";properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.verify(message.computeInstanceBackupPlanProperties,long+1);if(error)return"computeInstanceBackupPlanProperties."+error}}if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupPlan;if(object.diskBackupPlanProperties!=null){if(typeof object.diskBackupPlanProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlan.diskBackupPlanProperties: object expected");message.diskBackupPlanProperties=$root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.fromObject(object.diskBackupPlanProperties,long+1)}if(object.computeInstanceBackupPlanProperties!=null){if(typeof object.computeInstanceBackupPlanProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlan.computeInstanceBackupPlanProperties: object expected");message.computeInstanceBackupPlanProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.fromObject(object.computeInstanceBackupPlanProperties,long+1)}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.v1beta.BackupPlan.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>0,object.logRetentionDays.high>>>0).toNumber();if(object.supportedResourceTypes){if(!Array.isArray(object.supportedResourceTypes))throw TypeError(".google.cloud.backupdr.v1beta.BackupPlan.supportedResourceTypes: array expected");message.supportedResourceTypes=[];for(var i=0;i>>0,message.logRetentionDays.high>>>0).toNumber():message.logRetentionDays;if(message.supportedResourceTypes&&message.supportedResourceTypes.length){object.supportedResourceTypes=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupRule;while(reader.pos>>3){case 5:{message.standardSchedule=$root.google.cloud.backupdr.v1beta.StandardSchedule.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.ruleId=reader.string();break}case 4:{message.backupRetentionDays=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BackupRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){properties.backupScheduleOneof=1;{var error=$root.google.cloud.backupdr.v1beta.StandardSchedule.verify(message.standardSchedule,long+1);if(error)return"standardSchedule."+error}}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))if(!$util.isInteger(message.backupRetentionDays))return"backupRetentionDays: integer expected";return null};BackupRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupRule;if(object.standardSchedule!=null){if(typeof object.standardSchedule!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupRule.standardSchedule: object expected");message.standardSchedule=$root.google.cloud.backupdr.v1beta.StandardSchedule.fromObject(object.standardSchedule,long+1)}if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.backupRetentionDays!=null)message.backupRetentionDays=object.backupRetentionDays|0;return message};BackupRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.backupRetentionDays=0}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.backupRetentionDays!=null&&message.hasOwnProperty("backupRetentionDays"))object.backupRetentionDays=message.backupRetentionDays;if(message.standardSchedule!=null&&message.hasOwnProperty("standardSchedule")){object.standardSchedule=$root.google.cloud.backupdr.v1beta.StandardSchedule.toObject(message.standardSchedule,options);if(options.oneofs)object.backupScheduleOneof="standardSchedule"}return object};BackupRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupRule"};return BackupRule}();v1beta.StandardSchedule=function(){function StandardSchedule(properties){this.daysOfWeek=[];this.daysOfMonth=[];this.months=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.StandardSchedule;while(reader.pos>>3){case 1:{message.recurrenceType=reader.int32();break}case 2:{message.hourlyFrequency=reader.int32();break}case 3:{if(!(message.daysOfWeek&&message.daysOfWeek.length))message.daysOfWeek=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.recurrenceType!=null&&message.hasOwnProperty("recurrenceType"))switch(message.recurrenceType){default:return"recurrenceType: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.hourlyFrequency!=null&&message.hasOwnProperty("hourlyFrequency"))if(!$util.isInteger(message.hourlyFrequency))return"hourlyFrequency: integer expected";if(message.daysOfWeek!=null&&message.hasOwnProperty("daysOfWeek")){if(!Array.isArray(message.daysOfWeek))return"daysOfWeek: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.StandardSchedule;switch(object.recurrenceType){default:if(typeof object.recurrenceType==="number"){message.recurrenceType=object.recurrenceType;break}break;case"RECURRENCE_TYPE_UNSPECIFIED":case 0:message.recurrenceType=0;break;case"HOURLY":case 1:message.recurrenceType=1;break;case"DAILY":case 2:message.recurrenceType=2;break;case"WEEKLY":case 3:message.recurrenceType=3;break;case"MONTHLY":case 4:message.recurrenceType=4;break;case"YEARLY":case 5:message.recurrenceType=5;break}if(object.hourlyFrequency!=null)message.hourlyFrequency=object.hourlyFrequency|0;if(object.daysOfWeek){if(!Array.isArray(object.daysOfWeek))throw TypeError(".google.cloud.backupdr.v1beta.StandardSchedule.daysOfWeek: array expected");message.daysOfWeek=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupWindow;while(reader.pos>>3){case 1:{message.startHourOfDay=reader.int32();break}case 2:{message.endHourOfDay=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BackupWindow.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupWindow.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))if(!$util.isInteger(message.startHourOfDay))return"startHourOfDay: integer expected";if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))if(!$util.isInteger(message.endHourOfDay))return"endHourOfDay: integer expected";return null};BackupWindow.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupWindow)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupWindow;if(object.startHourOfDay!=null)message.startHourOfDay=object.startHourOfDay|0;if(object.endHourOfDay!=null)message.endHourOfDay=object.endHourOfDay|0;return message};BackupWindow.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.startHourOfDay=0;object.endHourOfDay=0}if(message.startHourOfDay!=null&&message.hasOwnProperty("startHourOfDay"))object.startHourOfDay=message.startHourOfDay;if(message.endHourOfDay!=null&&message.hasOwnProperty("endHourOfDay"))object.endHourOfDay=message.endHourOfDay;return object};BackupWindow.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupWindow.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupWindow"};return BackupWindow}();v1beta.WeekDayOfMonth=function(){function WeekDayOfMonth(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.WeekDayOfMonth;while(reader.pos>>3){case 1:{message.weekOfMonth=reader.int32();break}case 2:{message.dayOfWeek=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};WeekDayOfMonth.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WeekDayOfMonth.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))switch(message.weekOfMonth){default:return"weekOfMonth: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))switch(message.dayOfWeek){default:return"dayOfWeek: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break}return null};WeekDayOfMonth.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.WeekDayOfMonth)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.WeekDayOfMonth;switch(object.weekOfMonth){default:if(typeof object.weekOfMonth==="number"){message.weekOfMonth=object.weekOfMonth;break}break;case"WEEK_OF_MONTH_UNSPECIFIED":case 0:message.weekOfMonth=0;break;case"FIRST":case 1:message.weekOfMonth=1;break;case"SECOND":case 2:message.weekOfMonth=2;break;case"THIRD":case 3:message.weekOfMonth=3;break;case"FOURTH":case 4:message.weekOfMonth=4;break;case"LAST":case 5:message.weekOfMonth=5;break}switch(object.dayOfWeek){default:if(typeof object.dayOfWeek==="number"){message.dayOfWeek=object.dayOfWeek;break}break;case"DAY_OF_WEEK_UNSPECIFIED":case 0:message.dayOfWeek=0;break;case"MONDAY":case 1:message.dayOfWeek=1;break;case"TUESDAY":case 2:message.dayOfWeek=2;break;case"WEDNESDAY":case 3:message.dayOfWeek=3;break;case"THURSDAY":case 4:message.dayOfWeek=4;break;case"FRIDAY":case 5:message.dayOfWeek=5;break;case"SATURDAY":case 6:message.dayOfWeek=6;break;case"SUNDAY":case 7:message.dayOfWeek=7;break}return message};WeekDayOfMonth.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.weekOfMonth=options.enums===String?"WEEK_OF_MONTH_UNSPECIFIED":0;object.dayOfWeek=options.enums===String?"DAY_OF_WEEK_UNSPECIFIED":0}if(message.weekOfMonth!=null&&message.hasOwnProperty("weekOfMonth"))object.weekOfMonth=options.enums===String?$root.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]===undefined?message.weekOfMonth:$root.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth]:message.weekOfMonth;if(message.dayOfWeek!=null&&message.hasOwnProperty("dayOfWeek"))object.dayOfWeek=options.enums===String?$root.google.type.DayOfWeek[message.dayOfWeek]===undefined?message.dayOfWeek:$root.google.type.DayOfWeek[message.dayOfWeek]:message.dayOfWeek;return object};WeekDayOfMonth.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WeekDayOfMonth.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.WeekDayOfMonth"};WeekDayOfMonth.WeekOfMonth=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="WEEK_OF_MONTH_UNSPECIFIED"]=0;values[valuesById[1]="FIRST"]=1;values[valuesById[2]="SECOND"]=2;values[valuesById[3]="THIRD"]=3;values[valuesById[4]="FOURTH"]=4;values[valuesById[5]="LAST"]=5;return values}();return WeekDayOfMonth}();v1beta.CreateBackupPlanRequest=function(){function CreateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateBackupPlanRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanId=reader.string();break}case 3:{message.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))if(!$util.isString(message.backupPlanId))return"backupPlanId: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1beta.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CreateBackupPlanRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanId!=null)message.backupPlanId=String(object.backupPlanId);if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CreateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanId="";object.backupPlan=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanId!=null&&message.hasOwnProperty("backupPlanId"))object.backupPlanId=message.backupPlanId;if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.toObject(message.backupPlan,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateBackupPlanRequest"};return CreateBackupPlanRequest}();v1beta.ListBackupPlansRequest=function(){function ListBackupPlansRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlansRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlansRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListBackupPlansRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBackupPlansRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlansRequest;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};ListBackupPlansRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListBackupPlansRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlansRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBackupPlansRequest"};return ListBackupPlansRequest}();v1beta.ListBackupPlansResponse=function(){function ListBackupPlansResponse(properties){this.backupPlans=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlansResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlans&&message.backupPlans.length))message.backupPlans=[];message.backupPlans.push($root.google.cloud.backupdr.v1beta.BackupPlan.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlansResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlansResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlans!=null&&message.hasOwnProperty("backupPlans")){if(!Array.isArray(message.backupPlans))return"backupPlans: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlansResponse;if(object.backupPlans){if(!Array.isArray(object.backupPlans))throw TypeError(".google.cloud.backupdr.v1beta.ListBackupPlansResponse.backupPlans: array expected");message.backupPlans=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBackupPlanRequest"};return GetBackupPlanRequest}();v1beta.DeleteBackupPlanRequest=function(){function DeleteBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupPlanRequest.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;return object};DeleteBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteBackupPlanRequest"};return DeleteBackupPlanRequest}();v1beta.UpdateBackupPlanRequest=function(){function UpdateBackupPlanRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest;while(reader.pos>>3){case 1:{message.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan")){var error=$root.google.cloud.backupdr.v1beta.BackupPlan.verify(message.backupPlan,long+1);if(error)return"backupPlan."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest;if(object.backupPlan!=null){if(typeof object.backupPlan!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.backupPlan: object expected");message.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.fromObject(object.backupPlan,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan=null;object.updateMask=null;object.requestId=""}if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))object.backupPlan=$root.google.cloud.backupdr.v1beta.BackupPlan.toObject(message.backupPlan,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateBackupPlanRequest"};return UpdateBackupPlanRequest}();v1beta.BackupPlanRevision=function(){function BackupPlanRevision(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupPlanRevision;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.revisionId=reader.string();break}case 3:{message.state=reader.int32();break}case 4:{message.backupPlanSnapshot=$root.google.cloud.backupdr.v1beta.BackupPlan.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanRevision.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanRevision.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))if(!$util.isString(message.revisionId))return"revisionId: 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.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot")){var error=$root.google.cloud.backupdr.v1beta.BackupPlan.verify(message.backupPlanSnapshot,long+1);if(error)return"backupPlanSnapshot."+error}if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}return null};BackupPlanRevision.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupPlanRevision)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupPlanRevision;if(object.name!=null)message.name=String(object.name);if(object.revisionId!=null)message.revisionId=String(object.revisionId);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"INACTIVE":case 4:message.state=4;break}if(object.backupPlanSnapshot!=null){if(typeof object.backupPlanSnapshot!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanRevision.backupPlanSnapshot: object expected");message.backupPlanSnapshot=$root.google.cloud.backupdr.v1beta.BackupPlan.fromObject(object.backupPlanSnapshot,long+1)}if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanRevision.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}return message};BackupPlanRevision.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.revisionId="";object.state=options.enums===String?"STATE_UNSPECIFIED":0;object.backupPlanSnapshot=null;object.createTime=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.revisionId!=null&&message.hasOwnProperty("revisionId"))object.revisionId=message.revisionId;if(message.state!=null&&message.hasOwnProperty("state"))object.state=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupPlanRevision.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1beta.BackupPlanRevision.State[message.state]:message.state;if(message.backupPlanSnapshot!=null&&message.hasOwnProperty("backupPlanSnapshot"))object.backupPlanSnapshot=$root.google.cloud.backupdr.v1beta.BackupPlan.toObject(message.backupPlanSnapshot,options);if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);return object};BackupPlanRevision.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupPlanRevision.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupPlanRevision"};BackupPlanRevision.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]="INACTIVE"]=4;return values}();return BackupPlanRevision}();v1beta.GetBackupPlanRevisionRequest=function(){function GetBackupPlanRevisionRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanRevisionRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanRevisionRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanRevisionRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanRevisionRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanRevisionRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanRevisionRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest"};return GetBackupPlanRevisionRequest}();v1beta.ListBackupPlanRevisionsRequest=function(){function ListBackupPlanRevisionsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.pageSize=reader.int32();break}case 3:{message.pageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanRevisionsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanRevisionsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest;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);return message};ListBackupPlanRevisionsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken=""}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;return object};ListBackupPlanRevisionsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanRevisionsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest"};return ListBackupPlanRevisionsRequest}();v1beta.ListBackupPlanRevisionsResponse=function(){function ListBackupPlanRevisionsResponse(properties){this.backupPlanRevisions=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanRevisions&&message.backupPlanRevisions.length))message.backupPlanRevisions=[];message.backupPlanRevisions.push($root.google.cloud.backupdr.v1beta.BackupPlanRevision.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanRevisionsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanRevisionsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanRevisions!=null&&message.hasOwnProperty("backupPlanRevisions")){if(!Array.isArray(message.backupPlanRevisions))return"backupPlanRevisions: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse;if(object.backupPlanRevisions){if(!Array.isArray(object.backupPlanRevisions))throw TypeError(".google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.backupPlanRevisions: array expected");message.backupPlanRevisions=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties;while(reader.pos>>3){case 1:{message.guestFlush=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DiskBackupPlanProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskBackupPlanProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.guestFlush!=null&&message.hasOwnProperty("guestFlush"))if(typeof message.guestFlush!=="boolean")return"guestFlush: boolean expected";return null};DiskBackupPlanProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DiskBackupPlanProperties;if(object.guestFlush!=null)message.guestFlush=Boolean(object.guestFlush);return message};DiskBackupPlanProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.guestFlush=false;if(message.guestFlush!=null&&message.hasOwnProperty("guestFlush"))object.guestFlush=message.guestFlush;return object};DiskBackupPlanProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskBackupPlanProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DiskBackupPlanProperties"};return DiskBackupPlanProperties}();v1beta.ComputeInstanceBackupPlanProperties=function(){function ComputeInstanceBackupPlanProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties;while(reader.pos>>3){case 1:{message.guestFlush=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceBackupPlanProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceBackupPlanProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.guestFlush!=null&&message.hasOwnProperty("guestFlush"))if(typeof message.guestFlush!=="boolean")return"guestFlush: boolean expected";return null};ComputeInstanceBackupPlanProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties;if(object.guestFlush!=null)message.guestFlush=Boolean(object.guestFlush);return message};ComputeInstanceBackupPlanProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.guestFlush=false;if(message.guestFlush!=null&&message.hasOwnProperty("guestFlush"))object.guestFlush=message.guestFlush;return object};ComputeInstanceBackupPlanProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceBackupPlanProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties"};return ComputeInstanceBackupPlanProperties}();v1beta.BackupPlanAssociation=function(){function BackupPlanAssociation(properties){this.rulesConfigInfo=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupPlanAssociation;while(reader.pos>>3){case 10:{message.cloudSqlInstanceBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 15:{message.alloydbClusterBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.name=reader.string();break}case 2:{message.resourceType=reader.string();break}case 3:{message.resource=reader.string();break}case 4:{message.backupPlan=reader.string();break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.state=reader.int32();break}case 8:{if(!(message.rulesConfigInfo&&message.rulesConfigInfo.length))message.rulesConfigInfo=[];message.rulesConfigInfo.push($root.google.cloud.backupdr.v1beta.RuleConfigInfo.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.dataSource=reader.string();break}case 11:{message.backupPlanRevisionId=reader.string();break}case 12:{message.backupPlanRevisionName=reader.string();break}case 16:{message.autoProtectionPolicyBinding=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupPlanAssociation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupPlanAssociation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.cloudSqlInstanceBackupPlanAssociationProperties!=null&&message.hasOwnProperty("cloudSqlInstanceBackupPlanAssociationProperties")){properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.verify(message.cloudSqlInstanceBackupPlanAssociationProperties,long+1);if(error)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.v1beta.AlloyDBClusterBackupPlanAssociationProperties.verify(message.alloydbClusterBackupPlanAssociationProperties,long+1);if(error)return"alloydbClusterBackupPlanAssociationProperties."+error}}if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resourceType!=null&&message.hasOwnProperty("resourceType"))if(!$util.isString(message.resourceType))return"resourceType: string expected";if(message.resource!=null&&message.hasOwnProperty("resource"))if(!$util.isString(message.resource))return"resource: string expected";if(message.backupPlan!=null&&message.hasOwnProperty("backupPlan"))if(!$util.isString(message.backupPlan))return"backupPlan: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);if(error)return"updateTime."+error}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:case 6:break}if(message.rulesConfigInfo!=null&&message.hasOwnProperty("rulesConfigInfo")){if(!Array.isArray(message.rulesConfigInfo))return"rulesConfigInfo: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupPlanAssociation;if(object.cloudSqlInstanceBackupPlanAssociationProperties!=null){if(typeof object.cloudSqlInstanceBackupPlanAssociationProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanAssociation.cloudSqlInstanceBackupPlanAssociationProperties: object expected");message.cloudSqlInstanceBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.fromObject(object.cloudSqlInstanceBackupPlanAssociationProperties,long+1)}if(object.alloydbClusterBackupPlanAssociationProperties!=null){if(typeof object.alloydbClusterBackupPlanAssociationProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanAssociation.alloydbClusterBackupPlanAssociationProperties: object expected");message.alloydbClusterBackupPlanAssociationProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.fromObject(object.alloydbClusterBackupPlanAssociationProperties,long+1)}if(object.name!=null)message.name=String(object.name);if(object.resourceType!=null)message.resourceType=String(object.resourceType);if(object.resource!=null)message.resource=String(object.resource);if(object.backupPlan!=null)message.backupPlan=String(object.backupPlan);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanAssociation.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.updateTime!=null){if(typeof object.updateTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanAssociation.updateTime: object expected");message.updateTime=$root.google.protobuf.Timestamp.fromObject(object.updateTime,long+1)}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"INACTIVE":case 4:message.state=4;break;case"UPDATING":case 5:message.state=5;break;case"PAUSED":case 6:message.state=6;break}if(object.rulesConfigInfo){if(!Array.isArray(object.rulesConfigInfo))throw TypeError(".google.cloud.backupdr.v1beta.BackupPlanAssociation.rulesConfigInfo: array expected");message.rulesConfigInfo=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.RuleConfigInfo;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 3:{message.lastBackupState=reader.int32();break}case 4:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RuleConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RuleConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";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.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);if(error)return"lastBackupError."+error}if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};RuleConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.RuleConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.RuleConfigInfo;if(object.ruleId!=null)message.ruleId=String(object.ruleId);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"PERMISSION_DENIED":case 2:message.lastBackupState=2;break;case"SUCCEEDED":case 3:message.lastBackupState=3;break;case"FAILED":case 4:message.lastBackupState=4;break}if(object.lastBackupError!=null){if(typeof object.lastBackupError!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RuleConfigInfo.lastBackupError: object expected");message.lastBackupError=$root.google.rpc.Status.fromObject(object.lastBackupError,long+1)}if(object.lastSuccessfulBackupConsistencyTime!=null){if(typeof object.lastSuccessfulBackupConsistencyTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};RuleConfigInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastBackupState=options.enums===String?"LAST_BACKUP_STATE_UNSPECIFIED":0;object.lastBackupError=null;object.lastSuccessfulBackupConsistencyTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastBackupState!=null&&message.hasOwnProperty("lastBackupState"))object.lastBackupState=options.enums===String?$root.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState[message.lastBackupState]===undefined?message.lastBackupState:$root.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState[message.lastBackupState]:message.lastBackupState;if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError"))object.lastBackupError=$root.google.rpc.Status.toObject(message.lastBackupError,options);if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime"))object.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime,options);return object};RuleConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RuleConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.RuleConfigInfo"};RuleConfigInfo.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]="PERMISSION_DENIED"]=2;values[valuesById[3]="SUCCEEDED"]=3;values[valuesById[4]="FAILED"]=4;return values}();return RuleConfigInfo}();v1beta.CreateBackupPlanAssociationRequest=function(){function CreateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupPlanAssociationId=reader.string();break}case 3:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.parent!=null&&message.hasOwnProperty("parent"))if(!$util.isString(message.parent))return"parent: string expected";if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))if(!$util.isString(message.backupPlanAssociationId))return"backupPlanAssociationId: string expected";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};CreateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest;if(object.parent!=null)message.parent=String(object.parent);if(object.backupPlanAssociationId!=null)message.backupPlanAssociationId=String(object.backupPlanAssociationId);if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};CreateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.backupPlanAssociationId="";object.backupPlanAssociation=null;object.requestId=""}if(message.parent!=null&&message.hasOwnProperty("parent"))object.parent=message.parent;if(message.backupPlanAssociationId!=null&&message.hasOwnProperty("backupPlanAssociationId"))object.backupPlanAssociationId=message.backupPlanAssociationId;if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};CreateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest"};return CreateBackupPlanAssociationRequest}();v1beta.ListBackupPlanAssociationsRequest=function(){function ListBackupPlanAssociationsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBackupPlanAssociationsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};ListBackupPlanAssociationsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest;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);return message};ListBackupPlanAssociationsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.parent="";object.pageSize=0;object.pageToken="";object.filter=""}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;return object};ListBackupPlanAssociationsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupPlanAssociationsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest"};return ListBackupPlanAssociationsRequest}();v1beta.ListBackupPlanAssociationsResponse=function(){function ListBackupPlanAssociationsResponse(properties){this.backupPlanAssociations=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1beta.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupPlanAssociationsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupPlanAssociationsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchBackupPlanAssociationsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest;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);return message};FetchBackupPlanAssociationsForResourceTypeRequest.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=""}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;return object};FetchBackupPlanAssociationsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupPlanAssociationsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest"};return FetchBackupPlanAssociationsForResourceTypeRequest}();v1beta.FetchBackupPlanAssociationsForResourceTypeResponse=function(){function FetchBackupPlanAssociationsForResourceTypeResponse(properties){this.backupPlanAssociations=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backupPlanAssociations&&message.backupPlanAssociations.length))message.backupPlanAssociations=[];message.backupPlanAssociations.push($root.google.cloud.backupdr.v1beta.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupPlanAssociationsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupPlanAssociationsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociations!=null&&message.hasOwnProperty("backupPlanAssociations")){if(!Array.isArray(message.backupPlanAssociations))return"backupPlanAssociations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse;if(object.backupPlanAssociations){if(!Array.isArray(object.backupPlanAssociations))throw TypeError(".google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse.backupPlanAssociations: array expected");message.backupPlanAssociations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);return message};GetBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest"};return GetBackupPlanAssociationRequest}();v1beta.DeleteBackupPlanAssociationRequest=function(){function DeleteBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}case 3:{message.autoProtectionPolicyBinding=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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.autoProtectionPolicyBinding!=null&&message.hasOwnProperty("autoProtectionPolicyBinding"))if(!$util.isString(message.autoProtectionPolicyBinding))return"autoProtectionPolicyBinding: string expected";return null};DeleteBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.autoProtectionPolicyBinding!=null)message.autoProtectionPolicyBinding=String(object.autoProtectionPolicyBinding);return message};DeleteBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.requestId="";object.autoProtectionPolicyBinding=""}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;if(message.autoProtectionPolicyBinding!=null&&message.hasOwnProperty("autoProtectionPolicyBinding"))object.autoProtectionPolicyBinding=message.autoProtectionPolicyBinding;return object};DeleteBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest"};return DeleteBackupPlanAssociationRequest}();v1beta.UpdateBackupPlanAssociationRequest=function(){function UpdateBackupPlanAssociationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest;while(reader.pos>>3){case 1:{message.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupPlanAssociationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupPlanAssociationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation")){var error=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.verify(message.backupPlanAssociation,long+1);if(error)return"backupPlanAssociation."+error}if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupPlanAssociationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest;if(object.backupPlanAssociation!=null){if(typeof object.backupPlanAssociation!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.backupPlanAssociation: object expected");message.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.fromObject(object.backupPlanAssociation,long+1)}if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupPlanAssociationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlanAssociation=null;object.updateMask=null;object.requestId=""}if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=$root.google.cloud.backupdr.v1beta.BackupPlanAssociation.toObject(message.backupPlanAssociation,options);if(message.updateMask!=null&&message.hasOwnProperty("updateMask"))object.updateMask=$root.google.protobuf.FieldMask.toObject(message.updateMask,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupPlanAssociationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupPlanAssociationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest"};return UpdateBackupPlanAssociationRequest}();v1beta.TriggerBackupRequest=function(){function TriggerBackupRequest(properties){this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.TriggerBackupRequest,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.ruleId=reader.string();break}case 3:{message.requestId=reader.string();break}case 6:{message.customRetentionDays=reader.int32();break}case 7:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};TriggerBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TriggerBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";if(message.customRetentionDays!=null&&message.hasOwnProperty("customRetentionDays"))if(!$util.isInteger(message.customRetentionDays))return"customRetentionDays: integer 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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.TriggerBackupRequest;if(object.name!=null)message.name=String(object.name);if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.customRetentionDays!=null)message.customRetentionDays=object.customRetentionDays|0;if(object.labels){if(typeof object.labels!=="object")throw TypeError(".google.cloud.backupdr.v1beta.TriggerBackupRequest.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.pitrWindows&&message.pitrWindows.length))message.pitrWindows=[];message.pitrWindows.push($root.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.clusterUid=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.pitrWindows!=null&&message.hasOwnProperty("pitrWindows")){if(!Array.isArray(message.pitrWindows))return"pitrWindows: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.pitrWindows){if(!Array.isArray(object.pitrWindows))throw TypeError(".google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.pitrWindows: array expected");message.pitrWindows=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterDataSourceReferenceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterDataSourceReferenceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};AlloyDBClusterDataSourceReferenceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties;if(object.name!=null)message.name=String(object.name);return message};AlloyDBClusterDataSourceReferenceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};AlloyDBClusterDataSourceReferenceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterDataSourceReferenceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties"};return AlloyDBClusterDataSourceReferenceProperties}();v1beta.AlloyDbPitrWindow=function(){function AlloyDbPitrWindow(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AlloyDbPitrWindow;while(reader.pos>>3){case 1:{message.startTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.endTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.logRetentionDays=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDbPitrWindow.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDbPitrWindow.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.startTime!=null&&message.hasOwnProperty("startTime")){var error=$root.google.protobuf.Timestamp.verify(message.startTime,long+1);if(error)return"startTime."+error}if(message.endTime!=null&&message.hasOwnProperty("endTime")){var error=$root.google.protobuf.Timestamp.verify(message.endTime,long+1);if(error)return"endTime."+error}if(message.logRetentionDays!=null&&message.hasOwnProperty("logRetentionDays"))if(!$util.isInteger(message.logRetentionDays)&&!(message.logRetentionDays&&$util.isInteger(message.logRetentionDays.low)&&$util.isInteger(message.logRetentionDays.high)))return"logRetentionDays: integer|Long expected";return null};AlloyDbPitrWindow.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AlloyDbPitrWindow)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AlloyDbPitrWindow;if(object.startTime!=null){if(typeof object.startTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AlloyDbPitrWindow.startTime: object expected");message.startTime=$root.google.protobuf.Timestamp.fromObject(object.startTime,long+1)}if(object.endTime!=null){if(typeof object.endTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AlloyDbPitrWindow.endTime: object expected");message.endTime=$root.google.protobuf.Timestamp.fromObject(object.endTime,long+1)}if(object.logRetentionDays!=null)if($util.Long)(message.logRetentionDays=$util.Long.fromValue(object.logRetentionDays)).unsigned=false;else if(typeof object.logRetentionDays==="string")message.logRetentionDays=parseInt(object.logRetentionDays,10);else if(typeof object.logRetentionDays==="number")message.logRetentionDays=object.logRetentionDays;else if(typeof object.logRetentionDays==="object")message.logRetentionDays=new $util.LongBits(object.logRetentionDays.low>>>0,object.logRetentionDays.high>>>0).toNumber();return message};AlloyDbPitrWindow.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.startTime=null;object.endTime=null;if($util.Long){var long=new $util.Long(0,0,false);object.logRetentionDays=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.logRetentionDays=options.longs===String?"0":0}if(message.startTime!=null&&message.hasOwnProperty("startTime"))object.startTime=$root.google.protobuf.Timestamp.toObject(message.startTime,options);if(message.endTime!=null&&message.hasOwnProperty("endTime"))object.endTime=$root.google.protobuf.Timestamp.toObject(message.endTime,options);if(message.logRetentionDays!=null&&message.hasOwnProperty("logRetentionDays"))if(typeof message.logRetentionDays==="number")object.logRetentionDays=options.longs===String?String(message.logRetentionDays):message.logRetentionDays;else object.logRetentionDays=options.longs===String?$util.Long.prototype.toString.call(message.logRetentionDays):options.longs===Number?new $util.LongBits(message.logRetentionDays.low>>>0,message.logRetentionDays.high>>>0).toNumber():message.logRetentionDays;return object};AlloyDbPitrWindow.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDbPitrWindow.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AlloyDbPitrWindow"};return AlloyDbPitrWindow}();v1beta.AlloyDbClusterBackupProperties=function(){function AlloyDbClusterBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.storedBytes=reader.int64();break}case 3:{message.chainId=reader.string();break}case 4:{message.databaseVersion=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDbClusterBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDbClusterBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};AlloyDbClusterBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};AlloyDbClusterBackupProperties.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"}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};AlloyDbClusterBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDbClusterBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties"};return AlloyDbClusterBackupProperties}();v1beta.AlloyDBClusterBackupPlanAssociationProperties=function(){function AlloyDBClusterBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.clusterUid=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AlloyDBClusterBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AlloyDBClusterBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))if(!$util.isString(message.clusterUid))return"clusterUid: string expected";return null};AlloyDBClusterBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties;if(object.clusterUid!=null)message.clusterUid=String(object.clusterUid);return message};AlloyDBClusterBackupPlanAssociationProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.clusterUid="";if(message.clusterUid!=null&&message.hasOwnProperty("clusterUid"))object.clusterUid=message.clusterUid;return object};AlloyDBClusterBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AlloyDBClusterBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties"};return AlloyDBClusterBackupPlanAssociationProperties}();v1beta.CloudSqlInstanceDataSourceProperties=function(){function CloudSqlInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.CloudSqlInstanceDataSourceProperties.instanceCreateTime: object expected");message.instanceCreateTime=$root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};CloudSqlInstanceDataSourceProperties.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};CloudSqlInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties"};return CloudSqlInstanceDataSourceProperties}();v1beta.CloudSqlInstanceBackupProperties=function(){function CloudSqlInstanceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties;while(reader.pos>>3){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(),undefined,long+1);break}case 6:{message.instanceTier=reader.string();break}case 8:{message.instanceDeleteTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);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,long+1);if(error)return"instanceDeleteTime."+error}return null};CloudSqlInstanceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.CloudSqlInstanceBackupProperties.instanceCreateTime: object expected");message.instanceCreateTime=$root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);if(object.instanceDeleteTime!=null){if(typeof object.instanceDeleteTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.instanceDeleteTime: object expected");message.instanceDeleteTime=$root.google.protobuf.Timestamp.fromObject(object.instanceDeleteTime,long+1)}return message};CloudSqlInstanceBackupProperties.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(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};CloudSqlInstanceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties"};return CloudSqlInstanceBackupProperties}();v1beta.CloudSqlInstanceDataSourceReferenceProperties=function(){function CloudSqlInstanceDataSourceReferenceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties;while(reader.pos>>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(),undefined,long+1);break}case 5:{message.instanceTier=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceDataSourceReferenceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceDataSourceReferenceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"instanceCreateTime."+error}if(message.instanceTier!=null&&message.hasOwnProperty("instanceTier"))if(!$util.isString(message.instanceTier))return"instanceTier: string expected";return null};CloudSqlInstanceDataSourceReferenceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.CloudSqlInstanceDataSourceReferenceProperties.instanceCreateTime: object expected");message.instanceCreateTime=$root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime,long+1)}if(object.instanceTier!=null)message.instanceTier=String(object.instanceTier);return message};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};CloudSqlInstanceDataSourceReferenceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceDataSourceReferenceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties"};return CloudSqlInstanceDataSourceReferenceProperties}();v1beta.CloudSqlInstanceInitializationConfig=function(){function CloudSqlInstanceInitializationConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig;while(reader.pos>>3){case 1:{message.edition=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceInitializationConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceInitializationConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 1:case 2:break}return null};CloudSqlInstanceInitializationConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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}return message};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.v1beta.CloudSqlInstanceInitializationConfig.Edition[message.edition]===undefined?message.edition:$root.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition[message.edition]:message.edition;return object};CloudSqlInstanceInitializationConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceInitializationConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig"};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}();v1beta.CloudSqlInstanceBackupPlanAssociationProperties=function(){function CloudSqlInstanceBackupPlanAssociationProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties;while(reader.pos>>3){case 1:{message.instanceCreateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CloudSqlInstanceBackupPlanAssociationProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CloudSqlInstanceBackupPlanAssociationProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.instanceCreateTime!=null&&message.hasOwnProperty("instanceCreateTime")){var error=$root.google.protobuf.Timestamp.verify(message.instanceCreateTime,long+1);if(error)return"instanceCreateTime."+error}return null};CloudSqlInstanceBackupPlanAssociationProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties;if(object.instanceCreateTime!=null){if(typeof object.instanceCreateTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.instanceCreateTime: object expected");message.instanceCreateTime=$root.google.protobuf.Timestamp.fromObject(object.instanceCreateTime,long+1)}return message};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};CloudSqlInstanceBackupPlanAssociationProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CloudSqlInstanceBackupPlanAssociationProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties"};return CloudSqlInstanceBackupPlanAssociationProperties}();v1beta.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}();v1beta.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}();v1beta.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}();v1beta.BackupVault=function(){function BackupVault(properties){this.labels={};this.annotations={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupVault,key,value;while(reader.pos>>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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 4:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.backupMinimumEnforcedRetentionDuration=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);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(),undefined,long+1);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>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.annotations,key);message.annotations[key]=value;break}case 24:{message.accessRestriction=reader.int32();break}case 29:{message.encryptionConfig=$root.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupVault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupVault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.BackupVault.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>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.v1beta.BackupVault.annotations: object expected");message.annotations={};for(var keys=Object.keys(object.annotations),i=0;i>>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$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig;while(reader.pos>>3){case 1:{message.kmsKeyName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};EncryptionConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EncryptionConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){properties._kmsKeyName=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}return null};EncryptionConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig;if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);return message};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};EncryptionConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EncryptionConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig"};return EncryptionConfig}();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}();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}();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}();return BackupVault}();v1beta.DataSource=function(){function DataSource(properties){this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSource,key,value;while(reader.pos>>3){case 26:{message.dataSourceGcpResource=$root.google.cloud.backupdr.v1beta.DataSourceGcpResource.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.dataSourceBackupApplianceApplication=$root.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.name=reader.string();break}case 21:{message.state=reader.int32();break}case 4:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 5:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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.v1beta.BackupConfigInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.backupBlockedByVaultAccessRestriction=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DataSource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.dataSourceGcpResource!=null&&message.hasOwnProperty("dataSourceGcpResource")){properties.sourceResource=1;{var error=$root.google.cloud.backupdr.v1beta.DataSourceGcpResource.verify(message.dataSourceGcpResource,long+1);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.v1beta.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication,long+1);if(error)return"dataSourceBackupApplianceApplication."+error}}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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DataSource;if(object.dataSourceGcpResource!=null){if(typeof object.dataSourceGcpResource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSource.dataSourceGcpResource: object expected");message.dataSourceGcpResource=$root.google.cloud.backupdr.v1beta.DataSourceGcpResource.fromObject(object.dataSourceGcpResource,long+1)}if(object.dataSourceBackupApplianceApplication!=null){if(typeof object.dataSourceBackupApplianceApplication!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSource.dataSourceBackupApplianceApplication: object expected");message.dataSourceBackupApplianceApplication=$root.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication,long+1)}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.labels){if(typeof object.labels!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSource.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>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.v1beta.DataSource.backupConfigInfo: object expected");message.backupConfigInfo=$root.google.cloud.backupdr.v1beta.BackupConfigInfo.fromObject(object.backupConfigInfo,long+1)}if(object.backupBlockedByVaultAccessRestriction!=null)message.backupBlockedByVaultAccessRestriction=Boolean(object.backupBlockedByVaultAccessRestriction);return message};DataSource.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.objects||options.defaults)object.labels={};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(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>>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.v1beta.DataSource.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1beta.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.v1beta.BackupConfigState[message.configState]===undefined?message.configState:$root.google.cloud.backupdr.v1beta.BackupConfigState[message.configState]:message.configState;if(message.backupConfigInfo!=null&&message.hasOwnProperty("backupConfigInfo"))object.backupConfigInfo=$root.google.cloud.backupdr.v1beta.BackupConfigInfo.toObject(message.backupConfigInfo,options);if(message.dataSourceGcpResource!=null&&message.hasOwnProperty("dataSourceGcpResource")){object.dataSourceGcpResource=$root.google.cloud.backupdr.v1beta.DataSourceGcpResource.toObject(message.dataSourceGcpResource,options);if(options.oneofs)object.sourceResource="dataSourceGcpResource"}if(message.dataSourceBackupApplianceApplication!=null&&message.hasOwnProperty("dataSourceBackupApplianceApplication")){object.dataSourceBackupApplianceApplication=$root.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication,options);if(options.oneofs)object.sourceResource="dataSourceBackupApplianceApplication"}if(message.backupBlockedByVaultAccessRestriction!=null&&message.hasOwnProperty("backupBlockedByVaultAccessRestriction"))object.backupBlockedByVaultAccessRestriction=message.backupBlockedByVaultAccessRestriction;return object};DataSource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSource"};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}();v1beta.BackupConfigInfo=function(){function BackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupConfigInfo;while(reader.pos>>3){case 4:{message.gcpBackupConfig=$root.google.cloud.backupdr.v1beta.GcpBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.backupApplianceBackupConfig=$root.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.lastBackupError=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpBackupConfig!=null&&message.hasOwnProperty("gcpBackupConfig")){properties.backupConfig=1;{var error=$root.google.cloud.backupdr.v1beta.GcpBackupConfig.verify(message.gcpBackupConfig,long+1);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.v1beta.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig,long+1);if(error)return"backupApplianceBackupConfig."+error}}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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}if(message.lastBackupError!=null&&message.hasOwnProperty("lastBackupError")){var error=$root.google.rpc.Status.verify(message.lastBackupError,long+1);if(error)return"lastBackupError."+error}return null};BackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupConfigInfo;if(object.gcpBackupConfig!=null){if(typeof object.gcpBackupConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigInfo.gcpBackupConfig: object expected");message.gcpBackupConfig=$root.google.cloud.backupdr.v1beta.GcpBackupConfig.fromObject(object.gcpBackupConfig,long+1)}if(object.backupApplianceBackupConfig!=null){if(typeof object.backupApplianceBackupConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigInfo.backupApplianceBackupConfig: object expected");message.backupApplianceBackupConfig=$root.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig,long+1)}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.v1beta.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}if(object.lastBackupError!=null){if(typeof object.lastBackupError!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigInfo.lastBackupError: object expected");message.lastBackupError=$root.google.rpc.Status.fromObject(object.lastBackupError,long+1)}return message};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.v1beta.BackupConfigInfo.LastBackupState[message.lastBackupState]===undefined?message.lastBackupState:$root.google.cloud.backupdr.v1beta.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.v1beta.GcpBackupConfig.toObject(message.gcpBackupConfig,options);if(options.oneofs)object.backupConfig="gcpBackupConfig"}if(message.backupApplianceBackupConfig!=null&&message.hasOwnProperty("backupApplianceBackupConfig")){object.backupApplianceBackupConfig=$root.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig,options);if(options.oneofs)object.backupConfig="backupApplianceBackupConfig"}return object};BackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupConfigInfo"};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}();v1beta.GcpBackupConfig=function(){function GcpBackupConfig(properties){this.backupPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GcpBackupConfig;while(reader.pos>>3){case 1:{message.backupPlan=reader.string();break}case 2:{message.backupPlanDescription=reader.string();break}case 3:{message.backupPlanAssociation=reader.string();break}case 4:{if(!(message.backupPlanRules&&message.backupPlanRules.length))message.backupPlanRules=[];message.backupPlanRules.push(reader.string());break}case 5:{message.backupPlanRevisionName=reader.string();break}case 6:{message.backupPlanRevisionId=reader.string();break}case 7:{message.autoProtectionPolicyBinding=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.GcpBackupConfig.backupPlanRules: array expected");message.backupPlanRules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig;while(reader.pos>>3){case 1:{message.backupApplianceName=reader.string();break}case 2:{message.backupApplianceId=reader.int64();break}case 3:{message.slaId=reader.int64();break}case 4:{message.applicationName=reader.string();break}case 5:{message.hostName=reader.string();break}case 6:{message.sltName=reader.string();break}case 7:{message.slpName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};BackupApplianceBackupConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};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=""}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};BackupApplianceBackupConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupApplianceBackupConfig"};return BackupApplianceBackupConfig}();v1beta.DataSourceGcpResource=function(){function DataSourceGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSourceGcpResource;while(reader.pos>>3){case 4:{message.computeInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.cloudSqlInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.alloyDbClusterDatasourceProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskDatasourceProperties=$root.google.cloud.backupdr.v1beta.DiskDataSourceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.computeInstanceDatasourceProperties!=null&&message.hasOwnProperty("computeInstanceDatasourceProperties")){properties.gcpResourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties,long+1);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.v1beta.CloudSqlInstanceDataSourceProperties.verify(message.cloudSqlInstanceDatasourceProperties,long+1);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.v1beta.AlloyDBClusterDataSourceProperties.verify(message.alloyDbClusterDatasourceProperties,long+1);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.v1beta.DiskDataSourceProperties.verify(message.diskDatasourceProperties,long+1);if(error)return"diskDatasourceProperties."+error}}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};DataSourceGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DataSourceGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DataSourceGcpResource;if(object.computeInstanceDatasourceProperties!=null){if(typeof object.computeInstanceDatasourceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected");message.computeInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties,long+1)}if(object.cloudSqlInstanceDatasourceProperties!=null){if(typeof object.cloudSqlInstanceDatasourceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResource.cloudSqlInstanceDatasourceProperties: object expected");message.cloudSqlInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.fromObject(object.cloudSqlInstanceDatasourceProperties,long+1)}if(object.alloyDbClusterDatasourceProperties!=null){if(typeof object.alloyDbClusterDatasourceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResource.alloyDbClusterDatasourceProperties: object expected");message.alloyDbClusterDatasourceProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.fromObject(object.alloyDbClusterDatasourceProperties,long+1)}if(object.diskDatasourceProperties!=null){if(typeof object.diskDatasourceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResource.diskDatasourceProperties: object expected");message.diskDatasourceProperties=$root.google.cloud.backupdr.v1beta.DiskDataSourceProperties.fromObject(object.diskDatasourceProperties,long+1)}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};DataSourceGcpResource.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;if(message.computeInstanceDatasourceProperties!=null&&message.hasOwnProperty("computeInstanceDatasourceProperties")){object.computeInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties,options);if(options.oneofs)object.gcpResourceProperties="computeInstanceDatasourceProperties"}if(message.cloudSqlInstanceDatasourceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceDatasourceProperties")){object.cloudSqlInstanceDatasourceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.toObject(message.cloudSqlInstanceDatasourceProperties,options);if(options.oneofs)object.gcpResourceProperties="cloudSqlInstanceDatasourceProperties"}if(message.alloyDbClusterDatasourceProperties!=null&&message.hasOwnProperty("alloyDbClusterDatasourceProperties")){object.alloyDbClusterDatasourceProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.toObject(message.alloyDbClusterDatasourceProperties,options);if(options.oneofs)object.gcpResourceProperties="alloyDbClusterDatasourceProperties"}if(message.diskDatasourceProperties!=null&&message.hasOwnProperty("diskDatasourceProperties")){object.diskDatasourceProperties=$root.google.cloud.backupdr.v1beta.DiskDataSourceProperties.toObject(message.diskDatasourceProperties,options);if(options.oneofs)object.gcpResourceProperties="diskDatasourceProperties"}return object};DataSourceGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSourceGcpResource"};return DataSourceGcpResource}();v1beta.DataSourceBackupApplianceApplication=function(){function DataSourceBackupApplianceApplication(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication;while(reader.pos>>3){case 1:{message.applicationName=reader.string();break}case 2:{message.backupAppliance=reader.string();break}case 3:{message.applianceId=reader.int64();break}case 4:{message.type=reader.string();break}case 8:{message.applicationId=reader.int64();break}case 6:{message.hostname=reader.string();break}case 7:{message.hostId=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupApplianceApplication.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupApplianceApplication.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DataSourceBackupApplianceApplication.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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)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)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};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.applianceId=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else 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.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;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;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};DataSourceBackupApplianceApplication.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupApplianceApplication.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication"};return DataSourceBackupApplianceApplication}();v1beta.ServiceLockInfo=function(){function ServiceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ServiceLockInfo;while(reader.pos>>3){case 1:{message.operation=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ServiceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.operation!=null&&message.hasOwnProperty("operation"))if(!$util.isString(message.operation))return"operation: string expected";return null};ServiceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ServiceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ServiceLockInfo;if(object.operation!=null)message.operation=String(object.operation);return message};ServiceLockInfo.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};ServiceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ServiceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ServiceLockInfo"};return ServiceLockInfo}();v1beta.BackupApplianceLockInfo=function(){function BackupApplianceLockInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo;while(reader.pos>>3){case 6:{message.jobName=reader.string();break}case 7:{message.backupImage=reader.string();break}case 8:{message.slaId=reader.int64();break}case 1:{message.backupApplianceId=reader.int64();break}case 2:{message.backupApplianceName=reader.string();break}case 5:{message.lockReason=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceLockInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceLockInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};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.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";return null};BackupApplianceLockInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo;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();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);return message};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};BackupApplianceLockInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceLockInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupApplianceLockInfo"};return BackupApplianceLockInfo}();v1beta.BackupLock=function(){function BackupLock(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupLock;while(reader.pos>>3){case 3:{message.backupApplianceLockInfo=$root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.serviceLockInfo=$root.google.cloud.backupdr.v1beta.ServiceLockInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.lockUntilTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupLock.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLock.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.backupApplianceLockInfo!=null&&message.hasOwnProperty("backupApplianceLockInfo")){properties.ClientLockInfo=1;{var error=$root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo,long+1);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.v1beta.ServiceLockInfo.verify(message.serviceLockInfo,long+1);if(error)return"serviceLockInfo."+error}}if(message.lockUntilTime!=null&&message.hasOwnProperty("lockUntilTime")){var error=$root.google.protobuf.Timestamp.verify(message.lockUntilTime,long+1);if(error)return"lockUntilTime."+error}return null};BackupLock.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupLock)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupLock;if(object.backupApplianceLockInfo!=null){if(typeof object.backupApplianceLockInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupLock.backupApplianceLockInfo: object expected");message.backupApplianceLockInfo=$root.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo,long+1)}if(object.serviceLockInfo!=null){if(typeof object.serviceLockInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupLock.serviceLockInfo: object expected");message.serviceLockInfo=$root.google.cloud.backupdr.v1beta.ServiceLockInfo.fromObject(object.serviceLockInfo,long+1)}if(object.lockUntilTime!=null){if(typeof object.lockUntilTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupLock.lockUntilTime: object expected");message.lockUntilTime=$root.google.protobuf.Timestamp.fromObject(object.lockUntilTime,long+1)}return message};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.v1beta.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo,options);if(options.oneofs)object.ClientLockInfo="backupApplianceLockInfo"}if(message.serviceLockInfo!=null&&message.hasOwnProperty("serviceLockInfo")){object.serviceLockInfo=$root.google.cloud.backupdr.v1beta.ServiceLockInfo.toObject(message.serviceLockInfo,options);if(options.oneofs)object.ClientLockInfo="serviceLockInfo"}return object};BackupLock.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLock.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupLock"};return BackupLock}();v1beta.Backup=function(){function Backup(properties){this.labels={};this.serviceLocks=[];this.backupApplianceLocks=[];this.kmsKeyVersions=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Backup,key,value;while(reader.pos>>3){case 19:{message.computeInstanceBackupProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 26:{message.cloudSqlInstanceBackupProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 21:{message.backupApplianceBackupProperties=$root.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.alloyDbBackupProperties=$root.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.diskBackupProperties=$root.google.cloud.backupdr.v1beta.DiskBackupProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{message.gcpBackupPlanInfo=$root.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 31:{message.gcpResource=$root.google.cloud.backupdr.v1beta.BackupGcpResource.decode(reader,reader.uint32(),undefined,long+1);break}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(),undefined,long+1);break}case 4:{message.updateTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 6:{message.enforcedRetentionEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 30:{message.backupRetentionInheritance=reader.int32();break}case 7:{message.expireTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{message.consistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);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.v1beta.BackupLock.decode(reader,reader.uint32(),undefined,long+1));break}case 18:{if(!(message.backupApplianceLocks&&message.backupApplianceLocks.length))message.backupApplianceLocks=[];message.backupApplianceLocks.push($root.google.cloud.backupdr.v1beta.BackupLock.decode(reader,reader.uint32(),undefined,long+1));break}case 20:{message.backupType=reader.int32();break}case 23:{message.resourceSizeBytes=reader.int64();break}case 24:{message.satisfiesPzs=reader.bool();break}case 25:{message.satisfiesPzi=reader.bool();break}case 33:{if(!(message.kmsKeyVersions&&message.kmsKeyVersions.length))message.kmsKeyVersions=[];message.kmsKeyVersions.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Backup.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Backup.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.computeInstanceBackupProperties!=null&&message.hasOwnProperty("computeInstanceBackupProperties")){properties.backupProperties=1;{var error=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties,long+1);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.v1beta.CloudSqlInstanceBackupProperties.verify(message.cloudSqlInstanceBackupProperties,long+1);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.v1beta.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties,long+1);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.v1beta.AlloyDbClusterBackupProperties.verify(message.alloyDbBackupProperties,long+1);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.v1beta.DiskBackupProperties.verify(message.diskBackupProperties,long+1);if(error)return"diskBackupProperties."+error}}if(message.gcpBackupPlanInfo!=null&&message.hasOwnProperty("gcpBackupPlanInfo")){properties.planInfo=1;{var error=$root.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo,long+1);if(error)return"gcpBackupPlanInfo."+error}}if(message.gcpResource!=null&&message.hasOwnProperty("gcpResource")){properties.sourceResource=1;{var error=$root.google.cloud.backupdr.v1beta.BackupGcpResource.verify(message.gcpResource,long+1);if(error)return"gcpResource."+error}}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,long+1);if(error)return"createTime."+error}}if(message.updateTime!=null&&message.hasOwnProperty("updateTime")){properties._updateTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.updateTime,long+1);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$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Backup;if(object.computeInstanceBackupProperties!=null){if(typeof object.computeInstanceBackupProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.computeInstanceBackupProperties: object expected");message.computeInstanceBackupProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties,long+1)}if(object.cloudSqlInstanceBackupProperties!=null){if(typeof object.cloudSqlInstanceBackupProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.cloudSqlInstanceBackupProperties: object expected");message.cloudSqlInstanceBackupProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.fromObject(object.cloudSqlInstanceBackupProperties,long+1)}if(object.backupApplianceBackupProperties!=null){if(typeof object.backupApplianceBackupProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.backupApplianceBackupProperties: object expected");message.backupApplianceBackupProperties=$root.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties,long+1)}if(object.alloyDbBackupProperties!=null){if(typeof object.alloyDbBackupProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.alloyDbBackupProperties: object expected");message.alloyDbBackupProperties=$root.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.fromObject(object.alloyDbBackupProperties,long+1)}if(object.diskBackupProperties!=null){if(typeof object.diskBackupProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.diskBackupProperties: object expected");message.diskBackupProperties=$root.google.cloud.backupdr.v1beta.DiskBackupProperties.fromObject(object.diskBackupProperties,long+1)}if(object.gcpBackupPlanInfo!=null){if(typeof object.gcpBackupPlanInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.gcpBackupPlanInfo: object expected");message.gcpBackupPlanInfo=$root.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo,long+1)}if(object.gcpResource!=null){if(typeof object.gcpResource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.gcpResource: object expected");message.gcpResource=$root.google.cloud.backupdr.v1beta.BackupGcpResource.fromObject(object.gcpResource,long+1)}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.v1beta.Backup.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}if(object.updateTime!=null){if(typeof object.updateTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.updateTime: object expected");message.updateTime=$root.google.protobuf.Timestamp.fromObject(object.updateTime,long+1)}if(object.labels){if(typeof object.labels!=="object")throw TypeError(".google.cloud.backupdr.v1beta.Backup.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>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.kmsKeyVersions){if(!Array.isArray(object.kmsKeyVersions))throw TypeError(".google.cloud.backupdr.v1beta.Backup.kmsKeyVersions: array expected");message.kmsKeyVersions=[];for(var i=0;i>>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.v1beta.CloudSqlInstanceBackupProperties.toObject(message.cloudSqlInstanceBackupProperties,options);if(options.oneofs)object.backupProperties="cloudSqlInstanceBackupProperties"}if(message.alloyDbBackupProperties!=null&&message.hasOwnProperty("alloyDbBackupProperties")){object.alloyDbBackupProperties=$root.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.toObject(message.alloyDbBackupProperties,options);if(options.oneofs)object.backupProperties="alloyDbBackupProperties"}if(message.diskBackupProperties!=null&&message.hasOwnProperty("diskBackupProperties")){object.diskBackupProperties=$root.google.cloud.backupdr.v1beta.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.v1beta.BackupVault.BackupRetentionInheritance[message.backupRetentionInheritance]===undefined?message.backupRetentionInheritance:$root.google.cloud.backupdr.v1beta.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.v1beta.BackupGcpResource.toObject(message.gcpResource,options);if(options.oneofs)object.sourceResource="gcpResource"}if(message.kmsKeyVersions&&message.kmsKeyVersions.length){object.kmsKeyVersions=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo;while(reader.pos>>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,long);break}}return message};GCPBackupPlanInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GCPBackupPlanInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GCPBackupPlanInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};GCPBackupPlanInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.backupPlan="";object.backupPlanRuleId="";object.backupPlanRevisionName="";object.backupPlanRevisionId=""}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};GCPBackupPlanInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GCPBackupPlanInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo"};return GCPBackupPlanInfo}();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.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}();return Backup}();v1beta.CreateBackupVaultRequest=function(){function CreateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CreateBackupVaultRequest;while(reader.pos>>3){case 1:{message.parent=reader.string();break}case 2:{message.backupVaultId=reader.string();break}case 3:{message.backupVault=$root.google.cloud.backupdr.v1beta.BackupVault.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.requestId=reader.string();break}case 5:{message.validateOnly=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};CreateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CreateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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.v1beta.BackupVault.verify(message.backupVault,long+1);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};CreateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CreateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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.v1beta.CreateBackupVaultRequest.backupVault: object expected");message.backupVault=$root.google.cloud.backupdr.v1beta.BackupVault.fromObject(object.backupVault,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.validateOnly!=null)message.validateOnly=Boolean(object.validateOnly);return message};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.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.v1beta.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};CreateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CreateBackupVaultRequest"};return CreateBackupVaultRequest}();v1beta.ListBackupVaultsRequest=function(){function ListBackupVaultsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupVaultsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};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.v1beta.BackupVaultView[message.view]===undefined?message.view:$root.google.cloud.backupdr.v1beta.BackupVaultView[message.view]:message.view;return object};ListBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBackupVaultsRequest"};return ListBackupVaultsRequest}();v1beta.ListBackupVaultsResponse=function(){function ListBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1beta.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupVaultsResponse;if(object.backupVaults){if(!Array.isArray(object.backupVaults))throw TypeError(".google.cloud.backupdr.v1beta.ListBackupVaultsResponse.backupVaults: array expected");message.backupVaults=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};FetchUsableBackupVaultsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};FetchUsableBackupVaultsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest;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};FetchUsableBackupVaultsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};FetchUsableBackupVaultsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchUsableBackupVaultsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest"};return FetchUsableBackupVaultsRequest}();v1beta.FetchUsableBackupVaultsResponse=function(){function FetchUsableBackupVaultsResponse(properties){this.backupVaults=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse;while(reader.pos>>3){case 1:{if(!(message.backupVaults&&message.backupVaults.length))message.backupVaults=[];message.backupVaults.push($root.google.cloud.backupdr.v1beta.BackupVault.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};FetchUsableBackupVaultsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchUsableBackupVaultsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupVaults!=null&&message.hasOwnProperty("backupVaults")){if(!Array.isArray(message.backupVaults))return"backupVaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse;if(object.backupVaults){if(!Array.isArray(object.backupVaults))throw TypeError(".google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.backupVaults: array expected");message.backupVaults=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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:return"view: enum value expected";case 0:case 1:case 2:break}return null};FetchBackupsForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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"){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};FetchBackupsForResourceTypeRequest.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"))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.v1beta.BackupView[message.view]===undefined?message.view:$root.google.cloud.backupdr.v1beta.BackupView[message.view]:message.view;return object};FetchBackupsForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchBackupsForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest"};return FetchBackupsForResourceTypeRequest}();v1beta.FetchBackupsForResourceTypeResponse=function(){function FetchBackupsForResourceTypeResponse(properties){this.backups=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1beta.Backup.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchBackupsForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchBackupsForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse;if(object.backups){if(!Array.isArray(object.backups))throw TypeError(".google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.backups: array expected");message.backups=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};GetBackupVaultRequest.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}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.view!=null&&message.hasOwnProperty("view"))object.view=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupVaultView[message.view]===undefined?message.view:$root.google.cloud.backupdr.v1beta.BackupVaultView[message.view]:message.view;return object};GetBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBackupVaultRequest"};return GetBackupVaultRequest}();v1beta.UpdateBackupVaultRequest=function(){function UpdateBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backupVault=$root.google.cloud.backupdr.v1beta.BackupVault.decode(reader,reader.uint32(),undefined,long+1);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();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backupVault!=null&&message.hasOwnProperty("backupVault")){var error=$root.google.cloud.backupdr.v1beta.BackupVault.verify(message.backupVault,long+1);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};UpdateBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest;if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.backupVault!=null){if(typeof object.backupVault!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.backupVault: object expected");message.backupVault=$root.google.cloud.backupdr.v1beta.BackupVault.fromObject(object.backupVault,long+1)}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};UpdateBackupVaultRequest.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(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.v1beta.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};UpdateBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateBackupVaultRequest"};return UpdateBackupVaultRequest}();v1beta.DeleteBackupVaultRequest=function(){function DeleteBackupVaultRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest;while(reader.pos>>3){case 1:{message.name=reader.string();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();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupVaultRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupVaultRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupVaultRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};DeleteBackupVaultRequest.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}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};DeleteBackupVaultRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupVaultRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteBackupVaultRequest"};return DeleteBackupVaultRequest}();v1beta.ListDataSourcesRequest=function(){function ListDataSourcesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListDataSourcesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourcesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourcesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListDataSourcesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};ListDataSourcesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourcesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourcesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListDataSourcesRequest"};return ListDataSourcesRequest}();v1beta.ListDataSourcesResponse=function(){function ListDataSourcesResponse(properties){this.dataSources=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListDataSourcesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSources&&message.dataSources.length))message.dataSources=[];message.dataSources.push($root.google.cloud.backupdr.v1beta.DataSource.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourcesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourcesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSources!=null&&message.hasOwnProperty("dataSources")){if(!Array.isArray(message.dataSources))return"dataSources: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListDataSourcesResponse;if(object.dataSources){if(!Array.isArray(object.dataSources))throw TypeError(".google.cloud.backupdr.v1beta.ListDataSourcesResponse.dataSources: array expected");message.dataSources=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetDataSourceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetDataSourceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetDataSourceRequest"};return GetDataSourceRequest}();v1beta.UpdateDataSourceRequest=function(){function UpdateDataSourceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateDataSourceRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.dataSource=$root.google.cloud.backupdr.v1beta.DataSource.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}case 4:{message.allowMissing=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};UpdateDataSourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateDataSourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.dataSource!=null&&message.hasOwnProperty("dataSource")){var error=$root.google.cloud.backupdr.v1beta.DataSource.verify(message.dataSource,long+1);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};UpdateDataSourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateDataSourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateDataSourceRequest;if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateDataSourceRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.dataSource!=null){if(typeof object.dataSource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateDataSourceRequest.dataSource: object expected");message.dataSource=$root.google.cloud.backupdr.v1beta.DataSource.fromObject(object.dataSource,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);if(object.allowMissing!=null)message.allowMissing=Boolean(object.allowMissing);return message};UpdateDataSourceRequest.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(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.v1beta.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};UpdateDataSourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateDataSourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateDataSourceRequest"};return UpdateDataSourceRequest}();v1beta.ListBackupsRequest=function(){function ListBackupsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupsRequest;while(reader.pos>>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();break}default:reader.skipType(tag&7,long);break}}return message};ListBackupsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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}return null};ListBackupsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBackupsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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}return message};ListBackupsRequest.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.v1beta.BackupView[message.view]===undefined?message.view:$root.google.cloud.backupdr.v1beta.BackupView[message.view]:message.view;return object};ListBackupsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBackupsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBackupsRequest"};return ListBackupsRequest}();v1beta.ListBackupsResponse=function(){function ListBackupsResponse(properties){this.backups=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBackupsResponse;while(reader.pos>>3){case 1:{if(!(message.backups&&message.backups.length))message.backups=[];message.backups.push($root.google.cloud.backupdr.v1beta.Backup.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListBackupsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBackupsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backups!=null&&message.hasOwnProperty("backups")){if(!Array.isArray(message.backups))return"backups: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBackupsResponse;if(object.backups){if(!Array.isArray(object.backups))throw TypeError(".google.cloud.backupdr.v1beta.ListBackupsResponse.backups: array expected");message.backups=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.view=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GetBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: 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};GetBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetBackupRequest;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_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};GetBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.view=options.enums===String?"BACKUP_VIEW_UNSPECIFIED":0}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.view!=null&&message.hasOwnProperty("view"))object.view=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupView[message.view]===undefined?message.view:$root.google.cloud.backupdr.v1beta.BackupView[message.view]:message.view;return object};GetBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBackupRequest"};return GetBackupRequest}();v1beta.UpdateBackupRequest=function(){function UpdateBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.UpdateBackupRequest;while(reader.pos>>3){case 1:{message.updateMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.backup=$root.google.cloud.backupdr.v1beta.Backup.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UpdateBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UpdateBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.updateMask!=null&&message.hasOwnProperty("updateMask")){var error=$root.google.protobuf.FieldMask.verify(message.updateMask,long+1);if(error)return"updateMask."+error}if(message.backup!=null&&message.hasOwnProperty("backup")){var error=$root.google.cloud.backupdr.v1beta.Backup.verify(message.backup,long+1);if(error)return"backup."+error}if(message.requestId!=null&&message.hasOwnProperty("requestId"))if(!$util.isString(message.requestId))return"requestId: string expected";return null};UpdateBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.UpdateBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.UpdateBackupRequest;if(object.updateMask!=null){if(typeof object.updateMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupRequest.updateMask: object expected");message.updateMask=$root.google.protobuf.FieldMask.fromObject(object.updateMask,long+1)}if(object.backup!=null){if(typeof object.backup!=="object")throw TypeError(".google.cloud.backupdr.v1beta.UpdateBackupRequest.backup: object expected");message.backup=$root.google.cloud.backupdr.v1beta.Backup.fromObject(object.backup,long+1)}if(object.requestId!=null)message.requestId=String(object.requestId);return message};UpdateBackupRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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.v1beta.Backup.toObject(message.backup,options);if(message.requestId!=null&&message.hasOwnProperty("requestId"))object.requestId=message.requestId;return object};UpdateBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.UpdateBackupRequest"};return UpdateBackupRequest}();v1beta.DeleteBackupRequest=function(){function DeleteBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DeleteBackupRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};DeleteBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DeleteBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DeleteBackupRequest;if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);return message};DeleteBackupRequest.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;return object};DeleteBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DeleteBackupRequest"};return DeleteBackupRequest}();v1beta.RestoreBackupRequest=function(){function RestoreBackupRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.RestoreBackupRequest;while(reader.pos>>3){case 3:{message.computeInstanceTargetEnvironment=$root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.diskTargetEnvironment=$root.google.cloud.backupdr.v1beta.DiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.regionDiskTargetEnvironment=$root.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.computeInstanceRestoreProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.diskRestoreProperties=$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.name=reader.string();break}case 2:{message.requestId=reader.string();break}case 8:{message.clearOverridesFieldMask=$root.google.protobuf.FieldMask.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.computeInstanceTargetEnvironment!=null&&message.hasOwnProperty("computeInstanceTargetEnvironment")){properties.targetEnvironment=1;{var error=$root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment,long+1);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.v1beta.DiskTargetEnvironment.verify(message.diskTargetEnvironment,long+1);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.v1beta.RegionDiskTargetEnvironment.verify(message.regionDiskTargetEnvironment,long+1);if(error)return"regionDiskTargetEnvironment."+error}}if(message.computeInstanceRestoreProperties!=null&&message.hasOwnProperty("computeInstanceRestoreProperties")){properties.instanceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties,long+1);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.v1beta.DiskRestoreProperties.verify(message.diskRestoreProperties,long+1);if(error)return"diskRestoreProperties."+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";if(message.clearOverridesFieldMask!=null&&message.hasOwnProperty("clearOverridesFieldMask")){properties._clearOverridesFieldMask=1;{var error=$root.google.protobuf.FieldMask.verify(message.clearOverridesFieldMask,long+1);if(error)return"clearOverridesFieldMask."+error}}return null};RestoreBackupRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.RestoreBackupRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.RestoreBackupRequest;if(object.computeInstanceTargetEnvironment!=null){if(typeof object.computeInstanceTargetEnvironment!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected");message.computeInstanceTargetEnvironment=$root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment,long+1)}if(object.diskTargetEnvironment!=null){if(typeof object.diskTargetEnvironment!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.diskTargetEnvironment: object expected");message.diskTargetEnvironment=$root.google.cloud.backupdr.v1beta.DiskTargetEnvironment.fromObject(object.diskTargetEnvironment,long+1)}if(object.regionDiskTargetEnvironment!=null){if(typeof object.regionDiskTargetEnvironment!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.regionDiskTargetEnvironment: object expected");message.regionDiskTargetEnvironment=$root.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.fromObject(object.regionDiskTargetEnvironment,long+1)}if(object.computeInstanceRestoreProperties!=null){if(typeof object.computeInstanceRestoreProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.computeInstanceRestoreProperties: object expected");message.computeInstanceRestoreProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties,long+1)}if(object.diskRestoreProperties!=null){if(typeof object.diskRestoreProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.diskRestoreProperties: object expected");message.diskRestoreProperties=$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.fromObject(object.diskRestoreProperties,long+1)}if(object.name!=null)message.name=String(object.name);if(object.requestId!=null)message.requestId=String(object.requestId);if(object.clearOverridesFieldMask!=null){if(typeof object.clearOverridesFieldMask!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupRequest.clearOverridesFieldMask: object expected");message.clearOverridesFieldMask=$root.google.protobuf.FieldMask.fromObject(object.clearOverridesFieldMask,long+1)}return message};RestoreBackupRequest.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.v1beta.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment,options);if(options.oneofs)object.targetEnvironment="computeInstanceTargetEnvironment"}if(message.computeInstanceRestoreProperties!=null&&message.hasOwnProperty("computeInstanceRestoreProperties")){object.computeInstanceRestoreProperties=$root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties,options);if(options.oneofs)object.instanceProperties="computeInstanceRestoreProperties"}if(message.diskTargetEnvironment!=null&&message.hasOwnProperty("diskTargetEnvironment")){object.diskTargetEnvironment=$root.google.cloud.backupdr.v1beta.DiskTargetEnvironment.toObject(message.diskTargetEnvironment,options);if(options.oneofs)object.targetEnvironment="diskTargetEnvironment"}if(message.regionDiskTargetEnvironment!=null&&message.hasOwnProperty("regionDiskTargetEnvironment")){object.regionDiskTargetEnvironment=$root.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.toObject(message.regionDiskTargetEnvironment,options);if(options.oneofs)object.targetEnvironment="regionDiskTargetEnvironment"}if(message.diskRestoreProperties!=null&&message.hasOwnProperty("diskRestoreProperties")){object.diskRestoreProperties=$root.google.cloud.backupdr.v1beta.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};RestoreBackupRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.RestoreBackupRequest"};return RestoreBackupRequest}();v1beta.RestoreBackupResponse=function(){function RestoreBackupResponse(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.RestoreBackupResponse;while(reader.pos>>3){case 1:{message.targetResource=$root.google.cloud.backupdr.v1beta.TargetResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RestoreBackupResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreBackupResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.targetResource!=null&&message.hasOwnProperty("targetResource")){var error=$root.google.cloud.backupdr.v1beta.TargetResource.verify(message.targetResource,long+1);if(error)return"targetResource."+error}return null};RestoreBackupResponse.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.RestoreBackupResponse)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.RestoreBackupResponse;if(object.targetResource!=null){if(typeof object.targetResource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.RestoreBackupResponse.targetResource: object expected");message.targetResource=$root.google.cloud.backupdr.v1beta.TargetResource.fromObject(object.targetResource,long+1)}return message};RestoreBackupResponse.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.v1beta.TargetResource.toObject(message.targetResource,options);return object};RestoreBackupResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreBackupResponse.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.RestoreBackupResponse"};return RestoreBackupResponse}();v1beta.TargetResource=function(){function TargetResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.TargetResource;while(reader.pos>>3){case 1:{message.gcpResource=$root.google.cloud.backupdr.v1beta.GcpResource.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};TargetResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TargetResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.gcpResource!=null&&message.hasOwnProperty("gcpResource")){properties.targetResourceInfo=1;{var error=$root.google.cloud.backupdr.v1beta.GcpResource.verify(message.gcpResource,long+1);if(error)return"gcpResource."+error}}return null};TargetResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.TargetResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.TargetResource;if(object.gcpResource!=null){if(typeof object.gcpResource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.TargetResource.gcpResource: object expected");message.gcpResource=$root.google.cloud.backupdr.v1beta.GcpResource.fromObject(object.gcpResource,long+1)}return message};TargetResource.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.gcpResource!=null&&message.hasOwnProperty("gcpResource")){object.gcpResource=$root.google.cloud.backupdr.v1beta.GcpResource.toObject(message.gcpResource,options);if(options.oneofs)object.targetResourceInfo="gcpResource"}return object};TargetResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TargetResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.TargetResource"};return TargetResource}();v1beta.GcpResource=function(){function GcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};GcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};GcpResource.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;return object};GcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GcpResource"};return GcpResource}();v1beta.BackupGcpResource=function(){function BackupGcpResource(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupGcpResource;while(reader.pos>>3){case 1:{message.gcpResourcename=reader.string();break}case 2:{message.location=reader.string();break}case 3:{message.type=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupGcpResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupGcpResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};BackupGcpResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupGcpResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.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};BackupGcpResource.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;return object};BackupGcpResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupGcpResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupGcpResource"};return BackupGcpResource}();v1beta.BackupApplianceBackupProperties=function(){function BackupApplianceBackupProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties;while(reader.pos>>3){case 1:{message.generationId=reader.int32();break}case 2:{message.finalizeTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupApplianceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupApplianceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){properties._generationId=1;if(!$util.isInteger(message.generationId))return"generationId: integer expected"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){properties._finalizeTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.finalizeTime,long+1);if(error)return"finalizeTime."+error}}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){properties._recoveryRangeStartTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime,long+1);if(error)return"recoveryRangeStartTime."+error}}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){properties._recoveryRangeEndTime=1;{var error=$root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime,long+1);if(error)return"recoveryRangeEndTime."+error}}return null};BackupApplianceBackupProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties;if(object.generationId!=null)message.generationId=object.generationId|0;if(object.finalizeTime!=null){if(typeof object.finalizeTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.finalizeTime: object expected");message.finalizeTime=$root.google.protobuf.Timestamp.fromObject(object.finalizeTime,long+1)}if(object.recoveryRangeStartTime!=null){if(typeof object.recoveryRangeStartTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected");message.recoveryRangeStartTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime,long+1)}if(object.recoveryRangeEndTime!=null){if(typeof object.recoveryRangeEndTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected");message.recoveryRangeEndTime=$root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime,long+1)}return message};BackupApplianceBackupProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.generationId!=null&&message.hasOwnProperty("generationId")){object.generationId=message.generationId;if(options.oneofs)object._generationId="generationId"}if(message.finalizeTime!=null&&message.hasOwnProperty("finalizeTime")){object.finalizeTime=$root.google.protobuf.Timestamp.toObject(message.finalizeTime,options);if(options.oneofs)object._finalizeTime="finalizeTime"}if(message.recoveryRangeStartTime!=null&&message.hasOwnProperty("recoveryRangeStartTime")){object.recoveryRangeStartTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime,options);if(options.oneofs)object._recoveryRangeStartTime="recoveryRangeStartTime"}if(message.recoveryRangeEndTime!=null&&message.hasOwnProperty("recoveryRangeEndTime")){object.recoveryRangeEndTime=$root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime,options);if(options.oneofs)object._recoveryRangeEndTime="recoveryRangeEndTime"}return object};BackupApplianceBackupProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupApplianceBackupProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupApplianceBackupProperties"};return BackupApplianceBackupProperties}();v1beta.DiskTargetEnvironment=function(){function DiskTargetEnvironment(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}case 3:{message.useProjectServiceAccount=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";if(message.useProjectServiceAccount!=null&&message.hasOwnProperty("useProjectServiceAccount")){properties._useProjectServiceAccount=1;if(typeof message.useProjectServiceAccount!=="boolean")return"useProjectServiceAccount: boolean expected"}return null};DiskTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DiskTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);if(object.useProjectServiceAccount!=null)message.useProjectServiceAccount=Boolean(object.useProjectServiceAccount);return message};DiskTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;if(message.useProjectServiceAccount!=null&&message.hasOwnProperty("useProjectServiceAccount")){object.useProjectServiceAccount=message.useProjectServiceAccount;if(options.oneofs)object._useProjectServiceAccount="useProjectServiceAccount"}return object};DiskTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DiskTargetEnvironment"};return DiskTargetEnvironment}();v1beta.RegionDiskTargetEnvironment=function(){function RegionDiskTargetEnvironment(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.region=reader.string();break}case 3:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}case 4:{message.useProjectServiceAccount=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};RegionDiskTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RegionDiskTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.region!=null&&message.hasOwnProperty("region"))if(!$util.isString(message.region))return"region: string expected";if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.region!=null)message.region=String(object.region);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DiskRestoreProperties,key,value;while(reader.pos>>3){case 19:{message.instanceBackupSource=$root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.sizeGb=reader.int64();break}case 4:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 5:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1beta.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1beta.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.physicalBlockSizeBytes=reader.int64();break}case 8:{message.provisionedIops=reader.int64();break}case 9:{message.provisionedThroughput=reader.int64();break}case 10:{message.enableConfidentialCompute=reader.bool();break}case 11:{message.storagePool=reader.string();break}case 12:{message.accessMode=reader.int32();break}case 14:{message.architecture=reader.int32();break}case 15:{if(!(message.resourcePolicy&&message.resourcePolicy.length))message.resourcePolicy=[];message.resourcePolicy.push(reader.string());break}case 16:{message.type=reader.string();break}case 17:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 18:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};DiskRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.instanceBackupSource!=null&&message.hasOwnProperty("instanceBackupSource")){properties.sourceOptions=1;{var error=$root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.verify(message.instanceBackupSource,long+1);if(error)return"instanceBackupSource."+error}}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;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.sizeGb!=null&&message.hasOwnProperty("sizeGb")){properties._sizeGb=1;if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DiskRestoreProperties;if(object.instanceBackupSource!=null){if(typeof object.instanceBackupSource!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DiskRestoreProperties.instanceBackupSource: object expected");message.instanceBackupSource=$root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.fromObject(object.instanceBackupSource,long+1)}if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1beta.DiskRestoreProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.physicalBlockSizeBytes.high>>>0).toNumber();if(object.provisionedIops!=null)if($util.Long)(message.provisionedIops=$util.Long.fromValue(object.provisionedIops)).unsigned=false;else if(typeof object.provisionedIops==="string")message.provisionedIops=parseInt(object.provisionedIops,10);else if(typeof object.provisionedIops==="number")message.provisionedIops=object.provisionedIops;else if(typeof object.provisionedIops==="object")message.provisionedIops=new $util.LongBits(object.provisionedIops.low>>>0,object.provisionedIops.high>>>0).toNumber();if(object.provisionedThroughput!=null)if($util.Long)(message.provisionedThroughput=$util.Long.fromValue(object.provisionedThroughput)).unsigned=false;else if(typeof object.provisionedThroughput==="string")message.provisionedThroughput=parseInt(object.provisionedThroughput,10);else if(typeof object.provisionedThroughput==="number")message.provisionedThroughput=object.provisionedThroughput;else if(typeof object.provisionedThroughput==="object")message.provisionedThroughput=new $util.LongBits(object.provisionedThroughput.low>>>0,object.provisionedThroughput.high>>>0).toNumber();if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);if(object.storagePool!=null)message.storagePool=String(object.storagePool);switch(object.accessMode){default:if(typeof object.accessMode==="number"){message.accessMode=object.accessMode;break}break;case"READ_WRITE_SINGLE":case 0:message.accessMode=0;break;case"READ_WRITE_MANY":case 1:message.accessMode=1;break;case"READ_ONLY_MANY":case 2:message.accessMode=2;break}switch(object.architecture){default:if(typeof object.architecture==="number"){message.architecture=object.architecture;break}break;case"ARCHITECTURE_UNSPECIFIED":case 0:message.architecture=0;break;case"X86_64":case 1:message.architecture=1;break;case"ARM64":case 2:message.architecture=2;break}if(object.resourcePolicy){if(!Array.isArray(object.resourcePolicy))throw TypeError(".google.cloud.backupdr.v1beta.DiskRestoreProperties.resourcePolicy: array expected");message.resourcePolicy=[];for(var i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.licenses&&message.licenses.length){object.licenses=[];for(var j=0;j>>0,message.physicalBlockSizeBytes.high>>>0).toNumber():message.physicalBlockSizeBytes;if(options.oneofs)object._physicalBlockSizeBytes="physicalBlockSizeBytes"}if(message.provisionedIops!=null&&message.hasOwnProperty("provisionedIops")){if(typeof message.provisionedIops==="number")object.provisionedIops=options.longs===String?String(message.provisionedIops):message.provisionedIops;else object.provisionedIops=options.longs===String?$util.Long.prototype.toString.call(message.provisionedIops):options.longs===Number?new $util.LongBits(message.provisionedIops.low>>>0,message.provisionedIops.high>>>0).toNumber():message.provisionedIops;if(options.oneofs)object._provisionedIops="provisionedIops"}if(message.provisionedThroughput!=null&&message.hasOwnProperty("provisionedThroughput")){if(typeof message.provisionedThroughput==="number")object.provisionedThroughput=options.longs===String?String(message.provisionedThroughput):message.provisionedThroughput;else object.provisionedThroughput=options.longs===String?$util.Long.prototype.toString.call(message.provisionedThroughput):options.longs===Number?new $util.LongBits(message.provisionedThroughput.low>>>0,message.provisionedThroughput.high>>>0).toNumber():message.provisionedThroughput;if(options.oneofs)object._provisionedThroughput="provisionedThroughput"}if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}if(message.storagePool!=null&&message.hasOwnProperty("storagePool")){object.storagePool=message.storagePool;if(options.oneofs)object._storagePool="storagePool"}if(message.accessMode!=null&&message.hasOwnProperty("accessMode")){object.accessMode=options.enums===String?$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode[message.accessMode]===undefined?message.accessMode:$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode[message.accessMode]:message.accessMode;if(options.oneofs)object._accessMode="accessMode"}if(message.architecture!=null&&message.hasOwnProperty("architecture")){object.architecture=options.enums===String?$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture[message.architecture]===undefined?message.architecture:$root.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture[message.architecture]:message.architecture;if(options.oneofs)object._architecture="architecture"}if(message.resourcePolicy&&message.resourcePolicy.length){object.resourcePolicy=[];for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions;while(reader.pos>>3){case 1:{message.sourceDeviceName=reader.string();break}case 2:{message.bootDisk=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};RestoreDiskFromInstanceOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RestoreDiskFromInstanceOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.sourceDeviceName!=null&&message.hasOwnProperty("sourceDeviceName")){properties.sourceDisk=1;if(!$util.isString(message.sourceDeviceName))return"sourceDeviceName: string expected"}if(message.bootDisk!=null&&message.hasOwnProperty("bootDisk")){if(properties.sourceDisk===1)return"sourceDisk: multiple values";properties.sourceDisk=1;if(typeof message.bootDisk!=="boolean")return"bootDisk: boolean expected"}return null};RestoreDiskFromInstanceOptions.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions;if(object.sourceDeviceName!=null)message.sourceDeviceName=String(object.sourceDeviceName);if(object.bootDisk!=null)message.bootDisk=Boolean(object.bootDisk);return message};RestoreDiskFromInstanceOptions.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.sourceDeviceName!=null&&message.hasOwnProperty("sourceDeviceName")){object.sourceDeviceName=message.sourceDeviceName;if(options.oneofs)object.sourceDisk="sourceDeviceName"}if(message.bootDisk!=null&&message.hasOwnProperty("bootDisk")){object.bootDisk=message.bootDisk;if(options.oneofs)object.sourceDisk="bootDisk"}return object};RestoreDiskFromInstanceOptions.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RestoreDiskFromInstanceOptions.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions"};return RestoreDiskFromInstanceOptions}();v1beta.DiskBackupProperties=function(){function DiskBackupProperties(properties){this.licenses=[];this.guestOsFeature=[];this.replicaZones=[];this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DiskBackupProperties,key,value;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{if(!(message.licenses&&message.licenses.length))message.licenses=[];message.licenses.push(reader.string());break}case 3:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1beta.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.architecture=reader.int32();break}case 5:{message.type=reader.string();break}case 6:{message.sizeGb=reader.int64();break}case 7:{message.region=reader.string();break}case 8:{message.zone=reader.string();break}case 9:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}case 10:{message.sourceDisk=reader.string();break}case 11:{message.accessMode=reader.string();break}case 12:{message.provisionedIops=reader.int64();break}case 13:{message.provisionedThroughput=reader.int64();break}case 14:{message.physicalBlockSizeBytes=reader.int64();break}case 15:{message.enableConfidentialCompute=reader.bool();break}case 16:{message.storagePool=reader.string();break}case 17:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 18:{message.guestFlush=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DiskBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.licenses!=null&&message.hasOwnProperty("licenses")){if(!Array.isArray(message.licenses))return"licenses: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DiskBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.licenses){if(!Array.isArray(object.licenses))throw TypeError(".google.cloud.backupdr.v1beta.DiskBackupProperties.licenses: array expected");message.licenses=[];for(var i=0;i>>0,object.sizeGb.high>>>0).toNumber();if(object.region!=null)message.region=String(object.region);if(object.zone!=null)message.zone=String(object.zone);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1beta.DiskBackupProperties.replicaZones: array expected");message.replicaZones=[];for(var i=0;i>>0,object.provisionedIops.high>>>0).toNumber();if(object.provisionedThroughput!=null)if($util.Long)(message.provisionedThroughput=$util.Long.fromValue(object.provisionedThroughput)).unsigned=false;else if(typeof object.provisionedThroughput==="string")message.provisionedThroughput=parseInt(object.provisionedThroughput,10);else if(typeof object.provisionedThroughput==="number")message.provisionedThroughput=object.provisionedThroughput;else if(typeof object.provisionedThroughput==="object")message.provisionedThroughput=new $util.LongBits(object.provisionedThroughput.low>>>0,object.provisionedThroughput.high>>>0).toNumber();if(object.physicalBlockSizeBytes!=null)if($util.Long)(message.physicalBlockSizeBytes=$util.Long.fromValue(object.physicalBlockSizeBytes)).unsigned=false;else if(typeof object.physicalBlockSizeBytes==="string")message.physicalBlockSizeBytes=parseInt(object.physicalBlockSizeBytes,10);else if(typeof object.physicalBlockSizeBytes==="number")message.physicalBlockSizeBytes=object.physicalBlockSizeBytes;else if(typeof object.physicalBlockSizeBytes==="object")message.physicalBlockSizeBytes=new $util.LongBits(object.physicalBlockSizeBytes.low>>>0,object.physicalBlockSizeBytes.high>>>0).toNumber();if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);if(object.storagePool!=null)message.storagePool=String(object.storagePool);if(object.labels){if(typeof object.labels!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DiskBackupProperties.labels: object expected");message.labels={};for(var keys=Object.keys(object.labels),i=0;i>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;if(options.oneofs)object._sizeGb="sizeGb"}if(message.region!=null&&message.hasOwnProperty("region")){object.region=message.region;if(options.oneofs)object._region="region"}if(message.zone!=null&&message.hasOwnProperty("zone")){object.zone=message.zone;if(options.oneofs)object._zone="zone"}if(message.replicaZones&&message.replicaZones.length){object.replicaZones=[];for(var j=0;j>>0,message.provisionedIops.high>>>0).toNumber():message.provisionedIops;if(options.oneofs)object._provisionedIops="provisionedIops"}if(message.provisionedThroughput!=null&&message.hasOwnProperty("provisionedThroughput")){if(typeof message.provisionedThroughput==="number")object.provisionedThroughput=options.longs===String?String(message.provisionedThroughput):message.provisionedThroughput;else object.provisionedThroughput=options.longs===String?$util.Long.prototype.toString.call(message.provisionedThroughput):options.longs===Number?new $util.LongBits(message.provisionedThroughput.low>>>0,message.provisionedThroughput.high>>>0).toNumber():message.provisionedThroughput;if(options.oneofs)object._provisionedThroughput="provisionedThroughput"}if(message.physicalBlockSizeBytes!=null&&message.hasOwnProperty("physicalBlockSizeBytes")){if(typeof message.physicalBlockSizeBytes==="number")object.physicalBlockSizeBytes=options.longs===String?String(message.physicalBlockSizeBytes):message.physicalBlockSizeBytes;else object.physicalBlockSizeBytes=options.longs===String?$util.Long.prototype.toString.call(message.physicalBlockSizeBytes):options.longs===Number?new $util.LongBits(message.physicalBlockSizeBytes.low>>>0,message.physicalBlockSizeBytes.high>>>0).toNumber():message.physicalBlockSizeBytes;if(options.oneofs)object._physicalBlockSizeBytes="physicalBlockSizeBytes"}if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}if(message.storagePool!=null&&message.hasOwnProperty("storagePool")){object.storagePool=message.storagePool;if(options.oneofs)object._storagePool="storagePool"}var keys2;if(message.labels&&(keys2=Object.keys(message.labels)).length){object.labels={};for(var j=0;j$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DiskDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.type=reader.string();break}case 4:{message.sizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DiskDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DiskDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(!$util.isInteger(message.sizeGb)&&!(message.sizeGb&&$util.isInteger(message.sizeGb.low)&&$util.isInteger(message.sizeGb.high)))return"sizeGb: integer|Long expected";return null};DiskDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DiskDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DiskDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.type!=null)message.type=String(object.type);if(object.sizeGb!=null)if($util.Long)(message.sizeGb=$util.Long.fromValue(object.sizeGb)).unsigned=false;else if(typeof object.sizeGb==="string")message.sizeGb=parseInt(object.sizeGb,10);else if(typeof object.sizeGb==="number")message.sizeGb=object.sizeGb;else if(typeof object.sizeGb==="object")message.sizeGb=new $util.LongBits(object.sizeGb.low>>>0,object.sizeGb.high>>>0).toNumber();return message};DiskDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.type="";if($util.Long){var long=new $util.Long(0,0,false);object.sizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.sizeGb=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(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.sizeGb!=null&&message.hasOwnProperty("sizeGb"))if(typeof message.sizeGb==="number")object.sizeGb=options.longs===String?String(message.sizeGb):message.sizeGb;else object.sizeGb=options.longs===String?$util.Long.prototype.toString.call(message.sizeGb):options.longs===Number?new $util.LongBits(message.sizeGb.low>>>0,message.sizeGb.high>>>0).toNumber():message.sizeGb;return object};DiskDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DiskDataSourceProperties"};return DiskDataSourceProperties}();v1beta.KeyRevocationActionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="NONE"]=1;values[valuesById[2]="STOP"]=2;return values}();v1beta.ComputeInstanceBackupProperties=function(){function ComputeInstanceBackupProperties(properties){this.networkInterface=[];this.disk=[];this.serviceAccount=[];this.guestAccelerator=[];this.labels={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties,key,value;while(reader.pos>>3){case 1:{message.description=reader.string();break}case 2:{message.tags=$root.google.cloud.backupdr.v1beta.Tags.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.machineType=reader.string();break}case 4:{message.canIpForward=reader.bool();break}case 5:{if(!(message.networkInterface&&message.networkInterface.length))message.networkInterface=[];message.networkInterface.push($root.google.cloud.backupdr.v1beta.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{if(!(message.disk&&message.disk.length))message.disk=[];message.disk.push($root.google.cloud.backupdr.v1beta.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.metadata=$root.google.cloud.backupdr.v1beta.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{if(!(message.serviceAccount&&message.serviceAccount.length))message.serviceAccount=[];message.serviceAccount.push($root.google.cloud.backupdr.v1beta.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{message.scheduling=$root.google.cloud.backupdr.v1beta.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 10:{if(!(message.guestAccelerator&&message.guestAccelerator.length))message.guestAccelerator=[];message.guestAccelerator.push($root.google.cloud.backupdr.v1beta.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 11:{message.minCpuPlatform=reader.string();break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{message.sourceInstance=reader.string();break}case 14:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 15:{message.guestFlush=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceBackupProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceBackupProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.tags!=null&&message.hasOwnProperty("tags")){properties._tags=1;{var error=$root.google.cloud.backupdr.v1beta.Tags.verify(message.tags,long+1);if(error)return"tags."+error}}if(message.machineType!=null&&message.hasOwnProperty("machineType")){properties._machineType=1;if(!$util.isString(message.machineType))return"machineType: string expected"}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.networkInterface!=null&&message.hasOwnProperty("networkInterface")){if(!Array.isArray(message.networkInterface))return"networkInterface: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties;if(object.description!=null)message.description=String(object.description);if(object.tags!=null){if(typeof object.tags!=="object")throw TypeError(".google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.tags: object expected");message.tags=$root.google.cloud.backupdr.v1beta.Tags.fromObject(object.tags,long+1)}if(object.machineType!=null)message.machineType=String(object.machineType);if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.networkInterface){if(!Array.isArray(object.networkInterface))throw TypeError(".google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.networkInterface: array expected");message.networkInterface=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.advancedMachineFeatures=$root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.canIpForward=reader.bool();break}case 4:{message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.deletionProtection=reader.bool();break}case 6:{message.description=reader.string();break}case 7:{if(!(message.disks&&message.disks.length))message.disks=[];message.disks.push($root.google.cloud.backupdr.v1beta.AttachedDisk.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.displayDevice=$root.google.cloud.backupdr.v1beta.DisplayDevice.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{if(!(message.guestAccelerators&&message.guestAccelerators.length))message.guestAccelerators=[];message.guestAccelerators.push($root.google.cloud.backupdr.v1beta.AcceleratorConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.hostname=reader.string();break}case 11:{message.instanceEncryptionKey=$root.google.cloud.backupdr.v1beta.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 12:{message.keyRevocationActionType=reader.int32();break}case 13:{if(message.labels===$util.emptyObject)message.labels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.labels,key);message.labels[key]=value;break}case 14:{message.machineType=reader.string();break}case 15:{message.metadata=$root.google.cloud.backupdr.v1beta.Metadata.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.minCpuPlatform=reader.string();break}case 17:{if(!(message.networkInterfaces&&message.networkInterfaces.length))message.networkInterfaces=[];message.networkInterfaces.push($root.google.cloud.backupdr.v1beta.NetworkInterface.decode(reader,reader.uint32(),undefined,long+1));break}case 18:{message.networkPerformanceConfig=$root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 19:{message.params=$root.google.cloud.backupdr.v1beta.InstanceParams.decode(reader,reader.uint32(),undefined,long+1);break}case 20:{message.privateIpv6GoogleAccess=reader.int32();break}case 21:{message.allocationAffinity=$root.google.cloud.backupdr.v1beta.AllocationAffinity.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{if(!(message.resourcePolicies&&message.resourcePolicies.length))message.resourcePolicies=[];message.resourcePolicies.push(reader.string());break}case 23:{message.scheduling=$root.google.cloud.backupdr.v1beta.Scheduling.decode(reader,reader.uint32(),undefined,long+1);break}case 24:{if(!(message.serviceAccounts&&message.serviceAccounts.length))message.serviceAccounts=[];message.serviceAccounts.push($root.google.cloud.backupdr.v1beta.ServiceAccount.decode(reader,reader.uint32(),undefined,long+1));break}case 26:{message.tags=$root.google.cloud.backupdr.v1beta.Tags.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceRestoreProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceRestoreProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.advancedMachineFeatures!=null&&message.hasOwnProperty("advancedMachineFeatures")){properties._advancedMachineFeatures=1;{var error=$root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.verify(message.advancedMachineFeatures,long+1);if(error)return"advancedMachineFeatures."+error}}if(message.canIpForward!=null&&message.hasOwnProperty("canIpForward")){properties._canIpForward=1;if(typeof message.canIpForward!=="boolean")return"canIpForward: boolean expected"}if(message.confidentialInstanceConfig!=null&&message.hasOwnProperty("confidentialInstanceConfig")){properties._confidentialInstanceConfig=1;{var error=$root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig,long+1);if(error)return"confidentialInstanceConfig."+error}}if(message.deletionProtection!=null&&message.hasOwnProperty("deletionProtection")){properties._deletionProtection=1;if(typeof message.deletionProtection!=="boolean")return"deletionProtection: boolean expected"}if(message.description!=null&&message.hasOwnProperty("description")){properties._description=1;if(!$util.isString(message.description))return"description: string expected"}if(message.disks!=null&&message.hasOwnProperty("disks")){if(!Array.isArray(message.disks))return"disks: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties;if(object.name!=null)message.name=String(object.name);if(object.advancedMachineFeatures!=null){if(typeof object.advancedMachineFeatures!=="object")throw TypeError(".google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected");message.advancedMachineFeatures=$root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures,long+1)}if(object.canIpForward!=null)message.canIpForward=Boolean(object.canIpForward);if(object.confidentialInstanceConfig!=null){if(typeof object.confidentialInstanceConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected");message.confidentialInstanceConfig=$root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig,long+1)}if(object.deletionProtection!=null)message.deletionProtection=Boolean(object.deletionProtection);if(object.description!=null)message.description=String(object.description);if(object.disks){if(!Array.isArray(object.disks))throw TypeError(".google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.disks: array expected");message.disks=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment;while(reader.pos>>3){case 1:{message.project=reader.string();break}case 2:{message.zone=reader.string();break}case 3:{message.useProjectServiceAccount=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceTargetEnvironment.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceTargetEnvironment.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.project!=null&&message.hasOwnProperty("project"))if(!$util.isString(message.project))return"project: string expected";if(message.zone!=null&&message.hasOwnProperty("zone"))if(!$util.isString(message.zone))return"zone: string expected";if(message.useProjectServiceAccount!=null&&message.hasOwnProperty("useProjectServiceAccount")){properties._useProjectServiceAccount=1;if(typeof message.useProjectServiceAccount!=="boolean")return"useProjectServiceAccount: boolean expected"}return null};ComputeInstanceTargetEnvironment.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment;if(object.project!=null)message.project=String(object.project);if(object.zone!=null)message.zone=String(object.zone);if(object.useProjectServiceAccount!=null)message.useProjectServiceAccount=Boolean(object.useProjectServiceAccount);return message};ComputeInstanceTargetEnvironment.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.project="";object.zone=""}if(message.project!=null&&message.hasOwnProperty("project"))object.project=message.project;if(message.zone!=null&&message.hasOwnProperty("zone"))object.zone=message.zone;if(message.useProjectServiceAccount!=null&&message.hasOwnProperty("useProjectServiceAccount")){object.useProjectServiceAccount=message.useProjectServiceAccount;if(options.oneofs)object._useProjectServiceAccount="useProjectServiceAccount"}return object};ComputeInstanceTargetEnvironment.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceTargetEnvironment.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment"};return ComputeInstanceTargetEnvironment}();v1beta.ComputeInstanceDataSourceProperties=function(){function ComputeInstanceDataSourceProperties(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.description=reader.string();break}case 3:{message.machineType=reader.string();break}case 4:{message.totalDiskCount=reader.int64();break}case 5:{message.totalDiskSizeGb=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};ComputeInstanceDataSourceProperties.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ComputeInstanceDataSourceProperties.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.description!=null&&message.hasOwnProperty("description"))if(!$util.isString(message.description))return"description: string expected";if(message.machineType!=null&&message.hasOwnProperty("machineType"))if(!$util.isString(message.machineType))return"machineType: string expected";if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(!$util.isInteger(message.totalDiskCount)&&!(message.totalDiskCount&&$util.isInteger(message.totalDiskCount.low)&&$util.isInteger(message.totalDiskCount.high)))return"totalDiskCount: integer|Long expected";if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(!$util.isInteger(message.totalDiskSizeGb)&&!(message.totalDiskSizeGb&&$util.isInteger(message.totalDiskSizeGb.low)&&$util.isInteger(message.totalDiskSizeGb.high)))return"totalDiskSizeGb: integer|Long expected";return null};ComputeInstanceDataSourceProperties.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties;if(object.name!=null)message.name=String(object.name);if(object.description!=null)message.description=String(object.description);if(object.machineType!=null)message.machineType=String(object.machineType);if(object.totalDiskCount!=null)if($util.Long)(message.totalDiskCount=$util.Long.fromValue(object.totalDiskCount)).unsigned=false;else if(typeof object.totalDiskCount==="string")message.totalDiskCount=parseInt(object.totalDiskCount,10);else if(typeof object.totalDiskCount==="number")message.totalDiskCount=object.totalDiskCount;else if(typeof object.totalDiskCount==="object")message.totalDiskCount=new $util.LongBits(object.totalDiskCount.low>>>0,object.totalDiskCount.high>>>0).toNumber();if(object.totalDiskSizeGb!=null)if($util.Long)(message.totalDiskSizeGb=$util.Long.fromValue(object.totalDiskSizeGb)).unsigned=false;else if(typeof object.totalDiskSizeGb==="string")message.totalDiskSizeGb=parseInt(object.totalDiskSizeGb,10);else if(typeof object.totalDiskSizeGb==="number")message.totalDiskSizeGb=object.totalDiskSizeGb;else if(typeof object.totalDiskSizeGb==="object")message.totalDiskSizeGb=new $util.LongBits(object.totalDiskSizeGb.low>>>0,object.totalDiskSizeGb.high>>>0).toNumber();return message};ComputeInstanceDataSourceProperties.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.description="";object.machineType="";if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskCount=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.totalDiskSizeGb=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.totalDiskSizeGb=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(message.machineType!=null&&message.hasOwnProperty("machineType"))object.machineType=message.machineType;if(message.totalDiskCount!=null&&message.hasOwnProperty("totalDiskCount"))if(typeof message.totalDiskCount==="number")object.totalDiskCount=options.longs===String?String(message.totalDiskCount):message.totalDiskCount;else object.totalDiskCount=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskCount):options.longs===Number?new $util.LongBits(message.totalDiskCount.low>>>0,message.totalDiskCount.high>>>0).toNumber():message.totalDiskCount;if(message.totalDiskSizeGb!=null&&message.hasOwnProperty("totalDiskSizeGb"))if(typeof message.totalDiskSizeGb==="number")object.totalDiskSizeGb=options.longs===String?String(message.totalDiskSizeGb):message.totalDiskSizeGb;else object.totalDiskSizeGb=options.longs===String?$util.Long.prototype.toString.call(message.totalDiskSizeGb):options.longs===Number?new $util.LongBits(message.totalDiskSizeGb.low>>>0,message.totalDiskSizeGb.high>>>0).toNumber():message.totalDiskSizeGb;return object};ComputeInstanceDataSourceProperties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ComputeInstanceDataSourceProperties.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties"};return ComputeInstanceDataSourceProperties}();v1beta.AdvancedMachineFeatures=function(){function AdvancedMachineFeatures(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures;while(reader.pos>>3){case 1:{message.enableNestedVirtualization=reader.bool();break}case 2:{message.threadsPerCore=reader.int32();break}case 3:{message.visibleCoreCount=reader.int32();break}case 4:{message.enableUefiNetworking=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};AdvancedMachineFeatures.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AdvancedMachineFeatures.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){properties._enableNestedVirtualization=1;if(typeof message.enableNestedVirtualization!=="boolean")return"enableNestedVirtualization: boolean expected"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){properties._threadsPerCore=1;if(!$util.isInteger(message.threadsPerCore))return"threadsPerCore: integer expected"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){properties._visibleCoreCount=1;if(!$util.isInteger(message.visibleCoreCount))return"visibleCoreCount: integer expected"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){properties._enableUefiNetworking=1;if(typeof message.enableUefiNetworking!=="boolean")return"enableUefiNetworking: boolean expected"}return null};AdvancedMachineFeatures.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AdvancedMachineFeatures;if(object.enableNestedVirtualization!=null)message.enableNestedVirtualization=Boolean(object.enableNestedVirtualization);if(object.threadsPerCore!=null)message.threadsPerCore=object.threadsPerCore|0;if(object.visibleCoreCount!=null)message.visibleCoreCount=object.visibleCoreCount|0;if(object.enableUefiNetworking!=null)message.enableUefiNetworking=Boolean(object.enableUefiNetworking);return message};AdvancedMachineFeatures.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableNestedVirtualization!=null&&message.hasOwnProperty("enableNestedVirtualization")){object.enableNestedVirtualization=message.enableNestedVirtualization;if(options.oneofs)object._enableNestedVirtualization="enableNestedVirtualization"}if(message.threadsPerCore!=null&&message.hasOwnProperty("threadsPerCore")){object.threadsPerCore=message.threadsPerCore;if(options.oneofs)object._threadsPerCore="threadsPerCore"}if(message.visibleCoreCount!=null&&message.hasOwnProperty("visibleCoreCount")){object.visibleCoreCount=message.visibleCoreCount;if(options.oneofs)object._visibleCoreCount="visibleCoreCount"}if(message.enableUefiNetworking!=null&&message.hasOwnProperty("enableUefiNetworking")){object.enableUefiNetworking=message.enableUefiNetworking;if(options.oneofs)object._enableUefiNetworking="enableUefiNetworking"}return object};AdvancedMachineFeatures.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AdvancedMachineFeatures.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AdvancedMachineFeatures"};return AdvancedMachineFeatures}();v1beta.ConfidentialInstanceConfig=function(){function ConfidentialInstanceConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig;while(reader.pos>>3){case 1:{message.enableConfidentialCompute=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ConfidentialInstanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ConfidentialInstanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){properties._enableConfidentialCompute=1;if(typeof message.enableConfidentialCompute!=="boolean")return"enableConfidentialCompute: boolean expected"}return null};ConfidentialInstanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig;if(object.enableConfidentialCompute!=null)message.enableConfidentialCompute=Boolean(object.enableConfidentialCompute);return message};ConfidentialInstanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableConfidentialCompute!=null&&message.hasOwnProperty("enableConfidentialCompute")){object.enableConfidentialCompute=message.enableConfidentialCompute;if(options.oneofs)object._enableConfidentialCompute="enableConfidentialCompute"}return object};ConfidentialInstanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ConfidentialInstanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ConfidentialInstanceConfig"};return ConfidentialInstanceConfig}();v1beta.DisplayDevice=function(){function DisplayDevice(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DisplayDevice;while(reader.pos>>3){case 1:{message.enableDisplay=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};DisplayDevice.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DisplayDevice.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){properties._enableDisplay=1;if(typeof message.enableDisplay!=="boolean")return"enableDisplay: boolean expected"}return null};DisplayDevice.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DisplayDevice)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DisplayDevice;if(object.enableDisplay!=null)message.enableDisplay=Boolean(object.enableDisplay);return message};DisplayDevice.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.enableDisplay!=null&&message.hasOwnProperty("enableDisplay")){object.enableDisplay=message.enableDisplay;if(options.oneofs)object._enableDisplay="enableDisplay"}return object};DisplayDevice.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DisplayDevice.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DisplayDevice"};return DisplayDevice}();v1beta.NetworkPerformanceConfig=function(){function NetworkPerformanceConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig;while(reader.pos>>3){case 1:{message.totalEgressBandwidthTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};NetworkPerformanceConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkPerformanceConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){properties._totalEgressBandwidthTier=1;switch(message.totalEgressBandwidthTier){default:return"totalEgressBandwidthTier: enum value expected";case 0:case 1:case 2:break}}return null};NetworkPerformanceConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig;switch(object.totalEgressBandwidthTier){default:if(typeof object.totalEgressBandwidthTier==="number"){message.totalEgressBandwidthTier=object.totalEgressBandwidthTier;break}break;case"TIER_UNSPECIFIED":case 0:message.totalEgressBandwidthTier=0;break;case"DEFAULT":case 1:message.totalEgressBandwidthTier=1;break;case"TIER_1":case 2:message.totalEgressBandwidthTier=2;break}return message};NetworkPerformanceConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.totalEgressBandwidthTier!=null&&message.hasOwnProperty("totalEgressBandwidthTier")){object.totalEgressBandwidthTier=options.enums===String?$root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]===undefined?message.totalEgressBandwidthTier:$root.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier]:message.totalEgressBandwidthTier;if(options.oneofs)object._totalEgressBandwidthTier="totalEgressBandwidthTier"}return object};NetworkPerformanceConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NetworkPerformanceConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.NetworkPerformanceConfig"};NetworkPerformanceConfig.Tier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TIER_UNSPECIFIED"]=0;values[valuesById[1]="DEFAULT"]=1;values[valuesById[2]="TIER_1"]=2;return values}();return NetworkPerformanceConfig}();v1beta.InstanceParams=function(){function InstanceParams(properties){this.resourceManagerTags={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.InstanceParams,key,value;while(reader.pos>>3){case 1:{if(message.resourceManagerTags===$util.emptyObject)message.resourceManagerTags={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.resourceManagerTags,key);message.resourceManagerTags[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};InstanceParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InstanceParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceManagerTags!=null&&message.hasOwnProperty("resourceManagerTags")){if(!$util.isObject(message.resourceManagerTags))return"resourceManagerTags: object expected";var key=Object.keys(message.resourceManagerTags);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.InstanceParams;if(object.resourceManagerTags){if(typeof object.resourceManagerTags!=="object")throw TypeError(".google.cloud.backupdr.v1beta.InstanceParams.resourceManagerTags: object expected");message.resourceManagerTags={};for(var keys=Object.keys(object.resourceManagerTags),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GuestOsFeature;while(reader.pos>>3){case 1:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};GuestOsFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GuestOsFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:break}}return null};GuestOsFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GuestOsFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GuestOsFeature;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"FEATURE_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"VIRTIO_SCSI_MULTIQUEUE":case 1:message.type=1;break;case"WINDOWS":case 2:message.type=2;break;case"MULTI_IP_SUBNET":case 3:message.type=3;break;case"UEFI_COMPATIBLE":case 4:message.type=4;break;case"SECURE_BOOT":case 5:message.type=5;break;case"GVNIC":case 6:message.type=6;break;case"SEV_CAPABLE":case 7:message.type=7;break;case"BARE_METAL_LINUX_COMPATIBLE":case 8:message.type=8;break;case"SUSPEND_RESUME_COMPATIBLE":case 9:message.type=9;break;case"SEV_LIVE_MIGRATABLE":case 10:message.type=10;break;case"SEV_SNP_CAPABLE":case 11:message.type=11;break;case"TDX_CAPABLE":case 12:message.type=12;break;case"IDPF":case 13:message.type=13;break;case"SEV_LIVE_MIGRATABLE_V2":case 14:message.type=14;break}return message};GuestOsFeature.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};GuestOsFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GuestOsFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GuestOsFeature"};GuestOsFeature.FeatureType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FEATURE_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="VIRTIO_SCSI_MULTIQUEUE"]=1;values[valuesById[2]="WINDOWS"]=2;values[valuesById[3]="MULTI_IP_SUBNET"]=3;values[valuesById[4]="UEFI_COMPATIBLE"]=4;values[valuesById[5]="SECURE_BOOT"]=5;values[valuesById[6]="GVNIC"]=6;values[valuesById[7]="SEV_CAPABLE"]=7;values[valuesById[8]="BARE_METAL_LINUX_COMPATIBLE"]=8;values[valuesById[9]="SUSPEND_RESUME_COMPATIBLE"]=9;values[valuesById[10]="SEV_LIVE_MIGRATABLE"]=10;values[valuesById[11]="SEV_SNP_CAPABLE"]=11;values[valuesById[12]="TDX_CAPABLE"]=12;values[valuesById[13]="IDPF"]=13;values[valuesById[14]="SEV_LIVE_MIGRATABLE_V2"]=14;return values}();return GuestOsFeature}();v1beta.AllocationAffinity=function(){function AllocationAffinity(properties){this.values=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AllocationAffinity;while(reader.pos>>3){case 1:{message.consumeAllocationType=reader.int32();break}case 2:{message.key=reader.string();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};AllocationAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AllocationAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.consumeAllocationType!=null&&message.hasOwnProperty("consumeAllocationType")){properties._consumeAllocationType=1;switch(message.consumeAllocationType){default:return"consumeAllocationType: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AllocationAffinity;switch(object.consumeAllocationType){default:if(typeof object.consumeAllocationType==="number"){message.consumeAllocationType=object.consumeAllocationType;break}break;case"TYPE_UNSPECIFIED":case 0:message.consumeAllocationType=0;break;case"NO_RESERVATION":case 1:message.consumeAllocationType=1;break;case"ANY_RESERVATION":case 2:message.consumeAllocationType=2;break;case"SPECIFIC_RESERVATION":case 3:message.consumeAllocationType=3;break}if(object.key!=null)message.key=String(object.key);if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1beta.AllocationAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AcceleratorConfig;while(reader.pos>>3){case 1:{message.acceleratorType=reader.string();break}case 2:{message.acceleratorCount=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AcceleratorConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AcceleratorConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){properties._acceleratorType=1;if(!$util.isString(message.acceleratorType))return"acceleratorType: string expected"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){properties._acceleratorCount=1;if(!$util.isInteger(message.acceleratorCount))return"acceleratorCount: integer expected"}return null};AcceleratorConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AcceleratorConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AcceleratorConfig;if(object.acceleratorType!=null)message.acceleratorType=String(object.acceleratorType);if(object.acceleratorCount!=null)message.acceleratorCount=object.acceleratorCount|0;return message};AcceleratorConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.acceleratorType!=null&&message.hasOwnProperty("acceleratorType")){object.acceleratorType=message.acceleratorType;if(options.oneofs)object._acceleratorType="acceleratorType"}if(message.acceleratorCount!=null&&message.hasOwnProperty("acceleratorCount")){object.acceleratorCount=message.acceleratorCount;if(options.oneofs)object._acceleratorCount="acceleratorCount"}return object};AcceleratorConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcceleratorConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AcceleratorConfig"};return AcceleratorConfig}();v1beta.CustomerEncryptionKey=function(){function CustomerEncryptionKey(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.CustomerEncryptionKey;while(reader.pos>>3){case 1:{message.rawKey=reader.string();break}case 2:{message.rsaEncryptedKey=reader.string();break}case 3:{message.kmsKeyName=reader.string();break}case 4:{message.kmsKeyServiceAccount=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CustomerEncryptionKey.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CustomerEncryptionKey.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){properties.key=1;if(!$util.isString(message.rawKey))return"rawKey: string expected"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.rsaEncryptedKey))return"rsaEncryptedKey: string expected"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){if(properties.key===1)return"key: multiple values";properties.key=1;if(!$util.isString(message.kmsKeyName))return"kmsKeyName: string expected"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){properties._kmsKeyServiceAccount=1;if(!$util.isString(message.kmsKeyServiceAccount))return"kmsKeyServiceAccount: string expected"}return null};CustomerEncryptionKey.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.CustomerEncryptionKey)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.CustomerEncryptionKey;if(object.rawKey!=null)message.rawKey=String(object.rawKey);if(object.rsaEncryptedKey!=null)message.rsaEncryptedKey=String(object.rsaEncryptedKey);if(object.kmsKeyName!=null)message.kmsKeyName=String(object.kmsKeyName);if(object.kmsKeyServiceAccount!=null)message.kmsKeyServiceAccount=String(object.kmsKeyServiceAccount);return message};CustomerEncryptionKey.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.rawKey!=null&&message.hasOwnProperty("rawKey")){object.rawKey=message.rawKey;if(options.oneofs)object.key="rawKey"}if(message.rsaEncryptedKey!=null&&message.hasOwnProperty("rsaEncryptedKey")){object.rsaEncryptedKey=message.rsaEncryptedKey;if(options.oneofs)object.key="rsaEncryptedKey"}if(message.kmsKeyName!=null&&message.hasOwnProperty("kmsKeyName")){object.kmsKeyName=message.kmsKeyName;if(options.oneofs)object.key="kmsKeyName"}if(message.kmsKeyServiceAccount!=null&&message.hasOwnProperty("kmsKeyServiceAccount")){object.kmsKeyServiceAccount=message.kmsKeyServiceAccount;if(options.oneofs)object._kmsKeyServiceAccount="kmsKeyServiceAccount"}return object};CustomerEncryptionKey.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CustomerEncryptionKey.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.CustomerEncryptionKey"};return CustomerEncryptionKey}();v1beta.Entry=function(){function Entry(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Entry;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};Entry.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Entry.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.value!=null&&message.hasOwnProperty("value")){properties._value=1;if(!$util.isString(message.value))return"value: string expected"}return null};Entry.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.Entry)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Entry;if(object.key!=null)message.key=String(object.key);if(object.value!=null)message.value=String(object.value);return message};Entry.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.key!=null&&message.hasOwnProperty("key")){object.key=message.key;if(options.oneofs)object._key="key"}if(message.value!=null&&message.hasOwnProperty("value")){object.value=message.value;if(options.oneofs)object._value="value"}return object};Entry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Entry.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.Entry"};return Entry}();v1beta.Metadata=function(){function Metadata(properties){this.items=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Metadata;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push($root.google.cloud.backupdr.v1beta.Entry.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Metadata.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Metadata.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Metadata;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1beta.Metadata.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.NetworkInterface;while(reader.pos>>3){case 1:{message.network=reader.string();break}case 2:{message.subnetwork=reader.string();break}case 3:{message.ipAddress=reader.string();break}case 4:{message.ipv6Address=reader.string();break}case 5:{message.internalIpv6PrefixLength=reader.int32();break}case 6:{message.name=reader.string();break}case 7:{if(!(message.accessConfigs&&message.accessConfigs.length))message.accessConfigs=[];message.accessConfigs.push($root.google.cloud.backupdr.v1beta.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{if(!(message.ipv6AccessConfigs&&message.ipv6AccessConfigs.length))message.ipv6AccessConfigs=[];message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1beta.AccessConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 9:{if(!(message.aliasIpRanges&&message.aliasIpRanges.length))message.aliasIpRanges=[];message.aliasIpRanges.push($root.google.cloud.backupdr.v1beta.AliasIpRange.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{message.stackType=reader.int32();break}case 11:{message.ipv6AccessType=reader.int32();break}case 12:{message.queueCount=reader.int32();break}case 13:{message.nicType=reader.int32();break}case 14:{message.networkAttachment=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};NetworkInterface.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NetworkInterface.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.network!=null&&message.hasOwnProperty("network")){properties._network=1;if(!$util.isString(message.network))return"network: string expected"}if(message.subnetwork!=null&&message.hasOwnProperty("subnetwork")){properties._subnetwork=1;if(!$util.isString(message.subnetwork))return"subnetwork: string expected"}if(message.ipAddress!=null&&message.hasOwnProperty("ipAddress")){properties._ipAddress=1;if(!$util.isString(message.ipAddress))return"ipAddress: string expected"}if(message.ipv6Address!=null&&message.hasOwnProperty("ipv6Address")){properties._ipv6Address=1;if(!$util.isString(message.ipv6Address))return"ipv6Address: string expected"}if(message.internalIpv6PrefixLength!=null&&message.hasOwnProperty("internalIpv6PrefixLength")){properties._internalIpv6PrefixLength=1;if(!$util.isInteger(message.internalIpv6PrefixLength))return"internalIpv6PrefixLength: integer expected"}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.accessConfigs!=null&&message.hasOwnProperty("accessConfigs")){if(!Array.isArray(message.accessConfigs))return"accessConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.NetworkInterface;if(object.network!=null)message.network=String(object.network);if(object.subnetwork!=null)message.subnetwork=String(object.subnetwork);if(object.ipAddress!=null)message.ipAddress=String(object.ipAddress);if(object.ipv6Address!=null)message.ipv6Address=String(object.ipv6Address);if(object.internalIpv6PrefixLength!=null)message.internalIpv6PrefixLength=object.internalIpv6PrefixLength|0;if(object.name!=null)message.name=String(object.name);if(object.accessConfigs){if(!Array.isArray(object.accessConfigs))throw TypeError(".google.cloud.backupdr.v1beta.NetworkInterface.accessConfigs: array expected");message.accessConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AccessConfig;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.name=reader.string();break}case 3:{message.externalIp=reader.string();break}case 4:{message.externalIpv6=reader.string();break}case 5:{message.externalIpv6PrefixLength=reader.int32();break}case 6:{message.setPublicPtr=reader.bool();break}case 7:{message.publicPtrDomainName=reader.string();break}case 8:{message.networkTier=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AccessConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AccessConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.type!=null&&message.hasOwnProperty("type")){properties._type=1;switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:break}}if(message.name!=null&&message.hasOwnProperty("name")){properties._name=1;if(!$util.isString(message.name))return"name: string expected"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){properties._externalIp=1;if(!$util.isString(message.externalIp))return"externalIp: string expected"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){properties._externalIpv6=1;if(!$util.isString(message.externalIpv6))return"externalIpv6: string expected"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){properties._externalIpv6PrefixLength=1;if(!$util.isInteger(message.externalIpv6PrefixLength))return"externalIpv6PrefixLength: integer expected"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){properties._setPublicPtr=1;if(typeof message.setPublicPtr!=="boolean")return"setPublicPtr: boolean expected"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){properties._publicPtrDomainName=1;if(!$util.isString(message.publicPtrDomainName))return"publicPtrDomainName: string expected"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){properties._networkTier=1;switch(message.networkTier){default:return"networkTier: enum value expected";case 0:case 1:case 2:break}}return null};AccessConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AccessConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AccessConfig;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"ACCESS_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ONE_TO_ONE_NAT":case 1:message.type=1;break;case"DIRECT_IPV6":case 2:message.type=2;break}if(object.name!=null)message.name=String(object.name);if(object.externalIp!=null)message.externalIp=String(object.externalIp);if(object.externalIpv6!=null)message.externalIpv6=String(object.externalIpv6);if(object.externalIpv6PrefixLength!=null)message.externalIpv6PrefixLength=object.externalIpv6PrefixLength|0;if(object.setPublicPtr!=null)message.setPublicPtr=Boolean(object.setPublicPtr);if(object.publicPtrDomainName!=null)message.publicPtrDomainName=String(object.publicPtrDomainName);switch(object.networkTier){default:if(typeof object.networkTier==="number"){message.networkTier=object.networkTier;break}break;case"NETWORK_TIER_UNSPECIFIED":case 0:message.networkTier=0;break;case"PREMIUM":case 1:message.networkTier=1;break;case"STANDARD":case 2:message.networkTier=2;break}return message};AccessConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1beta.AccessConfig.AccessType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1beta.AccessConfig.AccessType[message.type]:message.type;if(options.oneofs)object._type="type"}if(message.name!=null&&message.hasOwnProperty("name")){object.name=message.name;if(options.oneofs)object._name="name"}if(message.externalIp!=null&&message.hasOwnProperty("externalIp")){object.externalIp=message.externalIp;if(options.oneofs)object._externalIp="externalIp"}if(message.externalIpv6!=null&&message.hasOwnProperty("externalIpv6")){object.externalIpv6=message.externalIpv6;if(options.oneofs)object._externalIpv6="externalIpv6"}if(message.externalIpv6PrefixLength!=null&&message.hasOwnProperty("externalIpv6PrefixLength")){object.externalIpv6PrefixLength=message.externalIpv6PrefixLength;if(options.oneofs)object._externalIpv6PrefixLength="externalIpv6PrefixLength"}if(message.setPublicPtr!=null&&message.hasOwnProperty("setPublicPtr")){object.setPublicPtr=message.setPublicPtr;if(options.oneofs)object._setPublicPtr="setPublicPtr"}if(message.publicPtrDomainName!=null&&message.hasOwnProperty("publicPtrDomainName")){object.publicPtrDomainName=message.publicPtrDomainName;if(options.oneofs)object._publicPtrDomainName="publicPtrDomainName"}if(message.networkTier!=null&&message.hasOwnProperty("networkTier")){object.networkTier=options.enums===String?$root.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier[message.networkTier]===undefined?message.networkTier:$root.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier[message.networkTier]:message.networkTier;if(options.oneofs)object._networkTier="networkTier"}return object};AccessConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AccessConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AccessConfig"};AccessConfig.AccessType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ACCESS_TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ONE_TO_ONE_NAT"]=1;values[valuesById[2]="DIRECT_IPV6"]=2;return values}();AccessConfig.NetworkTier=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NETWORK_TIER_UNSPECIFIED"]=0;values[valuesById[1]="PREMIUM"]=1;values[valuesById[2]="STANDARD"]=2;return values}();return AccessConfig}();v1beta.AliasIpRange=function(){function AliasIpRange(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AliasIpRange;while(reader.pos>>3){case 1:{message.ipCidrRange=reader.string();break}case 2:{message.subnetworkRangeName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};AliasIpRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AliasIpRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){properties._ipCidrRange=1;if(!$util.isString(message.ipCidrRange))return"ipCidrRange: string expected"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){properties._subnetworkRangeName=1;if(!$util.isString(message.subnetworkRangeName))return"subnetworkRangeName: string expected"}return null};AliasIpRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AliasIpRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AliasIpRange;if(object.ipCidrRange!=null)message.ipCidrRange=String(object.ipCidrRange);if(object.subnetworkRangeName!=null)message.subnetworkRangeName=String(object.subnetworkRangeName);return message};AliasIpRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.ipCidrRange!=null&&message.hasOwnProperty("ipCidrRange")){object.ipCidrRange=message.ipCidrRange;if(options.oneofs)object._ipCidrRange="ipCidrRange"}if(message.subnetworkRangeName!=null&&message.hasOwnProperty("subnetworkRangeName")){object.subnetworkRangeName=message.subnetworkRangeName;if(options.oneofs)object._subnetworkRangeName="subnetworkRangeName"}return object};AliasIpRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AliasIpRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AliasIpRange"};return AliasIpRange}();v1beta.Scheduling=function(){function Scheduling(properties){this.nodeAffinities=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Scheduling;while(reader.pos>>3){case 1:{message.onHostMaintenance=reader.int32();break}case 2:{message.automaticRestart=reader.bool();break}case 3:{message.preemptible=reader.bool();break}case 4:{if(!(message.nodeAffinities&&message.nodeAffinities.length))message.nodeAffinities=[];message.nodeAffinities.push($root.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{message.minNodeCpus=reader.int32();break}case 6:{message.provisioningModel=reader.int32();break}case 7:{message.instanceTerminationAction=reader.int32();break}case 10:{message.localSsdRecoveryTimeout=$root.google.cloud.backupdr.v1beta.SchedulingDuration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};Scheduling.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Scheduling.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.onHostMaintenance!=null&&message.hasOwnProperty("onHostMaintenance")){properties._onHostMaintenance=1;switch(message.onHostMaintenance){default:return"onHostMaintenance: enum value expected";case 0:case 1:case 1e3:break}}if(message.automaticRestart!=null&&message.hasOwnProperty("automaticRestart")){properties._automaticRestart=1;if(typeof message.automaticRestart!=="boolean")return"automaticRestart: boolean expected"}if(message.preemptible!=null&&message.hasOwnProperty("preemptible")){properties._preemptible=1;if(typeof message.preemptible!=="boolean")return"preemptible: boolean expected"}if(message.nodeAffinities!=null&&message.hasOwnProperty("nodeAffinities")){if(!Array.isArray(message.nodeAffinities))return"nodeAffinities: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Scheduling;switch(object.onHostMaintenance){default:if(typeof object.onHostMaintenance==="number"){message.onHostMaintenance=object.onHostMaintenance;break}break;case"ON_HOST_MAINTENANCE_UNSPECIFIED":case 0:message.onHostMaintenance=0;break;case"TERMINATE":case 1:message.onHostMaintenance=1;break;case"MIGRATE":case 1e3:message.onHostMaintenance=1e3;break}if(object.automaticRestart!=null)message.automaticRestart=Boolean(object.automaticRestart);if(object.preemptible!=null)message.preemptible=Boolean(object.preemptible);if(object.nodeAffinities){if(!Array.isArray(object.nodeAffinities))throw TypeError(".google.cloud.backupdr.v1beta.Scheduling.nodeAffinities: array expected");message.nodeAffinities=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity;while(reader.pos>>3){case 1:{message.key=reader.string();break}case 2:{message.operator=reader.int32();break}case 3:{if(!(message.values&&message.values.length))message.values=[];message.values.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};NodeAffinity.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NodeAffinity.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.key!=null&&message.hasOwnProperty("key")){properties._key=1;if(!$util.isString(message.key))return"key: string expected"}if(message.operator!=null&&message.hasOwnProperty("operator")){properties._operator=1;switch(message.operator){default:return"operator: enum value expected";case 0:case 1:case 2:break}}if(message.values!=null&&message.hasOwnProperty("values")){if(!Array.isArray(message.values))return"values: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity;if(object.key!=null)message.key=String(object.key);switch(object.operator){default:if(typeof object.operator==="number"){message.operator=object.operator;break}break;case"OPERATOR_UNSPECIFIED":case 0:message.operator=0;break;case"IN":case 1:message.operator=1;break;case"NOT_IN":case 2:message.operator=2;break}if(object.values){if(!Array.isArray(object.values))throw TypeError(".google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.values: array expected");message.values=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.SchedulingDuration;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};SchedulingDuration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SchedulingDuration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){properties._seconds=1;if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){properties._nanos=1;if(!$util.isInteger(message.nanos))return"nanos: integer expected"}return null};SchedulingDuration.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.SchedulingDuration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.SchedulingDuration;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};SchedulingDuration.toObject=function toObject(message,options){if(!options)options={};var object={};if(message.seconds!=null&&message.hasOwnProperty("seconds")){if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(options.oneofs)object._seconds="seconds"}if(message.nanos!=null&&message.hasOwnProperty("nanos")){object.nanos=message.nanos;if(options.oneofs)object._nanos="nanos"}return object};SchedulingDuration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SchedulingDuration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.SchedulingDuration"};return SchedulingDuration}();v1beta.ServiceAccount=function(){function ServiceAccount(properties){this.scopes=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ServiceAccount;while(reader.pos>>3){case 1:{message.email=reader.string();break}case 2:{if(!(message.scopes&&message.scopes.length))message.scopes=[];message.scopes.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};ServiceAccount.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceAccount.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.email!=null&&message.hasOwnProperty("email")){properties._email=1;if(!$util.isString(message.email))return"email: string expected"}if(message.scopes!=null&&message.hasOwnProperty("scopes")){if(!Array.isArray(message.scopes))return"scopes: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ServiceAccount;if(object.email!=null)message.email=String(object.email);if(object.scopes){if(!Array.isArray(object.scopes))throw TypeError(".google.cloud.backupdr.v1beta.ServiceAccount.scopes: array expected");message.scopes=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.Tags;while(reader.pos>>3){case 1:{if(!(message.items&&message.items.length))message.items=[];message.items.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};Tags.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Tags.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.items!=null&&message.hasOwnProperty("items")){if(!Array.isArray(message.items))return"items: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.Tags;if(object.items){if(!Array.isArray(object.items))throw TypeError(".google.cloud.backupdr.v1beta.Tags.items: array expected");message.items=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AttachedDisk;while(reader.pos>>3){case 1:{message.initializeParams=$root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.deviceName=reader.string();break}case 5:{message.kind=reader.string();break}case 6:{message.diskTypeDeprecated=reader.int32();break}case 7:{message.mode=reader.int32();break}case 8:{message.source=reader.string();break}case 9:{message.index=reader.int64();break}case 10:{message.boot=reader.bool();break}case 11:{message.autoDelete=reader.bool();break}case 12:{if(!(message.license&&message.license.length))message.license=[];message.license.push(reader.string());break}case 13:{message.diskInterface=reader.int32();break}case 14:{if(!(message.guestOsFeature&&message.guestOsFeature.length))message.guestOsFeature=[];message.guestOsFeature.push($root.google.cloud.backupdr.v1beta.GuestOsFeature.decode(reader,reader.uint32(),undefined,long+1));break}case 15:{message.diskEncryptionKey=$root.google.cloud.backupdr.v1beta.CustomerEncryptionKey.decode(reader,reader.uint32(),undefined,long+1);break}case 16:{message.diskSizeGb=reader.int64();break}case 17:{message.savedState=reader.int32();break}case 18:{message.diskType=reader.string();break}case 19:{message.type=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};AttachedDisk.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AttachedDisk.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){properties._initializeParams=1;{var error=$root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.verify(message.initializeParams,long+1);if(error)return"initializeParams."+error}}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){properties._deviceName=1;if(!$util.isString(message.deviceName))return"deviceName: string expected"}if(message.kind!=null&&message.hasOwnProperty("kind")){properties._kind=1;if(!$util.isString(message.kind))return"kind: string expected"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){properties._diskTypeDeprecated=1;switch(message.diskTypeDeprecated){default:return"diskTypeDeprecated: enum value expected";case 0:case 1:case 2:break}}if(message.mode!=null&&message.hasOwnProperty("mode")){properties._mode=1;switch(message.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:break}}if(message.source!=null&&message.hasOwnProperty("source")){properties._source=1;if(!$util.isString(message.source))return"source: string expected"}if(message.index!=null&&message.hasOwnProperty("index")){properties._index=1;if(!$util.isInteger(message.index)&&!(message.index&&$util.isInteger(message.index.low)&&$util.isInteger(message.index.high)))return"index: integer|Long expected"}if(message.boot!=null&&message.hasOwnProperty("boot")){properties._boot=1;if(typeof message.boot!=="boolean")return"boot: boolean expected"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){properties._autoDelete=1;if(typeof message.autoDelete!=="boolean")return"autoDelete: boolean expected"}if(message.license!=null&&message.hasOwnProperty("license")){if(!Array.isArray(message.license))return"license: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AttachedDisk;if(object.initializeParams!=null){if(typeof object.initializeParams!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AttachedDisk.initializeParams: object expected");message.initializeParams=$root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.fromObject(object.initializeParams,long+1)}if(object.deviceName!=null)message.deviceName=String(object.deviceName);if(object.kind!=null)message.kind=String(object.kind);switch(object.diskTypeDeprecated){default:if(typeof object.diskTypeDeprecated==="number"){message.diskTypeDeprecated=object.diskTypeDeprecated;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.diskTypeDeprecated=0;break;case"SCRATCH":case 1:message.diskTypeDeprecated=1;break;case"PERSISTENT":case 2:message.diskTypeDeprecated=2;break}switch(object.mode){default:if(typeof object.mode==="number"){message.mode=object.mode;break}break;case"DISK_MODE_UNSPECIFIED":case 0:message.mode=0;break;case"READ_WRITE":case 1:message.mode=1;break;case"READ_ONLY":case 2:message.mode=2;break;case"LOCKED":case 3:message.mode=3;break}if(object.source!=null)message.source=String(object.source);if(object.index!=null)if($util.Long)(message.index=$util.Long.fromValue(object.index)).unsigned=false;else if(typeof object.index==="string")message.index=parseInt(object.index,10);else if(typeof object.index==="number")message.index=object.index;else if(typeof object.index==="object")message.index=new $util.LongBits(object.index.low>>>0,object.index.high>>>0).toNumber();if(object.boot!=null)message.boot=Boolean(object.boot);if(object.autoDelete!=null)message.autoDelete=Boolean(object.autoDelete);if(object.license){if(!Array.isArray(object.license))throw TypeError(".google.cloud.backupdr.v1beta.AttachedDisk.license: array expected");message.license=[];for(var i=0;i>>0,object.diskSizeGb.high>>>0).toNumber();switch(object.savedState){default:if(typeof object.savedState==="number"){message.savedState=object.savedState;break}break;case"DISK_SAVED_STATE_UNSPECIFIED":case 0:message.savedState=0;break;case"PRESERVED":case 1:message.savedState=1;break}if(object.diskType!=null)message.diskType=String(object.diskType);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"DISK_TYPE_UNSPECIFIED":case 0:message.type=0;break;case"SCRATCH":case 1:message.type=1;break;case"PERSISTENT":case 2:message.type=2;break}return message};AttachedDisk.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.arrays||options.defaults){object.license=[];object.guestOsFeature=[]}if(message.initializeParams!=null&&message.hasOwnProperty("initializeParams")){object.initializeParams=$root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.toObject(message.initializeParams,options);if(options.oneofs)object._initializeParams="initializeParams"}if(message.deviceName!=null&&message.hasOwnProperty("deviceName")){object.deviceName=message.deviceName;if(options.oneofs)object._deviceName="deviceName"}if(message.kind!=null&&message.hasOwnProperty("kind")){object.kind=message.kind;if(options.oneofs)object._kind="kind"}if(message.diskTypeDeprecated!=null&&message.hasOwnProperty("diskTypeDeprecated")){object.diskTypeDeprecated=options.enums===String?$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskType[message.diskTypeDeprecated]===undefined?message.diskTypeDeprecated:$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskType[message.diskTypeDeprecated]:message.diskTypeDeprecated;if(options.oneofs)object._diskTypeDeprecated="diskTypeDeprecated"}if(message.mode!=null&&message.hasOwnProperty("mode")){object.mode=options.enums===String?$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode[message.mode]===undefined?message.mode:$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode[message.mode]:message.mode;if(options.oneofs)object._mode="mode"}if(message.source!=null&&message.hasOwnProperty("source")){object.source=message.source;if(options.oneofs)object._source="source"}if(message.index!=null&&message.hasOwnProperty("index")){if(typeof message.index==="number")object.index=options.longs===String?String(message.index):message.index;else object.index=options.longs===String?$util.Long.prototype.toString.call(message.index):options.longs===Number?new $util.LongBits(message.index.low>>>0,message.index.high>>>0).toNumber():message.index;if(options.oneofs)object._index="index"}if(message.boot!=null&&message.hasOwnProperty("boot")){object.boot=message.boot;if(options.oneofs)object._boot="boot"}if(message.autoDelete!=null&&message.hasOwnProperty("autoDelete")){object.autoDelete=message.autoDelete;if(options.oneofs)object._autoDelete="autoDelete"}if(message.license&&message.license.length){object.license=[];for(var j=0;j>>0,message.diskSizeGb.high>>>0).toNumber():message.diskSizeGb;if(options.oneofs)object._diskSizeGb="diskSizeGb"}if(message.savedState!=null&&message.hasOwnProperty("savedState")){object.savedState=options.enums===String?$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState[message.savedState]===undefined?message.savedState:$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState[message.savedState]:message.savedState;if(options.oneofs)object._savedState="savedState"}if(message.diskType!=null&&message.hasOwnProperty("diskType")){object.diskType=message.diskType;if(options.oneofs)object._diskType="diskType"}if(message.type!=null&&message.hasOwnProperty("type")){object.type=options.enums===String?$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskType[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1beta.AttachedDisk.DiskType[message.type]:message.type;if(options.oneofs)object._type="type"}return object};AttachedDisk.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AttachedDisk.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AttachedDisk"};AttachedDisk.InitializeParams=function(){function InitializeParams(properties){this.replicaZones=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams;while(reader.pos>>3){case 1:{message.diskName=reader.string();break}case 2:{if(!(message.replicaZones&&message.replicaZones.length))message.replicaZones=[];message.replicaZones.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};InitializeParams.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};InitializeParams.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.diskName!=null&&message.hasOwnProperty("diskName")){properties._diskName=1;if(!$util.isString(message.diskName))return"diskName: string expected"}if(message.replicaZones!=null&&message.hasOwnProperty("replicaZones")){if(!Array.isArray(message.replicaZones))return"replicaZones: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams;if(object.diskName!=null)message.diskName=String(object.diskName);if(object.replicaZones){if(!Array.isArray(object.replicaZones))throw TypeError(".google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.replicaZones: array expected");message.replicaZones=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetBindingMatchingResourceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetBindingMatchingResourceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetBindingMatchingResourceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest;if(object.name!=null)message.name=String(object.name);return message};GetBindingMatchingResourceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetBindingMatchingResourceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetBindingMatchingResourceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest"};return GetBindingMatchingResourceRequest}();v1beta.ListBindingMatchingResourcesRequest=function(){function ListBindingMatchingResourcesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListBindingMatchingResourcesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBindingMatchingResourcesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListBindingMatchingResourcesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest;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};ListBindingMatchingResourcesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListBindingMatchingResourcesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListBindingMatchingResourcesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest"};return ListBindingMatchingResourcesRequest}();v1beta.ListBindingMatchingResourcesResponse=function(){function ListBindingMatchingResourcesResponse(properties){this.matchingResources=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse;while(reader.pos>>3){case 1:{if(!(message.matchingResources&&message.matchingResources.length))message.matchingResources=[];message.matchingResources.push($root.google.cloud.backupdr.v1beta.BindingMatchingResource.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListBindingMatchingResourcesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListBindingMatchingResourcesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.matchingResources!=null&&message.hasOwnProperty("matchingResources")){if(!Array.isArray(message.matchingResources))return"matchingResources: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse;if(object.matchingResources){if(!Array.isArray(object.matchingResources))throw TypeError(".google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.matchingResources: array expected");message.matchingResources=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BindingMatchingResource;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.resource=reader.string();break}case 3:{message.lastEvaluationTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.autoProtectionDetails=$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BindingMatchingResource.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BindingMatchingResource.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.resource!=null&&message.hasOwnProperty("resource"))if(!$util.isString(message.resource))return"resource: string expected";if(message.lastEvaluationTime!=null&&message.hasOwnProperty("lastEvaluationTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastEvaluationTime,long+1);if(error)return"lastEvaluationTime."+error}if(message.autoProtectionDetails!=null&&message.hasOwnProperty("autoProtectionDetails")){var error=$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.verify(message.autoProtectionDetails,long+1);if(error)return"autoProtectionDetails."+error}return null};BindingMatchingResource.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BindingMatchingResource)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BindingMatchingResource;if(object.name!=null)message.name=String(object.name);if(object.resource!=null)message.resource=String(object.resource);if(object.lastEvaluationTime!=null){if(typeof object.lastEvaluationTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BindingMatchingResource.lastEvaluationTime: object expected");message.lastEvaluationTime=$root.google.protobuf.Timestamp.fromObject(object.lastEvaluationTime,long+1)}if(object.autoProtectionDetails!=null){if(typeof object.autoProtectionDetails!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BindingMatchingResource.autoProtectionDetails: object expected");message.autoProtectionDetails=$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.fromObject(object.autoProtectionDetails,long+1)}return message};BindingMatchingResource.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.resource="";object.lastEvaluationTime=null;object.autoProtectionDetails=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.resource!=null&&message.hasOwnProperty("resource"))object.resource=message.resource;if(message.lastEvaluationTime!=null&&message.hasOwnProperty("lastEvaluationTime"))object.lastEvaluationTime=$root.google.protobuf.Timestamp.toObject(message.lastEvaluationTime,options);if(message.autoProtectionDetails!=null&&message.hasOwnProperty("autoProtectionDetails"))object.autoProtectionDetails=$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.toObject(message.autoProtectionDetails,options);return object};BindingMatchingResource.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BindingMatchingResource.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BindingMatchingResource"};return BindingMatchingResource}();v1beta.AutoProtectionDetails=function(){function AutoProtectionDetails(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.AutoProtectionDetails;while(reader.pos>>3){case 1:{message.state=reader.int32();break}case 2:{message.backupPlanAssociation=reader.string();break}case 3:{message.dataSource=reader.string();break}case 4:{message.error=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};AutoProtectionDetails.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};AutoProtectionDetails.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))if(!$util.isString(message.backupPlanAssociation))return"backupPlanAssociation: string expected";if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))if(!$util.isString(message.dataSource))return"dataSource: string expected";if(message.error!=null&&message.hasOwnProperty("error")){var error=$root.google.rpc.Status.verify(message.error,long+1);if(error)return"error."+error}return null};AutoProtectionDetails.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.AutoProtectionDetails)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.AutoProtectionDetails;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"PROTECTED":case 1:message.state=1;break;case"PROTECTION_FAILED":case 2:message.state=2;break;case"UNPROTECTING":case 3:message.state=3;break;case"UNPROTECTION_FAILED":case 4:message.state=4;break}if(object.backupPlanAssociation!=null)message.backupPlanAssociation=String(object.backupPlanAssociation);if(object.dataSource!=null)message.dataSource=String(object.dataSource);if(object.error!=null){if(typeof object.error!=="object")throw TypeError(".google.cloud.backupdr.v1beta.AutoProtectionDetails.error: object expected");message.error=$root.google.rpc.Status.fromObject(object.error,long+1)}return message};AutoProtectionDetails.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.state=options.enums===String?"STATE_UNSPECIFIED":0;object.backupPlanAssociation="";object.dataSource="";object.error=null}if(message.state!=null&&message.hasOwnProperty("state"))object.state=options.enums===String?$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.State[message.state]===undefined?message.state:$root.google.cloud.backupdr.v1beta.AutoProtectionDetails.State[message.state]:message.state;if(message.backupPlanAssociation!=null&&message.hasOwnProperty("backupPlanAssociation"))object.backupPlanAssociation=message.backupPlanAssociation;if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))object.dataSource=message.dataSource;if(message.error!=null&&message.hasOwnProperty("error"))object.error=$root.google.rpc.Status.toObject(message.error,options);return object};AutoProtectionDetails.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AutoProtectionDetails.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.AutoProtectionDetails"};AutoProtectionDetails.State=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="STATE_UNSPECIFIED"]=0;values[valuesById[1]="PROTECTED"]=1;values[valuesById[2]="PROTECTION_FAILED"]=2;values[valuesById[3]="UNPROTECTING"]=3;values[valuesById[4]="UNPROTECTION_FAILED"]=4;return values}();return AutoProtectionDetails}();v1beta.DataSourceReference=function(){function DataSourceReference(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSourceReference;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.dataSource=reader.string();break}case 3:{message.createTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.dataSourceBackupConfigState=reader.int32();break}case 5:{message.dataSourceBackupCount=reader.int64();break}case 6:{message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.decode(reader,reader.uint32(),undefined,long+1);break}case 8:{message.totalStoredBytes=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))if(!$util.isString(message.dataSource))return"dataSource: string expected";if(message.createTime!=null&&message.hasOwnProperty("createTime")){var error=$root.google.protobuf.Timestamp.verify(message.createTime,long+1);if(error)return"createTime."+error}if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))switch(message.dataSourceBackupConfigState){default:return"dataSourceBackupConfigState: enum value expected";case 0:case 1:case 2:break}if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(!$util.isInteger(message.dataSourceBackupCount)&&!(message.dataSourceBackupCount&&$util.isInteger(message.dataSourceBackupCount.low)&&$util.isInteger(message.dataSourceBackupCount.high)))return"dataSourceBackupCount: integer|Long expected";if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo")){var error=$root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.verify(message.dataSourceBackupConfigInfo,long+1);if(error)return"dataSourceBackupConfigInfo."+error}if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo")){var error=$root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.verify(message.dataSourceGcpResourceInfo,long+1);if(error)return"dataSourceGcpResourceInfo."+error}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"}return null};DataSourceReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DataSourceReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DataSourceReference;if(object.name!=null)message.name=String(object.name);if(object.dataSource!=null)message.dataSource=String(object.dataSource);if(object.createTime!=null){if(typeof object.createTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceReference.createTime: object expected");message.createTime=$root.google.protobuf.Timestamp.fromObject(object.createTime,long+1)}switch(object.dataSourceBackupConfigState){default:if(typeof object.dataSourceBackupConfigState==="number"){message.dataSourceBackupConfigState=object.dataSourceBackupConfigState;break}break;case"BACKUP_CONFIG_STATE_UNSPECIFIED":case 0:message.dataSourceBackupConfigState=0;break;case"ACTIVE":case 1:message.dataSourceBackupConfigState=1;break;case"PASSIVE":case 2:message.dataSourceBackupConfigState=2;break}if(object.dataSourceBackupCount!=null)if($util.Long)(message.dataSourceBackupCount=$util.Long.fromValue(object.dataSourceBackupCount)).unsigned=false;else if(typeof object.dataSourceBackupCount==="string")message.dataSourceBackupCount=parseInt(object.dataSourceBackupCount,10);else if(typeof object.dataSourceBackupCount==="number")message.dataSourceBackupCount=object.dataSourceBackupCount;else if(typeof object.dataSourceBackupCount==="object")message.dataSourceBackupCount=new $util.LongBits(object.dataSourceBackupCount.low>>>0,object.dataSourceBackupCount.high>>>0).toNumber();if(object.dataSourceBackupConfigInfo!=null){if(typeof object.dataSourceBackupConfigInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceReference.dataSourceBackupConfigInfo: object expected");message.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.fromObject(object.dataSourceBackupConfigInfo,long+1)}if(object.dataSourceGcpResourceInfo!=null){if(typeof object.dataSourceGcpResourceInfo!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceReference.dataSourceGcpResourceInfo: object expected");message.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.fromObject(object.dataSourceGcpResourceInfo,long+1)}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();return message};DataSourceReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.dataSource="";object.createTime=null;object.dataSourceBackupConfigState=options.enums===String?"BACKUP_CONFIG_STATE_UNSPECIFIED":0;if($util.Long){var long=new $util.Long(0,0,false);object.dataSourceBackupCount=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.dataSourceBackupCount=options.longs===String?"0":0;object.dataSourceBackupConfigInfo=null;object.dataSourceGcpResourceInfo=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.dataSource!=null&&message.hasOwnProperty("dataSource"))object.dataSource=message.dataSource;if(message.createTime!=null&&message.hasOwnProperty("createTime"))object.createTime=$root.google.protobuf.Timestamp.toObject(message.createTime,options);if(message.dataSourceBackupConfigState!=null&&message.hasOwnProperty("dataSourceBackupConfigState"))object.dataSourceBackupConfigState=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupConfigState[message.dataSourceBackupConfigState]===undefined?message.dataSourceBackupConfigState:$root.google.cloud.backupdr.v1beta.BackupConfigState[message.dataSourceBackupConfigState]:message.dataSourceBackupConfigState;if(message.dataSourceBackupCount!=null&&message.hasOwnProperty("dataSourceBackupCount"))if(typeof message.dataSourceBackupCount==="number")object.dataSourceBackupCount=options.longs===String?String(message.dataSourceBackupCount):message.dataSourceBackupCount;else object.dataSourceBackupCount=options.longs===String?$util.Long.prototype.toString.call(message.dataSourceBackupCount):options.longs===Number?new $util.LongBits(message.dataSourceBackupCount.low>>>0,message.dataSourceBackupCount.high>>>0).toNumber():message.dataSourceBackupCount;if(message.dataSourceBackupConfigInfo!=null&&message.hasOwnProperty("dataSourceBackupConfigInfo"))object.dataSourceBackupConfigInfo=$root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.toObject(message.dataSourceBackupConfigInfo,options);if(message.dataSourceGcpResourceInfo!=null&&message.hasOwnProperty("dataSourceGcpResourceInfo"))object.dataSourceGcpResourceInfo=$root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.toObject(message.dataSourceGcpResourceInfo,options);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"}return object};DataSourceReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSourceReference"};return DataSourceReference}();v1beta.DataSourceBackupConfigInfo=function(){function DataSourceBackupConfigInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo;while(reader.pos>>3){case 1:{message.lastBackupState=reader.int32();break}case 2:{message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};DataSourceBackupConfigInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceBackupConfigInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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,long+1);if(error)return"lastSuccessfulBackupConsistencyTime."+error}return null};DataSourceBackupConfigInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo;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.v1beta.DataSourceBackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected");message.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime,long+1)}return message};DataSourceBackupConfigInfo.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}if(message.lastBackupState!=null&&message.hasOwnProperty("lastBackupState"))object.lastBackupState=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState[message.lastBackupState]===undefined?message.lastBackupState:$root.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState[message.lastBackupState]:message.lastBackupState;if(message.lastSuccessfulBackupConsistencyTime!=null&&message.hasOwnProperty("lastSuccessfulBackupConsistencyTime"))object.lastSuccessfulBackupConsistencyTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime,options);return object};DataSourceBackupConfigInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceBackupConfigInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo"};return DataSourceBackupConfigInfo}();v1beta.DataSourceGcpResourceInfo=function(){function DataSourceGcpResourceInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo;while(reader.pos>>3){case 4:{message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.alloyDbClusterProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.gcpResourcename=reader.string();break}case 2:{message.type=reader.string();break}case 3:{message.location=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DataSourceGcpResourceInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DataSourceGcpResourceInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.verify(message.cloudSqlInstanceProperties,long+1);if(error)return"cloudSqlInstanceProperties."+error}}if(message.alloyDbClusterProperties!=null&&message.hasOwnProperty("alloyDbClusterProperties")){if(properties.resourceProperties===1)return"resourceProperties: multiple values";properties.resourceProperties=1;{var error=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.verify(message.alloyDbClusterProperties,long+1);if(error)return"alloyDbClusterProperties."+error}}if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))if(!$util.isString(message.gcpResourcename))return"gcpResourcename: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.location!=null&&message.hasOwnProperty("location"))if(!$util.isString(message.location))return"location: string expected";return null};DataSourceGcpResourceInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo;if(object.cloudSqlInstanceProperties!=null){if(typeof object.cloudSqlInstanceProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.cloudSqlInstanceProperties: object expected");message.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.fromObject(object.cloudSqlInstanceProperties,long+1)}if(object.alloyDbClusterProperties!=null){if(typeof object.alloyDbClusterProperties!=="object")throw TypeError(".google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.alloyDbClusterProperties: object expected");message.alloyDbClusterProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.fromObject(object.alloyDbClusterProperties,long+1)}if(object.gcpResourcename!=null)message.gcpResourcename=String(object.gcpResourcename);if(object.type!=null)message.type=String(object.type);if(object.location!=null)message.location=String(object.location);return message};DataSourceGcpResourceInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.gcpResourcename="";object.type="";object.location=""}if(message.gcpResourcename!=null&&message.hasOwnProperty("gcpResourcename"))object.gcpResourcename=message.gcpResourcename;if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.location!=null&&message.hasOwnProperty("location"))object.location=message.location;if(message.cloudSqlInstanceProperties!=null&&message.hasOwnProperty("cloudSqlInstanceProperties")){object.cloudSqlInstanceProperties=$root.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.toObject(message.cloudSqlInstanceProperties,options);if(options.oneofs)object.resourceProperties="cloudSqlInstanceProperties"}if(message.alloyDbClusterProperties!=null&&message.hasOwnProperty("alloyDbClusterProperties")){object.alloyDbClusterProperties=$root.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.toObject(message.alloyDbClusterProperties,options);if(options.oneofs)object.resourceProperties="alloyDbClusterProperties"}return object};DataSourceGcpResourceInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DataSourceGcpResourceInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo"};return DataSourceGcpResourceInfo}();v1beta.GetDataSourceReferenceRequest=function(){function GetDataSourceReferenceRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetDataSourceReferenceRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetDataSourceReferenceRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetDataSourceReferenceRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest;if(object.name!=null)message.name=String(object.name);return message};GetDataSourceReferenceRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetDataSourceReferenceRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetDataSourceReferenceRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest"};return GetDataSourceReferenceRequest}();v1beta.ListDataSourceReferencesRequest=function(){function ListDataSourceReferencesRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListDataSourceReferencesRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListDataSourceReferencesRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest;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};ListDataSourceReferencesRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListDataSourceReferencesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListDataSourceReferencesRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest"};return ListDataSourceReferencesRequest}();v1beta.ListDataSourceReferencesResponse=function(){function ListDataSourceReferencesResponse(properties){this.dataSourceReferences=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1beta.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListDataSourceReferencesResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListDataSourceReferencesResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest;while(reader.pos>>3){case 1:{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}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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";return null};FetchDataSourceReferencesForResourceTypeRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest;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);return message};FetchDataSourceReferencesForResourceTypeRequest.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=""}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;return object};FetchDataSourceReferencesForResourceTypeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchDataSourceReferencesForResourceTypeRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest"};return FetchDataSourceReferencesForResourceTypeRequest}();v1beta.FetchDataSourceReferencesForResourceTypeResponse=function(){function FetchDataSourceReferencesForResourceTypeResponse(properties){this.dataSourceReferences=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse;while(reader.pos>>3){case 1:{if(!(message.dataSourceReferences&&message.dataSourceReferences.length))message.dataSourceReferences=[];message.dataSourceReferences.push($root.google.cloud.backupdr.v1beta.DataSourceReference.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FetchDataSourceReferencesForResourceTypeResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FetchDataSourceReferencesForResourceTypeResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.dataSourceReferences!=null&&message.hasOwnProperty("dataSourceReferences")){if(!Array.isArray(message.dataSourceReferences))return"dataSourceReferences: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse;if(object.dataSourceReferences){if(!Array.isArray(object.dataSourceReferences))throw TypeError(".google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.dataSourceReferences: array expected");message.dataSourceReferences=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest;while(reader.pos>>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}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";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};ListResourceBackupConfigsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest;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};ListResourceBackupConfigsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};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};ListResourceBackupConfigsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListResourceBackupConfigsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest"};return ListResourceBackupConfigsRequest}();v1beta.ListResourceBackupConfigsResponse=function(){function ListResourceBackupConfigsResponse(properties){this.resourceBackupConfigs=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse;while(reader.pos>>3){case 1:{if(!(message.resourceBackupConfigs&&message.resourceBackupConfigs.length))message.resourceBackupConfigs=[];message.resourceBackupConfigs.push($root.google.cloud.backupdr.v1beta.ResourceBackupConfig.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.nextPageToken=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ListResourceBackupConfigsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListResourceBackupConfigsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.resourceBackupConfigs!=null&&message.hasOwnProperty("resourceBackupConfigs")){if(!Array.isArray(message.resourceBackupConfigs))return"resourceBackupConfigs: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse;if(object.resourceBackupConfigs){if(!Array.isArray(object.resourceBackupConfigs))throw TypeError(".google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.resourceBackupConfigs: array expected");message.resourceBackupConfigs=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.ResourceBackupConfig,key,value;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.uid=reader.string();break}case 3:{message.targetResource=reader.string();break}case 4:{message.targetResourceDisplayName=reader.string();break}case 5:{message.targetResourceType=reader.int32();break}case 6:{if(message.targetResourceLabels===$util.emptyObject)message.targetResourceLabels={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.targetResourceLabels,key);message.targetResourceLabels[key]=value;break}case 7:{if(!(message.backupConfigsDetails&&message.backupConfigsDetails.length))message.backupConfigsDetails=[];message.backupConfigsDetails.push($root.google.cloud.backupdr.v1beta.BackupConfigDetails.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{message.backupConfigured=reader.bool();break}case 9:{message.vaulted=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ResourceBackupConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ResourceBackupConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.uid!=null&&message.hasOwnProperty("uid"))if(!$util.isString(message.uid))return"uid: string expected";if(message.targetResource!=null&&message.hasOwnProperty("targetResource"))if(!$util.isString(message.targetResource))return"targetResource: string expected";if(message.targetResourceDisplayName!=null&&message.hasOwnProperty("targetResourceDisplayName"))if(!$util.isString(message.targetResourceDisplayName))return"targetResourceDisplayName: string expected";if(message.targetResourceType!=null&&message.hasOwnProperty("targetResourceType"))switch(message.targetResourceType){default:return"targetResourceType: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.targetResourceLabels!=null&&message.hasOwnProperty("targetResourceLabels")){if(!$util.isObject(message.targetResourceLabels))return"targetResourceLabels: object expected";var key=Object.keys(message.targetResourceLabels);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.ResourceBackupConfig;if(object.name!=null)message.name=String(object.name);if(object.uid!=null)message.uid=String(object.uid);if(object.targetResource!=null)message.targetResource=String(object.targetResource);if(object.targetResourceDisplayName!=null)message.targetResourceDisplayName=String(object.targetResourceDisplayName);switch(object.targetResourceType){default:if(typeof object.targetResourceType==="number"){message.targetResourceType=object.targetResourceType;break}break;case"RESOURCE_TYPE_UNSPECIFIED":case 0:message.targetResourceType=0;break;case"CLOUD_SQL_INSTANCE":case 1:message.targetResourceType=1;break;case"COMPUTE_ENGINE_VM":case 2:message.targetResourceType=2;break;case"COMPUTE_ENGINE_DISK":case 3:message.targetResourceType=3;break;case"COMPUTE_ENGINE_REGIONAL_DISK":case 4:message.targetResourceType=4;break}if(object.targetResourceLabels){if(typeof object.targetResourceLabels!=="object")throw TypeError(".google.cloud.backupdr.v1beta.ResourceBackupConfig.targetResourceLabels: object expected");message.targetResourceLabels={};for(var keys=Object.keys(object.targetResourceLabels),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupConfigDetails;while(reader.pos>>3){case 10:{message.backupDrPlanConfig=$root.google.cloud.backupdr.v1beta.BackupDrPlanConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 11:{message.backupDrTemplateConfig=$root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.decode(reader,reader.uint32(),undefined,long+1);break}case 1:{message.backupConfigSource=reader.string();break}case 2:{message.backupConfigSourceDisplayName=reader.string();break}case 3:{message.type=reader.int32();break}case 4:{message.state=reader.int32();break}case 5:{message.pitrSettings=$root.google.cloud.backupdr.v1beta.PitrSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 6:{message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.applicableResource=reader.string();break}case 8:{message.backupVault=reader.string();break}case 12:{if(!(message.backupLocations&&message.backupLocations.length))message.backupLocations=[];message.backupLocations.push($root.google.cloud.backupdr.v1beta.BackupLocation.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};BackupConfigDetails.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupConfigDetails.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.backupDrPlanConfig!=null&&message.hasOwnProperty("backupDrPlanConfig")){properties.planSpecificConfig=1;{var error=$root.google.cloud.backupdr.v1beta.BackupDrPlanConfig.verify(message.backupDrPlanConfig,long+1);if(error)return"backupDrPlanConfig."+error}}if(message.backupDrTemplateConfig!=null&&message.hasOwnProperty("backupDrTemplateConfig")){if(properties.planSpecificConfig===1)return"planSpecificConfig: multiple values";properties.planSpecificConfig=1;{var error=$root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.verify(message.backupDrTemplateConfig,long+1);if(error)return"backupDrTemplateConfig."+error}}if(message.backupConfigSource!=null&&message.hasOwnProperty("backupConfigSource"))if(!$util.isString(message.backupConfigSource))return"backupConfigSource: string expected";if(message.backupConfigSourceDisplayName!=null&&message.hasOwnProperty("backupConfigSourceDisplayName"))if(!$util.isString(message.backupConfigSourceDisplayName))return"backupConfigSourceDisplayName: string expected";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.state!=null&&message.hasOwnProperty("state"))switch(message.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:break}if(message.pitrSettings!=null&&message.hasOwnProperty("pitrSettings")){var error=$root.google.cloud.backupdr.v1beta.PitrSettings.verify(message.pitrSettings,long+1);if(error)return"pitrSettings."+error}if(message.latestSuccessfulBackupTime!=null&&message.hasOwnProperty("latestSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.latestSuccessfulBackupTime,long+1);if(error)return"latestSuccessfulBackupTime."+error}if(message.applicableResource!=null&&message.hasOwnProperty("applicableResource"))if(!$util.isString(message.applicableResource))return"applicableResource: string expected";if(message.backupVault!=null&&message.hasOwnProperty("backupVault"))if(!$util.isString(message.backupVault))return"backupVault: string expected";if(message.backupLocations!=null&&message.hasOwnProperty("backupLocations")){if(!Array.isArray(message.backupLocations))return"backupLocations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupConfigDetails;if(object.backupDrPlanConfig!=null){if(typeof object.backupDrPlanConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigDetails.backupDrPlanConfig: object expected");message.backupDrPlanConfig=$root.google.cloud.backupdr.v1beta.BackupDrPlanConfig.fromObject(object.backupDrPlanConfig,long+1)}if(object.backupDrTemplateConfig!=null){if(typeof object.backupDrTemplateConfig!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigDetails.backupDrTemplateConfig: object expected");message.backupDrTemplateConfig=$root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.fromObject(object.backupDrTemplateConfig,long+1)}if(object.backupConfigSource!=null)message.backupConfigSource=String(object.backupConfigSource);if(object.backupConfigSourceDisplayName!=null)message.backupConfigSourceDisplayName=String(object.backupConfigSourceDisplayName);switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"CLOUD_SQL_INSTANCE_BACKUP_CONFIG":case 1:message.type=1;break;case"COMPUTE_ENGINE_RESOURCE_POLICY":case 2:message.type=2;break;case"BACKUPDR_BACKUP_PLAN":case 3:message.type=3;break;case"BACKUPDR_TEMPLATE":case 4:message.type=4;break}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"ACTIVE":case 1:message.state=1;break;case"INACTIVE":case 2:message.state=2;break;case"ERROR":case 3:message.state=3;break}if(object.pitrSettings!=null){if(typeof object.pitrSettings!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigDetails.pitrSettings: object expected");message.pitrSettings=$root.google.cloud.backupdr.v1beta.PitrSettings.fromObject(object.pitrSettings,long+1)}if(object.latestSuccessfulBackupTime!=null){if(typeof object.latestSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigDetails.latestSuccessfulBackupTime: object expected");message.latestSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.latestSuccessfulBackupTime,long+1)}if(object.applicableResource!=null)message.applicableResource=String(object.applicableResource);if(object.backupVault!=null)message.backupVault=String(object.backupVault);if(object.backupLocations){if(!Array.isArray(object.backupLocations))throw TypeError(".google.cloud.backupdr.v1beta.BackupConfigDetails.backupLocations: array expected");message.backupLocations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.PitrSettings;while(reader.pos>>3){case 1:{message.retentionDays=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};PitrSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PitrSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))if(!$util.isInteger(message.retentionDays))return"retentionDays: integer expected";return null};PitrSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.PitrSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.PitrSettings;if(object.retentionDays!=null)message.retentionDays=object.retentionDays|0;return message};PitrSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.retentionDays=0;if(message.retentionDays!=null&&message.hasOwnProperty("retentionDays"))object.retentionDays=message.retentionDays;return object};PitrSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PitrSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.PitrSettings"};return PitrSettings}();v1beta.BackupDrTemplateConfig=function(){function BackupDrTemplateConfig(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig;while(reader.pos>>3){case 1:{message.firstPartyManagementUri=reader.string();break}case 2:{message.thirdPartyManagementUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupDrTemplateConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrTemplateConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))if(!$util.isString(message.firstPartyManagementUri))return"firstPartyManagementUri: string expected";if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))if(!$util.isString(message.thirdPartyManagementUri))return"thirdPartyManagementUri: string expected";return null};BackupDrTemplateConfig.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupDrTemplateConfig;if(object.firstPartyManagementUri!=null)message.firstPartyManagementUri=String(object.firstPartyManagementUri);if(object.thirdPartyManagementUri!=null)message.thirdPartyManagementUri=String(object.thirdPartyManagementUri);return message};BackupDrTemplateConfig.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.firstPartyManagementUri="";object.thirdPartyManagementUri=""}if(message.firstPartyManagementUri!=null&&message.hasOwnProperty("firstPartyManagementUri"))object.firstPartyManagementUri=message.firstPartyManagementUri;if(message.thirdPartyManagementUri!=null&&message.hasOwnProperty("thirdPartyManagementUri"))object.thirdPartyManagementUri=message.thirdPartyManagementUri;return object};BackupDrTemplateConfig.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrTemplateConfig.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupDrTemplateConfig"};return BackupDrTemplateConfig}();v1beta.BackupDrPlanConfig=function(){function BackupDrPlanConfig(properties){this.backupDrPlanRules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupDrPlanConfig;while(reader.pos>>3){case 1:{if(!(message.backupDrPlanRules&&message.backupDrPlanRules.length))message.backupDrPlanRules=[];message.backupDrPlanRules.push($root.google.cloud.backupdr.v1beta.BackupDrPlanRule.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanConfig.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanConfig.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.backupDrPlanRules!=null&&message.hasOwnProperty("backupDrPlanRules")){if(!Array.isArray(message.backupDrPlanRules))return"backupDrPlanRules: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupDrPlanConfig;if(object.backupDrPlanRules){if(!Array.isArray(object.backupDrPlanRules))throw TypeError(".google.cloud.backupdr.v1beta.BackupDrPlanConfig.backupDrPlanRules: array expected");message.backupDrPlanRules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupDrPlanRule;while(reader.pos>>3){case 1:{message.ruleId=reader.string();break}case 2:{message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BackupDrPlanRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupDrPlanRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))if(!$util.isString(message.ruleId))return"ruleId: string expected";if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime")){var error=$root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupTime,long+1);if(error)return"lastSuccessfulBackupTime."+error}return null};BackupDrPlanRule.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupDrPlanRule)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupDrPlanRule;if(object.ruleId!=null)message.ruleId=String(object.ruleId);if(object.lastSuccessfulBackupTime!=null){if(typeof object.lastSuccessfulBackupTime!=="object")throw TypeError(".google.cloud.backupdr.v1beta.BackupDrPlanRule.lastSuccessfulBackupTime: object expected");message.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupTime,long+1)}return message};BackupDrPlanRule.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.ruleId="";object.lastSuccessfulBackupTime=null}if(message.ruleId!=null&&message.hasOwnProperty("ruleId"))object.ruleId=message.ruleId;if(message.lastSuccessfulBackupTime!=null&&message.hasOwnProperty("lastSuccessfulBackupTime"))object.lastSuccessfulBackupTime=$root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupTime,options);return object};BackupDrPlanRule.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupDrPlanRule.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupDrPlanRule"};return BackupDrPlanRule}();v1beta.BackupLocation=function(){function BackupLocation(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.cloud.backupdr.v1beta.BackupLocation;while(reader.pos>>3){case 1:{message.type=reader.int32();break}case 2:{message.locationId=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BackupLocation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BackupLocation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(message.locationId!=null&&message.hasOwnProperty("locationId"))if(!$util.isString(message.locationId))return"locationId: string expected";return null};BackupLocation.fromObject=function fromObject(object,long){if(object instanceof $root.google.cloud.backupdr.v1beta.BackupLocation)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.cloud.backupdr.v1beta.BackupLocation;switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_UNSPECIFIED":case 0:message.type=0;break;case"ZONAL":case 1:message.type=1;break;case"REGIONAL":case 2:message.type=2;break;case"MULTI_REGIONAL":case 3:message.type=3;break}if(object.locationId!=null)message.locationId=String(object.locationId);return message};BackupLocation.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type=options.enums===String?"TYPE_UNSPECIFIED":0;object.locationId=""}if(message.type!=null&&message.hasOwnProperty("type"))object.type=options.enums===String?$root.google.cloud.backupdr.v1beta.BackupLocation.Type[message.type]===undefined?message.type:$root.google.cloud.backupdr.v1beta.BackupLocation.Type[message.type]:message.type;if(message.locationId!=null&&message.hasOwnProperty("locationId"))object.locationId=message.locationId;return object};BackupLocation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BackupLocation.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.cloud.backupdr.v1beta.BackupLocation"};BackupLocation.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TYPE_UNSPECIFIED"]=0;values[valuesById[1]="ZONAL"]=1;values[valuesById[2]="REGIONAL"]=2;values[valuesById[3]="MULTI_REGIONAL"]=3;return values}();return BackupLocation}();return v1beta}();return backupdr}();return cloud}();google.api=function(){var api={};api.Http=function(){function Http(properties){this.rules=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.Http;while(reader.pos>>3){case 1:{if(!(message.rules&&message.rules.length))message.rules=[];message.rules.push($root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{message.fullyDecodeReservedExpansion=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};Http.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Http.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.rules!=null&&message.hasOwnProperty("rules")){if(!Array.isArray(message.rules))return"rules: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.Http;if(object.rules){if(!Array.isArray(object.rules))throw TypeError(".google.api.Http.rules: array expected");message.rules=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.HttpRule;while(reader.pos>>3){case 1:{message.selector=reader.string();break}case 2:{message.get=reader.string();break}case 3:{message.put=reader.string();break}case 4:{message.post=reader.string();break}case 5:{message["delete"]=reader.string();break}case 6:{message.patch=reader.string();break}case 8:{message.custom=$root.google.api.CustomHttpPattern.decode(reader,reader.uint32(),undefined,long+1);break}case 7:{message.body=reader.string();break}case 12:{message.responseBody=reader.string();break}case 11:{if(!(message.additionalBindings&&message.additionalBindings.length))message.additionalBindings=[];message.additionalBindings.push($root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};HttpRule.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};HttpRule.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.selector!=null&&message.hasOwnProperty("selector"))if(!$util.isString(message.selector))return"selector: string expected";if(message.get!=null&&message.hasOwnProperty("get")){properties.pattern=1;if(!$util.isString(message.get))return"get: string expected"}if(message.put!=null&&message.hasOwnProperty("put")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.put))return"put: string expected"}if(message.post!=null&&message.hasOwnProperty("post")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.post))return"post: string expected"}if(message["delete"]!=null&&message.hasOwnProperty("delete")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message["delete"]))return"delete: string expected"}if(message.patch!=null&&message.hasOwnProperty("patch")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;if(!$util.isString(message.patch))return"patch: string expected"}if(message.custom!=null&&message.hasOwnProperty("custom")){if(properties.pattern===1)return"pattern: multiple values";properties.pattern=1;{var error=$root.google.api.CustomHttpPattern.verify(message.custom,long+1);if(error)return"custom."+error}}if(message.body!=null&&message.hasOwnProperty("body"))if(!$util.isString(message.body))return"body: string expected";if(message.responseBody!=null&&message.hasOwnProperty("responseBody"))if(!$util.isString(message.responseBody))return"responseBody: string expected";if(message.additionalBindings!=null&&message.hasOwnProperty("additionalBindings")){if(!Array.isArray(message.additionalBindings))return"additionalBindings: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.HttpRule;if(object.selector!=null)message.selector=String(object.selector);if(object.get!=null)message.get=String(object.get);if(object.put!=null)message.put=String(object.put);if(object.post!=null)message.post=String(object.post);if(object["delete"]!=null)message["delete"]=String(object["delete"]);if(object.patch!=null)message.patch=String(object.patch);if(object.custom!=null){if(typeof object.custom!=="object")throw TypeError(".google.api.HttpRule.custom: object expected");message.custom=$root.google.api.CustomHttpPattern.fromObject(object.custom,long+1)}if(object.body!=null)message.body=String(object.body);if(object.responseBody!=null)message.responseBody=String(object.responseBody);if(object.additionalBindings){if(!Array.isArray(object.additionalBindings))throw TypeError(".google.api.HttpRule.additionalBindings: array expected");message.additionalBindings=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CustomHttpPattern;while(reader.pos>>3){case 1:{message.kind=reader.string();break}case 2:{message.path=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CustomHttpPattern.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CustomHttpPattern.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.kind!=null&&message.hasOwnProperty("kind"))if(!$util.isString(message.kind))return"kind: string expected";if(message.path!=null&&message.hasOwnProperty("path"))if(!$util.isString(message.path))return"path: string expected";return null};CustomHttpPattern.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.CustomHttpPattern)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CustomHttpPattern;if(object.kind!=null)message.kind=String(object.kind);if(object.path!=null)message.path=String(object.path);return message};CustomHttpPattern.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.kind="";object.path=""}if(message.kind!=null&&message.hasOwnProperty("kind"))object.kind=message.kind;if(message.path!=null&&message.hasOwnProperty("path"))object.path=message.path;return object};CustomHttpPattern.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CustomHttpPattern.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.CustomHttpPattern"};return CustomHttpPattern}();api.CommonLanguageSettings=function(){function CommonLanguageSettings(properties){this.destinations=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CommonLanguageSettings;while(reader.pos>>3){case 1:{message.referenceDocsUri=reader.string();break}case 2:{if(!(message.destinations&&message.destinations.length))message.destinations=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.referenceDocsUri!=null&&message.hasOwnProperty("referenceDocsUri"))if(!$util.isString(message.referenceDocsUri))return"referenceDocsUri: string expected";if(message.destinations!=null&&message.hasOwnProperty("destinations")){if(!Array.isArray(message.destinations))return"destinations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CommonLanguageSettings;if(object.referenceDocsUri!=null)message.referenceDocsUri=String(object.referenceDocsUri);if(object.destinations){if(!Array.isArray(object.destinations))throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");message.destinations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ClientLibrarySettings;while(reader.pos>>3){case 1:{message.version=reader.string();break}case 2:{message.launchStage=reader.int32();break}case 3:{message.restNumericEnums=reader.bool();break}case 21:{message.javaSettings=$root.google.api.JavaSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 22:{message.cppSettings=$root.google.api.CppSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 23:{message.phpSettings=$root.google.api.PhpSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 24:{message.pythonSettings=$root.google.api.PythonSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 25:{message.nodeSettings=$root.google.api.NodeSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 26:{message.dotnetSettings=$root.google.api.DotnetSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 27:{message.rubySettings=$root.google.api.RubySettings.decode(reader,reader.uint32(),undefined,long+1);break}case 28:{message.goSettings=$root.google.api.GoSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ClientLibrarySettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ClientLibrarySettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.version!=null&&message.hasOwnProperty("version"))if(!$util.isString(message.version))return"version: string expected";if(message.launchStage!=null&&message.hasOwnProperty("launchStage"))switch(message.launchStage){default:return"launchStage: enum value expected";case 0:case 6:case 7:case 1:case 2:case 3:case 4:case 5:break}if(message.restNumericEnums!=null&&message.hasOwnProperty("restNumericEnums"))if(typeof message.restNumericEnums!=="boolean")return"restNumericEnums: boolean expected";if(message.javaSettings!=null&&message.hasOwnProperty("javaSettings")){var error=$root.google.api.JavaSettings.verify(message.javaSettings,long+1);if(error)return"javaSettings."+error}if(message.cppSettings!=null&&message.hasOwnProperty("cppSettings")){var error=$root.google.api.CppSettings.verify(message.cppSettings,long+1);if(error)return"cppSettings."+error}if(message.phpSettings!=null&&message.hasOwnProperty("phpSettings")){var error=$root.google.api.PhpSettings.verify(message.phpSettings,long+1);if(error)return"phpSettings."+error}if(message.pythonSettings!=null&&message.hasOwnProperty("pythonSettings")){var error=$root.google.api.PythonSettings.verify(message.pythonSettings,long+1);if(error)return"pythonSettings."+error}if(message.nodeSettings!=null&&message.hasOwnProperty("nodeSettings")){var error=$root.google.api.NodeSettings.verify(message.nodeSettings,long+1);if(error)return"nodeSettings."+error}if(message.dotnetSettings!=null&&message.hasOwnProperty("dotnetSettings")){var error=$root.google.api.DotnetSettings.verify(message.dotnetSettings,long+1);if(error)return"dotnetSettings."+error}if(message.rubySettings!=null&&message.hasOwnProperty("rubySettings")){var error=$root.google.api.RubySettings.verify(message.rubySettings,long+1);if(error)return"rubySettings."+error}if(message.goSettings!=null&&message.hasOwnProperty("goSettings")){var error=$root.google.api.GoSettings.verify(message.goSettings,long+1);if(error)return"goSettings."+error}return null};ClientLibrarySettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.ClientLibrarySettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ClientLibrarySettings;if(object.version!=null)message.version=String(object.version);switch(object.launchStage){default:if(typeof object.launchStage==="number"){message.launchStage=object.launchStage;break}break;case"LAUNCH_STAGE_UNSPECIFIED":case 0:message.launchStage=0;break;case"UNIMPLEMENTED":case 6:message.launchStage=6;break;case"PRELAUNCH":case 7:message.launchStage=7;break;case"EARLY_ACCESS":case 1:message.launchStage=1;break;case"ALPHA":case 2:message.launchStage=2;break;case"BETA":case 3:message.launchStage=3;break;case"GA":case 4:message.launchStage=4;break;case"DEPRECATED":case 5:message.launchStage=5;break}if(object.restNumericEnums!=null)message.restNumericEnums=Boolean(object.restNumericEnums);if(object.javaSettings!=null){if(typeof object.javaSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");message.javaSettings=$root.google.api.JavaSettings.fromObject(object.javaSettings,long+1)}if(object.cppSettings!=null){if(typeof object.cppSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");message.cppSettings=$root.google.api.CppSettings.fromObject(object.cppSettings,long+1)}if(object.phpSettings!=null){if(typeof object.phpSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");message.phpSettings=$root.google.api.PhpSettings.fromObject(object.phpSettings,long+1)}if(object.pythonSettings!=null){if(typeof object.pythonSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");message.pythonSettings=$root.google.api.PythonSettings.fromObject(object.pythonSettings,long+1)}if(object.nodeSettings!=null){if(typeof object.nodeSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");message.nodeSettings=$root.google.api.NodeSettings.fromObject(object.nodeSettings,long+1)}if(object.dotnetSettings!=null){if(typeof object.dotnetSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");message.dotnetSettings=$root.google.api.DotnetSettings.fromObject(object.dotnetSettings,long+1)}if(object.rubySettings!=null){if(typeof object.rubySettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");message.rubySettings=$root.google.api.RubySettings.fromObject(object.rubySettings,long+1)}if(object.goSettings!=null){if(typeof object.goSettings!=="object")throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");message.goSettings=$root.google.api.GoSettings.fromObject(object.goSettings,long+1)}return message};ClientLibrarySettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.version="";object.launchStage=options.enums===String?"LAUNCH_STAGE_UNSPECIFIED":0;object.restNumericEnums=false;object.javaSettings=null;object.cppSettings=null;object.phpSettings=null;object.pythonSettings=null;object.nodeSettings=null;object.dotnetSettings=null;object.rubySettings=null;object.goSettings=null}if(message.version!=null&&message.hasOwnProperty("version"))object.version=message.version;if(message.launchStage!=null&&message.hasOwnProperty("launchStage"))object.launchStage=options.enums===String?$root.google.api.LaunchStage[message.launchStage]===undefined?message.launchStage:$root.google.api.LaunchStage[message.launchStage]:message.launchStage;if(message.restNumericEnums!=null&&message.hasOwnProperty("restNumericEnums"))object.restNumericEnums=message.restNumericEnums;if(message.javaSettings!=null&&message.hasOwnProperty("javaSettings"))object.javaSettings=$root.google.api.JavaSettings.toObject(message.javaSettings,options);if(message.cppSettings!=null&&message.hasOwnProperty("cppSettings"))object.cppSettings=$root.google.api.CppSettings.toObject(message.cppSettings,options);if(message.phpSettings!=null&&message.hasOwnProperty("phpSettings"))object.phpSettings=$root.google.api.PhpSettings.toObject(message.phpSettings,options);if(message.pythonSettings!=null&&message.hasOwnProperty("pythonSettings"))object.pythonSettings=$root.google.api.PythonSettings.toObject(message.pythonSettings,options);if(message.nodeSettings!=null&&message.hasOwnProperty("nodeSettings"))object.nodeSettings=$root.google.api.NodeSettings.toObject(message.nodeSettings,options);if(message.dotnetSettings!=null&&message.hasOwnProperty("dotnetSettings"))object.dotnetSettings=$root.google.api.DotnetSettings.toObject(message.dotnetSettings,options);if(message.rubySettings!=null&&message.hasOwnProperty("rubySettings"))object.rubySettings=$root.google.api.RubySettings.toObject(message.rubySettings,options);if(message.goSettings!=null&&message.hasOwnProperty("goSettings"))object.goSettings=$root.google.api.GoSettings.toObject(message.goSettings,options);return object};ClientLibrarySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClientLibrarySettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.ClientLibrarySettings"};return ClientLibrarySettings}();api.Publishing=function(){function Publishing(properties){this.methodSettings=[];this.codeownerGithubTeams=[];this.librarySettings=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.Publishing;while(reader.pos>>3){case 2:{if(!(message.methodSettings&&message.methodSettings.length))message.methodSettings=[];message.methodSettings.push($root.google.api.MethodSettings.decode(reader,reader.uint32(),undefined,long+1));break}case 101:{message.newIssueUri=reader.string();break}case 102:{message.documentationUri=reader.string();break}case 103:{message.apiShortName=reader.string();break}case 104:{message.githubLabel=reader.string();break}case 105:{if(!(message.codeownerGithubTeams&&message.codeownerGithubTeams.length))message.codeownerGithubTeams=[];message.codeownerGithubTeams.push(reader.string());break}case 106:{message.docTagPrefix=reader.string();break}case 107:{message.organization=reader.int32();break}case 109:{if(!(message.librarySettings&&message.librarySettings.length))message.librarySettings=[];message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader,reader.uint32(),undefined,long+1));break}case 110:{message.protoReferenceDocumentationUri=reader.string();break}case 111:{message.restReferenceDocumentationUri=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};Publishing.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Publishing.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.methodSettings!=null&&message.hasOwnProperty("methodSettings")){if(!Array.isArray(message.methodSettings))return"methodSettings: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.Publishing;if(object.methodSettings){if(!Array.isArray(object.methodSettings))throw TypeError(".google.api.Publishing.methodSettings: array expected");message.methodSettings=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.JavaSettings,key,value;while(reader.pos>>3){case 1:{message.libraryPackage=reader.string();break}case 2:{if(message.serviceClassNames===$util.emptyObject)message.serviceClassNames={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.serviceClassNames,key);message.serviceClassNames[key]=value;break}case 3:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};JavaSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};JavaSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))if(!$util.isString(message.libraryPackage))return"libraryPackage: string expected";if(message.serviceClassNames!=null&&message.hasOwnProperty("serviceClassNames")){if(!$util.isObject(message.serviceClassNames))return"serviceClassNames: object expected";var key=Object.keys(message.serviceClassNames);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.JavaSettings;if(object.libraryPackage!=null)message.libraryPackage=String(object.libraryPackage);if(object.serviceClassNames){if(typeof object.serviceClassNames!=="object")throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");message.serviceClassNames={};for(var keys=Object.keys(object.serviceClassNames),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.CppSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};CppSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CppSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};CppSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.CppSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.CppSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.CppSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};CppSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};CppSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CppSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.CppSettings"};return CppSettings}();api.PhpSettings=function(){function PhpSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PhpSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.libraryPackage=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};PhpSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PhpSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))if(!$util.isString(message.libraryPackage))return"libraryPackage: string expected";return null};PhpSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PhpSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PhpSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.PhpSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.libraryPackage!=null)message.libraryPackage=String(object.libraryPackage);return message};PhpSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.common=null;object.libraryPackage=""}if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);if(message.libraryPackage!=null&&message.hasOwnProperty("libraryPackage"))object.libraryPackage=message.libraryPackage;return object};PhpSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PhpSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PhpSettings"};return PhpSettings}();api.PythonSettings=function(){function PythonSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PythonSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};PythonSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};PythonSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.experimentalFeatures!=null&&message.hasOwnProperty("experimentalFeatures")){var error=$root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures,long+1);if(error)return"experimentalFeatures."+error}return null};PythonSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PythonSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PythonSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.PythonSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.experimentalFeatures!=null){if(typeof object.experimentalFeatures!=="object")throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected");message.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures,long+1)}return message};PythonSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.common=null;object.experimentalFeatures=null}if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);if(message.experimentalFeatures!=null&&message.hasOwnProperty("experimentalFeatures"))object.experimentalFeatures=$root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures,options);return object};PythonSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PythonSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PythonSettings"};PythonSettings.ExperimentalFeatures=function(){function ExperimentalFeatures(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.PythonSettings.ExperimentalFeatures;while(reader.pos>>3){case 1:{message.restAsyncIoEnabled=reader.bool();break}case 2:{message.protobufPythonicTypesEnabled=reader.bool();break}case 3:{message.unversionedPackageDisabled=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ExperimentalFeatures.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExperimentalFeatures.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.restAsyncIoEnabled!=null&&message.hasOwnProperty("restAsyncIoEnabled"))if(typeof message.restAsyncIoEnabled!=="boolean")return"restAsyncIoEnabled: boolean expected";if(message.protobufPythonicTypesEnabled!=null&&message.hasOwnProperty("protobufPythonicTypesEnabled"))if(typeof message.protobufPythonicTypesEnabled!=="boolean")return"protobufPythonicTypesEnabled: boolean expected";if(message.unversionedPackageDisabled!=null&&message.hasOwnProperty("unversionedPackageDisabled"))if(typeof message.unversionedPackageDisabled!=="boolean")return"unversionedPackageDisabled: boolean expected";return null};ExperimentalFeatures.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.PythonSettings.ExperimentalFeatures)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.PythonSettings.ExperimentalFeatures;if(object.restAsyncIoEnabled!=null)message.restAsyncIoEnabled=Boolean(object.restAsyncIoEnabled);if(object.protobufPythonicTypesEnabled!=null)message.protobufPythonicTypesEnabled=Boolean(object.protobufPythonicTypesEnabled);if(object.unversionedPackageDisabled!=null)message.unversionedPackageDisabled=Boolean(object.unversionedPackageDisabled);return message};ExperimentalFeatures.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.restAsyncIoEnabled=false;object.protobufPythonicTypesEnabled=false;object.unversionedPackageDisabled=false}if(message.restAsyncIoEnabled!=null&&message.hasOwnProperty("restAsyncIoEnabled"))object.restAsyncIoEnabled=message.restAsyncIoEnabled;if(message.protobufPythonicTypesEnabled!=null&&message.hasOwnProperty("protobufPythonicTypesEnabled"))object.protobufPythonicTypesEnabled=message.protobufPythonicTypesEnabled;if(message.unversionedPackageDisabled!=null&&message.hasOwnProperty("unversionedPackageDisabled"))object.unversionedPackageDisabled=message.unversionedPackageDisabled;return object};ExperimentalFeatures.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ExperimentalFeatures.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.PythonSettings.ExperimentalFeatures"};return ExperimentalFeatures}();return PythonSettings}();api.NodeSettings=function(){function NodeSettings(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.NodeSettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};NodeSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NodeSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};NodeSettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.NodeSettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.NodeSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.NodeSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};NodeSettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};NodeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NodeSettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.NodeSettings"};return NodeSettings}();api.DotnetSettings=function(){function DotnetSettings(properties){this.renamedServices={};this.renamedResources={};this.ignoredResources=[];this.forcedNamespaceAliases=[];this.handwrittenSignatures=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.DotnetSettings,key,value;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{if(message.renamedServices===$util.emptyObject)message.renamedServices={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedServices,key);message.renamedServices[key]=value;break}case 3:{if(message.renamedResources===$util.emptyObject)message.renamedResources={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedResources,key);message.renamedResources[key]=value;break}case 4:{if(!(message.ignoredResources&&message.ignoredResources.length))message.ignoredResources=[];message.ignoredResources.push(reader.string());break}case 5:{if(!(message.forcedNamespaceAliases&&message.forcedNamespaceAliases.length))message.forcedNamespaceAliases=[];message.forcedNamespaceAliases.push(reader.string());break}case 6:{if(!(message.handwrittenSignatures&&message.handwrittenSignatures.length))message.handwrittenSignatures=[];message.handwrittenSignatures.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};DotnetSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DotnetSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.renamedServices!=null&&message.hasOwnProperty("renamedServices")){if(!$util.isObject(message.renamedServices))return"renamedServices: object expected";var key=Object.keys(message.renamedServices);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.DotnetSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.DotnetSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.renamedServices){if(typeof object.renamedServices!=="object")throw TypeError(".google.api.DotnetSettings.renamedServices: object expected");message.renamedServices={};for(var keys=Object.keys(object.renamedServices),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.RubySettings;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};RubySettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};RubySettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}return null};RubySettings.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.RubySettings)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.RubySettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.RubySettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}return message};RubySettings.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.common=null;if(message.common!=null&&message.hasOwnProperty("common"))object.common=$root.google.api.CommonLanguageSettings.toObject(message.common,options);return object};RubySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RubySettings.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.RubySettings"};return RubySettings}();api.GoSettings=function(){function GoSettings(properties){this.renamedServices={};if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.GoSettings,key,value;while(reader.pos>>3){case 1:{message.common=$root.google.api.CommonLanguageSettings.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{if(message.renamedServices===$util.emptyObject)message.renamedServices={};var end2=reader.uint32()+reader.pos;key="";value="";while(reader.pos>>3){case 1:key=reader.string();break;case 2:value=reader.string();break;default:reader.skipType(tag2&7,long);break}}if(key==="__proto__")$util.makeProp(message.renamedServices,key);message.renamedServices[key]=value;break}default:reader.skipType(tag&7,long);break}}return message};GoSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GoSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.common!=null&&message.hasOwnProperty("common")){var error=$root.google.api.CommonLanguageSettings.verify(message.common,long+1);if(error)return"common."+error}if(message.renamedServices!=null&&message.hasOwnProperty("renamedServices")){if(!$util.isObject(message.renamedServices))return"renamedServices: object expected";var key=Object.keys(message.renamedServices);for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.GoSettings;if(object.common!=null){if(typeof object.common!=="object")throw TypeError(".google.api.GoSettings.common: object expected");message.common=$root.google.api.CommonLanguageSettings.fromObject(object.common,long+1)}if(object.renamedServices){if(typeof object.renamedServices!=="object")throw TypeError(".google.api.GoSettings.renamedServices: object expected");message.renamedServices={};for(var keys=Object.keys(object.renamedServices),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.MethodSettings;while(reader.pos>>3){case 1:{message.selector=reader.string();break}case 2:{message.longRunning=$root.google.api.MethodSettings.LongRunning.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{if(!(message.autoPopulatedFields&&message.autoPopulatedFields.length))message.autoPopulatedFields=[];message.autoPopulatedFields.push(reader.string());break}case 4:{message.batching=$root.google.api.BatchingConfigProto.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MethodSettings.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodSettings.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.selector!=null&&message.hasOwnProperty("selector"))if(!$util.isString(message.selector))return"selector: string expected";if(message.longRunning!=null&&message.hasOwnProperty("longRunning")){var error=$root.google.api.MethodSettings.LongRunning.verify(message.longRunning,long+1);if(error)return"longRunning."+error}if(message.autoPopulatedFields!=null&&message.hasOwnProperty("autoPopulatedFields")){if(!Array.isArray(message.autoPopulatedFields))return"autoPopulatedFields: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.MethodSettings;if(object.selector!=null)message.selector=String(object.selector);if(object.longRunning!=null){if(typeof object.longRunning!=="object")throw TypeError(".google.api.MethodSettings.longRunning: object expected");message.longRunning=$root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning,long+1)}if(object.autoPopulatedFields){if(!Array.isArray(object.autoPopulatedFields))throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected");message.autoPopulatedFields=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.MethodSettings.LongRunning;while(reader.pos>>3){case 1:{message.initialPollDelay=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.pollDelayMultiplier=reader.float();break}case 3:{message.maxPollDelay=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.totalPollTimeout=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};LongRunning.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};LongRunning.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.initialPollDelay!=null&&message.hasOwnProperty("initialPollDelay")){var error=$root.google.protobuf.Duration.verify(message.initialPollDelay,long+1);if(error)return"initialPollDelay."+error}if(message.pollDelayMultiplier!=null&&message.hasOwnProperty("pollDelayMultiplier"))if(typeof message.pollDelayMultiplier!=="number")return"pollDelayMultiplier: number expected";if(message.maxPollDelay!=null&&message.hasOwnProperty("maxPollDelay")){var error=$root.google.protobuf.Duration.verify(message.maxPollDelay,long+1);if(error)return"maxPollDelay."+error}if(message.totalPollTimeout!=null&&message.hasOwnProperty("totalPollTimeout")){var error=$root.google.protobuf.Duration.verify(message.totalPollTimeout,long+1);if(error)return"totalPollTimeout."+error}return null};LongRunning.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.MethodSettings.LongRunning)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.MethodSettings.LongRunning;if(object.initialPollDelay!=null){if(typeof object.initialPollDelay!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");message.initialPollDelay=$root.google.protobuf.Duration.fromObject(object.initialPollDelay,long+1)}if(object.pollDelayMultiplier!=null)message.pollDelayMultiplier=Number(object.pollDelayMultiplier);if(object.maxPollDelay!=null){if(typeof object.maxPollDelay!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");message.maxPollDelay=$root.google.protobuf.Duration.fromObject(object.maxPollDelay,long+1)}if(object.totalPollTimeout!=null){if(typeof object.totalPollTimeout!=="object")throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");message.totalPollTimeout=$root.google.protobuf.Duration.fromObject(object.totalPollTimeout,long+1)}return message};LongRunning.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.initialPollDelay=null;object.pollDelayMultiplier=0;object.maxPollDelay=null;object.totalPollTimeout=null}if(message.initialPollDelay!=null&&message.hasOwnProperty("initialPollDelay"))object.initialPollDelay=$root.google.protobuf.Duration.toObject(message.initialPollDelay,options);if(message.pollDelayMultiplier!=null&&message.hasOwnProperty("pollDelayMultiplier"))object.pollDelayMultiplier=options.json&&!isFinite(message.pollDelayMultiplier)?String(message.pollDelayMultiplier):message.pollDelayMultiplier;if(message.maxPollDelay!=null&&message.hasOwnProperty("maxPollDelay"))object.maxPollDelay=$root.google.protobuf.Duration.toObject(message.maxPollDelay,options);if(message.totalPollTimeout!=null&&message.hasOwnProperty("totalPollTimeout"))object.totalPollTimeout=$root.google.protobuf.Duration.toObject(message.totalPollTimeout,options);return object};LongRunning.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};LongRunning.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.MethodSettings.LongRunning"};return LongRunning}();return MethodSettings}();api.ClientLibraryOrganization=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"]=0;values[valuesById[1]="CLOUD"]=1;values[valuesById[2]="ADS"]=2;values[valuesById[3]="PHOTOS"]=3;values[valuesById[4]="STREET_VIEW"]=4;values[valuesById[5]="SHOPPING"]=5;values[valuesById[6]="GEO"]=6;values[valuesById[7]="GENERATIVE_AI"]=7;return values}();api.ClientLibraryDestination=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"]=0;values[valuesById[10]="GITHUB"]=10;values[valuesById[20]="PACKAGE_MANAGER"]=20;return values}();api.SelectiveGapicGeneration=function(){function SelectiveGapicGeneration(properties){this.methods=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.SelectiveGapicGeneration;while(reader.pos>>3){case 1:{if(!(message.methods&&message.methods.length))message.methods=[];message.methods.push(reader.string());break}case 2:{message.generateOmittedAsInternal=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};SelectiveGapicGeneration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SelectiveGapicGeneration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.methods!=null&&message.hasOwnProperty("methods")){if(!Array.isArray(message.methods))return"methods: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.SelectiveGapicGeneration;if(object.methods){if(!Array.isArray(object.methods))throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected");message.methods=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingConfigProto;while(reader.pos>>3){case 1:{message.thresholds=$root.google.api.BatchingSettingsProto.decode(reader,reader.uint32(),undefined,long+1);break}case 2:{message.batchDescriptor=$root.google.api.BatchingDescriptorProto.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};BatchingConfigProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingConfigProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.thresholds!=null&&message.hasOwnProperty("thresholds")){var error=$root.google.api.BatchingSettingsProto.verify(message.thresholds,long+1);if(error)return"thresholds."+error}if(message.batchDescriptor!=null&&message.hasOwnProperty("batchDescriptor")){var error=$root.google.api.BatchingDescriptorProto.verify(message.batchDescriptor,long+1);if(error)return"batchDescriptor."+error}return null};BatchingConfigProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.BatchingConfigProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingConfigProto;if(object.thresholds!=null){if(typeof object.thresholds!=="object")throw TypeError(".google.api.BatchingConfigProto.thresholds: object expected");message.thresholds=$root.google.api.BatchingSettingsProto.fromObject(object.thresholds,long+1)}if(object.batchDescriptor!=null){if(typeof object.batchDescriptor!=="object")throw TypeError(".google.api.BatchingConfigProto.batchDescriptor: object expected");message.batchDescriptor=$root.google.api.BatchingDescriptorProto.fromObject(object.batchDescriptor,long+1)}return message};BatchingConfigProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.thresholds=null;object.batchDescriptor=null}if(message.thresholds!=null&&message.hasOwnProperty("thresholds"))object.thresholds=$root.google.api.BatchingSettingsProto.toObject(message.thresholds,options);if(message.batchDescriptor!=null&&message.hasOwnProperty("batchDescriptor"))object.batchDescriptor=$root.google.api.BatchingDescriptorProto.toObject(message.batchDescriptor,options);return object};BatchingConfigProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BatchingConfigProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.BatchingConfigProto"};return BatchingConfigProto}();api.BatchingSettingsProto=function(){function BatchingSettingsProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingSettingsProto;while(reader.pos>>3){case 1:{message.elementCountThreshold=reader.int32();break}case 2:{message.requestByteThreshold=reader.int64();break}case 3:{message.delayThreshold=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{message.elementCountLimit=reader.int32();break}case 5:{message.requestByteLimit=reader.int32();break}case 6:{message.flowControlElementLimit=reader.int32();break}case 7:{message.flowControlByteLimit=reader.int32();break}case 8:{message.flowControlLimitExceededBehavior=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};BatchingSettingsProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingSettingsProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.elementCountThreshold!=null&&message.hasOwnProperty("elementCountThreshold"))if(!$util.isInteger(message.elementCountThreshold))return"elementCountThreshold: integer expected";if(message.requestByteThreshold!=null&&message.hasOwnProperty("requestByteThreshold"))if(!$util.isInteger(message.requestByteThreshold)&&!(message.requestByteThreshold&&$util.isInteger(message.requestByteThreshold.low)&&$util.isInteger(message.requestByteThreshold.high)))return"requestByteThreshold: integer|Long expected";if(message.delayThreshold!=null&&message.hasOwnProperty("delayThreshold")){var error=$root.google.protobuf.Duration.verify(message.delayThreshold,long+1);if(error)return"delayThreshold."+error}if(message.elementCountLimit!=null&&message.hasOwnProperty("elementCountLimit"))if(!$util.isInteger(message.elementCountLimit))return"elementCountLimit: integer expected";if(message.requestByteLimit!=null&&message.hasOwnProperty("requestByteLimit"))if(!$util.isInteger(message.requestByteLimit))return"requestByteLimit: integer expected";if(message.flowControlElementLimit!=null&&message.hasOwnProperty("flowControlElementLimit"))if(!$util.isInteger(message.flowControlElementLimit))return"flowControlElementLimit: integer expected";if(message.flowControlByteLimit!=null&&message.hasOwnProperty("flowControlByteLimit"))if(!$util.isInteger(message.flowControlByteLimit))return"flowControlByteLimit: integer expected";if(message.flowControlLimitExceededBehavior!=null&&message.hasOwnProperty("flowControlLimitExceededBehavior"))switch(message.flowControlLimitExceededBehavior){default:return"flowControlLimitExceededBehavior: enum value expected";case 0:case 1:case 2:case 3:break}return null};BatchingSettingsProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.BatchingSettingsProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingSettingsProto;if(object.elementCountThreshold!=null)message.elementCountThreshold=object.elementCountThreshold|0;if(object.requestByteThreshold!=null)if($util.Long)(message.requestByteThreshold=$util.Long.fromValue(object.requestByteThreshold)).unsigned=false;else if(typeof object.requestByteThreshold==="string")message.requestByteThreshold=parseInt(object.requestByteThreshold,10);else if(typeof object.requestByteThreshold==="number")message.requestByteThreshold=object.requestByteThreshold;else if(typeof object.requestByteThreshold==="object")message.requestByteThreshold=new $util.LongBits(object.requestByteThreshold.low>>>0,object.requestByteThreshold.high>>>0).toNumber();if(object.delayThreshold!=null){if(typeof object.delayThreshold!=="object")throw TypeError(".google.api.BatchingSettingsProto.delayThreshold: object expected");message.delayThreshold=$root.google.protobuf.Duration.fromObject(object.delayThreshold,long+1)}if(object.elementCountLimit!=null)message.elementCountLimit=object.elementCountLimit|0;if(object.requestByteLimit!=null)message.requestByteLimit=object.requestByteLimit|0;if(object.flowControlElementLimit!=null)message.flowControlElementLimit=object.flowControlElementLimit|0;if(object.flowControlByteLimit!=null)message.flowControlByteLimit=object.flowControlByteLimit|0;switch(object.flowControlLimitExceededBehavior){default:if(typeof object.flowControlLimitExceededBehavior==="number"){message.flowControlLimitExceededBehavior=object.flowControlLimitExceededBehavior;break}break;case"UNSET_BEHAVIOR":case 0:message.flowControlLimitExceededBehavior=0;break;case"THROW_EXCEPTION":case 1:message.flowControlLimitExceededBehavior=1;break;case"BLOCK":case 2:message.flowControlLimitExceededBehavior=2;break;case"IGNORE":case 3:message.flowControlLimitExceededBehavior=3;break}return message};BatchingSettingsProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.elementCountThreshold=0;if($util.Long){var long=new $util.Long(0,0,false);object.requestByteThreshold=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.requestByteThreshold=options.longs===String?"0":0;object.delayThreshold=null;object.elementCountLimit=0;object.requestByteLimit=0;object.flowControlElementLimit=0;object.flowControlByteLimit=0;object.flowControlLimitExceededBehavior=options.enums===String?"UNSET_BEHAVIOR":0}if(message.elementCountThreshold!=null&&message.hasOwnProperty("elementCountThreshold"))object.elementCountThreshold=message.elementCountThreshold;if(message.requestByteThreshold!=null&&message.hasOwnProperty("requestByteThreshold"))if(typeof message.requestByteThreshold==="number")object.requestByteThreshold=options.longs===String?String(message.requestByteThreshold):message.requestByteThreshold;else object.requestByteThreshold=options.longs===String?$util.Long.prototype.toString.call(message.requestByteThreshold):options.longs===Number?new $util.LongBits(message.requestByteThreshold.low>>>0,message.requestByteThreshold.high>>>0).toNumber():message.requestByteThreshold;if(message.delayThreshold!=null&&message.hasOwnProperty("delayThreshold"))object.delayThreshold=$root.google.protobuf.Duration.toObject(message.delayThreshold,options);if(message.elementCountLimit!=null&&message.hasOwnProperty("elementCountLimit"))object.elementCountLimit=message.elementCountLimit;if(message.requestByteLimit!=null&&message.hasOwnProperty("requestByteLimit"))object.requestByteLimit=message.requestByteLimit;if(message.flowControlElementLimit!=null&&message.hasOwnProperty("flowControlElementLimit"))object.flowControlElementLimit=message.flowControlElementLimit;if(message.flowControlByteLimit!=null&&message.hasOwnProperty("flowControlByteLimit"))object.flowControlByteLimit=message.flowControlByteLimit;if(message.flowControlLimitExceededBehavior!=null&&message.hasOwnProperty("flowControlLimitExceededBehavior"))object.flowControlLimitExceededBehavior=options.enums===String?$root.google.api.FlowControlLimitExceededBehaviorProto[message.flowControlLimitExceededBehavior]===undefined?message.flowControlLimitExceededBehavior:$root.google.api.FlowControlLimitExceededBehaviorProto[message.flowControlLimitExceededBehavior]:message.flowControlLimitExceededBehavior;return object};BatchingSettingsProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BatchingSettingsProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.BatchingSettingsProto"};return BatchingSettingsProto}();api.FlowControlLimitExceededBehaviorProto=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_BEHAVIOR"]=0;values[valuesById[1]="THROW_EXCEPTION"]=1;values[valuesById[2]="BLOCK"]=2;values[valuesById[3]="IGNORE"]=3;return values}();api.BatchingDescriptorProto=function(){function BatchingDescriptorProto(properties){this.discriminatorFields=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.BatchingDescriptorProto;while(reader.pos>>3){case 1:{message.batchedField=reader.string();break}case 2:{if(!(message.discriminatorFields&&message.discriminatorFields.length))message.discriminatorFields=[];message.discriminatorFields.push(reader.string());break}case 3:{message.subresponseField=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};BatchingDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BatchingDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.batchedField!=null&&message.hasOwnProperty("batchedField"))if(!$util.isString(message.batchedField))return"batchedField: string expected";if(message.discriminatorFields!=null&&message.hasOwnProperty("discriminatorFields")){if(!Array.isArray(message.discriminatorFields))return"discriminatorFields: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.BatchingDescriptorProto;if(object.batchedField!=null)message.batchedField=String(object.batchedField);if(object.discriminatorFields){if(!Array.isArray(object.discriminatorFields))throw TypeError(".google.api.BatchingDescriptorProto.discriminatorFields: array expected");message.discriminatorFields=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.FieldInfo;while(reader.pos>>3){case 1:{message.format=reader.int32();break}case 2:{if(!(message.referencedTypes&&message.referencedTypes.length))message.referencedTypes=[];message.referencedTypes.push($root.google.api.TypeReference.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FieldInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.format!=null&&message.hasOwnProperty("format"))switch(message.format){default:return"format: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.referencedTypes!=null&&message.hasOwnProperty("referencedTypes")){if(!Array.isArray(message.referencedTypes))return"referencedTypes: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.FieldInfo;switch(object.format){default:if(typeof object.format==="number"){message.format=object.format;break}break;case"FORMAT_UNSPECIFIED":case 0:message.format=0;break;case"UUID4":case 1:message.format=1;break;case"IPV4":case 2:message.format=2;break;case"IPV6":case 3:message.format=3;break;case"IPV4_OR_IPV6":case 4:message.format=4;break}if(object.referencedTypes){if(!Array.isArray(object.referencedTypes))throw TypeError(".google.api.FieldInfo.referencedTypes: array expected");message.referencedTypes=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.TypeReference;while(reader.pos>>3){case 1:{message.typeName=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};TypeReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};TypeReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.typeName!=null&&message.hasOwnProperty("typeName"))if(!$util.isString(message.typeName))return"typeName: string expected";return null};TypeReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.TypeReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.TypeReference;if(object.typeName!=null)message.typeName=String(object.typeName);return message};TypeReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.typeName="";if(message.typeName!=null&&message.hasOwnProperty("typeName"))object.typeName=message.typeName;return object};TypeReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TypeReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.TypeReference"};return TypeReference}();api.ResourceDescriptor=function(){function ResourceDescriptor(properties){this.pattern=[];this.style=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ResourceDescriptor;while(reader.pos>>3){case 1:{message.type=reader.string();break}case 2:{if(!(message.pattern&&message.pattern.length))message.pattern=[];message.pattern.push(reader.string());break}case 3:{message.nameField=reader.string();break}case 4:{message.history=reader.int32();break}case 5:{message.plural=reader.string();break}case 6:{message.singular=reader.string();break}case 10:{if(!(message.style&&message.style.length))message.style=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.pattern!=null&&message.hasOwnProperty("pattern")){if(!Array.isArray(message.pattern))return"pattern: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ResourceDescriptor;if(object.type!=null)message.type=String(object.type);if(object.pattern){if(!Array.isArray(object.pattern))throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");message.pattern=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.api.ResourceReference;while(reader.pos>>3){case 1:{message.type=reader.string();break}case 2:{message.childType=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ResourceReference.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ResourceReference.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.childType!=null&&message.hasOwnProperty("childType"))if(!$util.isString(message.childType))return"childType: string expected";return null};ResourceReference.fromObject=function fromObject(object,long){if(object instanceof $root.google.api.ResourceReference)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.api.ResourceReference;if(object.type!=null)message.type=String(object.type);if(object.childType!=null)message.childType=String(object.childType);return message};ResourceReference.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type="";object.childType=""}if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.childType!=null&&message.hasOwnProperty("childType"))object.childType=message.childType;return object};ResourceReference.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ResourceReference.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.api.ResourceReference"};return ResourceReference}();return api}();google.protobuf=function(){var protobuf={};protobuf.FileDescriptorSet=function(){function FileDescriptorSet(properties){this.file=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileDescriptorSet;while(reader.pos>>3){case 1:{if(!(message.file&&message.file.length))message.file=[];message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FileDescriptorSet.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FileDescriptorSet.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.file!=null&&message.hasOwnProperty("file")){if(!Array.isArray(message.file))return"file: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileDescriptorSet;if(object.file){if(!Array.isArray(object.file))throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");message.file=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message["package"]=reader.string();break}case 3:{if(!(message.dependency&&message.dependency.length))message.dependency=[];message.dependency.push(reader.string());break}case 10:{if(!(message.publicDependency&&message.publicDependency.length))message.publicDependency=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message["package"]!=null&&message.hasOwnProperty("package"))if(!$util.isString(message["package"]))return"package: string expected";if(message.dependency!=null&&message.hasOwnProperty("dependency")){if(!Array.isArray(message.dependency))return"dependency: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object["package"]!=null)message["package"]=String(object["package"]);if(object.dependency){if(!Array.isArray(object.dependency))throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");message.dependency=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.field&&message.field.length))message.field=[];message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 6:{if(!(message.extension&&message.extension.length))message.extension=[];message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{if(!(message.nestedType&&message.nestedType.length))message.nestedType=[];message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{if(!(message.enumType&&message.enumType.length))message.enumType=[];message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{if(!(message.extensionRange&&message.extensionRange.length))message.extensionRange=[];message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader,reader.uint32(),undefined,long+1));break}case 8:{if(!(message.oneofDecl&&message.oneofDecl.length))message.oneofDecl=[];message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 7:{message.options=$root.google.protobuf.MessageOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 9:{if(!(message.reservedRange&&message.reservedRange.length))message.reservedRange=[];message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader,reader.uint32(),undefined,long+1));break}case 10:{if(!(message.reservedName&&message.reservedName.length))message.reservedName=[];message.reservedName.push(reader.string());break}case 11:{message.visibility=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};DescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.field!=null&&message.hasOwnProperty("field")){if(!Array.isArray(message.field))return"field: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.field){if(!Array.isArray(object.field))throw TypeError(".google.protobuf.DescriptorProto.field: array expected");message.field=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto.ExtensionRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}case 3:{message.options=$root.google.protobuf.ExtensionRangeOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ExtensionRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExtensionRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.ExtensionRangeOptions.verify(message.options,long+1);if(error)return"options."+error}return null};ExtensionRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto.ExtensionRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");message.options=$root.google.protobuf.ExtensionRangeOptions.fromObject(object.options,long+1)}return message};ExtensionRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0;object.options=null}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.ExtensionRangeOptions.toObject(message.options,options);return object};ExtensionRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ExtensionRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DescriptorProto.ExtensionRange"};return ExtensionRange}();DescriptorProto.ReservedRange=function(){function ReservedRange(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DescriptorProto.ReservedRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};ReservedRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ReservedRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";return null};ReservedRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DescriptorProto.ReservedRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;return message};ReservedRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;return object};ReservedRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ReservedRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DescriptorProto.ReservedRange"};return ReservedRange}();return DescriptorProto}();protobuf.ExtensionRangeOptions=function(){function ExtensionRangeOptions(properties){this.uninterpretedOption=[];this.declaration=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ExtensionRangeOptions;while(reader.pos>>3){case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 2:{if(!(message.declaration&&message.declaration.length))message.declaration=[];message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader,reader.uint32(),undefined,long+1));break}case 50:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.verification=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};ExtensionRangeOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ExtensionRangeOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ExtensionRangeOptions;if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ExtensionRangeOptions.Declaration;while(reader.pos>>3){case 1:{message.number=reader.int32();break}case 2:{message.fullName=reader.string();break}case 3:{message.type=reader.string();break}case 5:{message.reserved=reader.bool();break}case 6:{message.repeated=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};Declaration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Declaration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.fullName!=null&&message.hasOwnProperty("fullName"))if(!$util.isString(message.fullName))return"fullName: string expected";if(message.type!=null&&message.hasOwnProperty("type"))if(!$util.isString(message.type))return"type: string expected";if(message.reserved!=null&&message.hasOwnProperty("reserved"))if(typeof message.reserved!=="boolean")return"reserved: boolean expected";if(message.repeated!=null&&message.hasOwnProperty("repeated"))if(typeof message.repeated!=="boolean")return"repeated: boolean expected";return null};Declaration.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ExtensionRangeOptions.Declaration;if(object.number!=null)message.number=object.number|0;if(object.fullName!=null)message.fullName=String(object.fullName);if(object.type!=null)message.type=String(object.type);if(object.reserved!=null)message.reserved=Boolean(object.reserved);if(object.repeated!=null)message.repeated=Boolean(object.repeated);return message};Declaration.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.number=0;object.fullName="";object.type="";object.reserved=false;object.repeated=false}if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.fullName!=null&&message.hasOwnProperty("fullName"))object.fullName=message.fullName;if(message.type!=null&&message.hasOwnProperty("type"))object.type=message.type;if(message.reserved!=null&&message.hasOwnProperty("reserved"))object.reserved=message.reserved;if(message.repeated!=null&&message.hasOwnProperty("repeated"))object.repeated=message.repeated;return object};Declaration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Declaration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.ExtensionRangeOptions.Declaration"};return Declaration}();ExtensionRangeOptions.VerificationState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DECLARATION"]=0;values[valuesById[1]="UNVERIFIED"]=1;return values}();return ExtensionRangeOptions}();protobuf.FieldDescriptorProto=function(){function FieldDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 3:{message.number=reader.int32();break}case 4:{message.label=reader.int32();break}case 5:{message.type=reader.int32();break}case 6:{message.typeName=reader.string();break}case 2:{message.extendee=reader.string();break}case 7:{message.defaultValue=reader.string();break}case 9:{message.oneofIndex=reader.int32();break}case 10:{message.jsonName=reader.string();break}case 8:{message.options=$root.google.protobuf.FieldOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 17:{message.proto3Optional=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};FieldDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.label!=null&&message.hasOwnProperty("label"))switch(message.label){default:return"label: enum value expected";case 1:case 3:case 2:break}if(message.type!=null&&message.hasOwnProperty("type"))switch(message.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:break}if(message.typeName!=null&&message.hasOwnProperty("typeName"))if(!$util.isString(message.typeName))return"typeName: string expected";if(message.extendee!=null&&message.hasOwnProperty("extendee"))if(!$util.isString(message.extendee))return"extendee: string expected";if(message.defaultValue!=null&&message.hasOwnProperty("defaultValue"))if(!$util.isString(message.defaultValue))return"defaultValue: string expected";if(message.oneofIndex!=null&&message.hasOwnProperty("oneofIndex"))if(!$util.isInteger(message.oneofIndex))return"oneofIndex: integer expected";if(message.jsonName!=null&&message.hasOwnProperty("jsonName"))if(!$util.isString(message.jsonName))return"jsonName: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.FieldOptions.verify(message.options,long+1);if(error)return"options."+error}if(message.proto3Optional!=null&&message.hasOwnProperty("proto3Optional"))if(typeof message.proto3Optional!=="boolean")return"proto3Optional: boolean expected";return null};FieldDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.number!=null)message.number=object.number|0;switch(object.label){default:if(typeof object.label==="number"){message.label=object.label;break}break;case"LABEL_OPTIONAL":case 1:message.label=1;break;case"LABEL_REPEATED":case 3:message.label=3;break;case"LABEL_REQUIRED":case 2:message.label=2;break}switch(object.type){default:if(typeof object.type==="number"){message.type=object.type;break}break;case"TYPE_DOUBLE":case 1:message.type=1;break;case"TYPE_FLOAT":case 2:message.type=2;break;case"TYPE_INT64":case 3:message.type=3;break;case"TYPE_UINT64":case 4:message.type=4;break;case"TYPE_INT32":case 5:message.type=5;break;case"TYPE_FIXED64":case 6:message.type=6;break;case"TYPE_FIXED32":case 7:message.type=7;break;case"TYPE_BOOL":case 8:message.type=8;break;case"TYPE_STRING":case 9:message.type=9;break;case"TYPE_GROUP":case 10:message.type=10;break;case"TYPE_MESSAGE":case 11:message.type=11;break;case"TYPE_BYTES":case 12:message.type=12;break;case"TYPE_UINT32":case 13:message.type=13;break;case"TYPE_ENUM":case 14:message.type=14;break;case"TYPE_SFIXED32":case 15:message.type=15;break;case"TYPE_SFIXED64":case 16:message.type=16;break;case"TYPE_SINT32":case 17:message.type=17;break;case"TYPE_SINT64":case 18:message.type=18;break}if(object.typeName!=null)message.typeName=String(object.typeName);if(object.extendee!=null)message.extendee=String(object.extendee);if(object.defaultValue!=null)message.defaultValue=String(object.defaultValue);if(object.oneofIndex!=null)message.oneofIndex=object.oneofIndex|0;if(object.jsonName!=null)message.jsonName=String(object.jsonName);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");message.options=$root.google.protobuf.FieldOptions.fromObject(object.options,long+1)}if(object.proto3Optional!=null)message.proto3Optional=Boolean(object.proto3Optional);return message};FieldDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.extendee="";object.number=0;object.label=options.enums===String?"LABEL_OPTIONAL":1;object.type=options.enums===String?"TYPE_DOUBLE":1;object.typeName="";object.defaultValue="";object.options=null;object.oneofIndex=0;object.jsonName="";object.proto3Optional=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.extendee!=null&&message.hasOwnProperty("extendee"))object.extendee=message.extendee;if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.label!=null&&message.hasOwnProperty("label"))object.label=options.enums===String?$root.google.protobuf.FieldDescriptorProto.Label[message.label]===undefined?message.label:$root.google.protobuf.FieldDescriptorProto.Label[message.label]:message.label;if(message.type!=null&&message.hasOwnProperty("type"))object.type=options.enums===String?$root.google.protobuf.FieldDescriptorProto.Type[message.type]===undefined?message.type:$root.google.protobuf.FieldDescriptorProto.Type[message.type]:message.type;if(message.typeName!=null&&message.hasOwnProperty("typeName"))object.typeName=message.typeName;if(message.defaultValue!=null&&message.hasOwnProperty("defaultValue"))object.defaultValue=message.defaultValue;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.FieldOptions.toObject(message.options,options);if(message.oneofIndex!=null&&message.hasOwnProperty("oneofIndex"))object.oneofIndex=message.oneofIndex;if(message.jsonName!=null&&message.hasOwnProperty("jsonName"))object.jsonName=message.jsonName;if(message.proto3Optional!=null&&message.hasOwnProperty("proto3Optional"))object.proto3Optional=message.proto3Optional;return object};FieldDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FieldDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldDescriptorProto"};FieldDescriptorProto.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[1]="TYPE_DOUBLE"]=1;values[valuesById[2]="TYPE_FLOAT"]=2;values[valuesById[3]="TYPE_INT64"]=3;values[valuesById[4]="TYPE_UINT64"]=4;values[valuesById[5]="TYPE_INT32"]=5;values[valuesById[6]="TYPE_FIXED64"]=6;values[valuesById[7]="TYPE_FIXED32"]=7;values[valuesById[8]="TYPE_BOOL"]=8;values[valuesById[9]="TYPE_STRING"]=9;values[valuesById[10]="TYPE_GROUP"]=10;values[valuesById[11]="TYPE_MESSAGE"]=11;values[valuesById[12]="TYPE_BYTES"]=12;values[valuesById[13]="TYPE_UINT32"]=13;values[valuesById[14]="TYPE_ENUM"]=14;values[valuesById[15]="TYPE_SFIXED32"]=15;values[valuesById[16]="TYPE_SFIXED64"]=16;values[valuesById[17]="TYPE_SINT32"]=17;values[valuesById[18]="TYPE_SINT64"]=18;return values}();FieldDescriptorProto.Label=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[1]="LABEL_OPTIONAL"]=1;values[valuesById[3]="LABEL_REPEATED"]=3;values[valuesById[2]="LABEL_REQUIRED"]=2;return values}();return FieldDescriptorProto}();protobuf.OneofDescriptorProto=function(){function OneofDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.OneofDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.options=$root.google.protobuf.OneofOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};OneofDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OneofDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.OneofOptions.verify(message.options,long+1);if(error)return"options."+error}return null};OneofDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.OneofDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.OneofDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");message.options=$root.google.protobuf.OneofOptions.fromObject(object.options,long+1)}return message};OneofDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.options=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.OneofOptions.toObject(message.options,options);return object};OneofDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OneofDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.OneofDescriptorProto"};return OneofDescriptorProto}();protobuf.EnumDescriptorProto=function(){function EnumDescriptorProto(properties){this.value=[];this.reservedRange=[];this.reservedName=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.value&&message.value.length))message.value=[];message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.options=$root.google.protobuf.EnumOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 4:{if(!(message.reservedRange&&message.reservedRange.length))message.reservedRange=[];message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader,reader.uint32(),undefined,long+1));break}case 5:{if(!(message.reservedName&&message.reservedName.length))message.reservedName=[];message.reservedName.push(reader.string());break}case 6:{message.visibility=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};EnumDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.value!=null&&message.hasOwnProperty("value")){if(!Array.isArray(message.value))return"value: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.value){if(!Array.isArray(object.value))throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");message.value=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange;while(reader.pos>>3){case 1:{message.start=reader.int32();break}case 2:{message.end=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};EnumReservedRange.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumReservedRange.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.start!=null&&message.hasOwnProperty("start"))if(!$util.isInteger(message.start))return"start: integer expected";if(message.end!=null&&message.hasOwnProperty("end"))if(!$util.isInteger(message.end))return"end: integer expected";return null};EnumReservedRange.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange;if(object.start!=null)message.start=object.start|0;if(object.end!=null)message.end=object.end|0;return message};EnumReservedRange.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.start=0;object.end=0}if(message.start!=null&&message.hasOwnProperty("start"))object.start=message.start;if(message.end!=null&&message.hasOwnProperty("end"))object.end=message.end;return object};EnumReservedRange.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EnumReservedRange.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.EnumDescriptorProto.EnumReservedRange"};return EnumReservedRange}();return EnumDescriptorProto}();protobuf.EnumValueDescriptorProto=function(){function EnumValueDescriptorProto(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumValueDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.number=reader.int32();break}case 3:{message.options=$root.google.protobuf.EnumValueOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};EnumValueDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumValueDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.number!=null&&message.hasOwnProperty("number"))if(!$util.isInteger(message.number))return"number: integer expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.EnumValueOptions.verify(message.options,long+1);if(error)return"options."+error}return null};EnumValueDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.EnumValueDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumValueDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.number!=null)message.number=object.number|0;if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");message.options=$root.google.protobuf.EnumValueOptions.fromObject(object.options,long+1)}return message};EnumValueDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.number=0;object.options=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.number!=null&&message.hasOwnProperty("number"))object.number=message.number;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.EnumValueOptions.toObject(message.options,options);return object};EnumValueDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EnumValueDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.EnumValueDescriptorProto"};return EnumValueDescriptorProto}();protobuf.ServiceDescriptorProto=function(){function ServiceDescriptorProto(properties){this.method=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ServiceDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{if(!(message.method&&message.method.length))message.method=[];message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.options=$root.google.protobuf.ServiceOptions.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};ServiceDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.method!=null&&message.hasOwnProperty("method")){if(!Array.isArray(message.method))return"method: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ServiceDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.method){if(!Array.isArray(object.method))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");message.method=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MethodDescriptorProto;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.inputType=reader.string();break}case 3:{message.outputType=reader.string();break}case 4:{message.options=$root.google.protobuf.MethodOptions.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.clientStreaming=reader.bool();break}case 6:{message.serverStreaming=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};MethodDescriptorProto.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodDescriptorProto.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.inputType!=null&&message.hasOwnProperty("inputType"))if(!$util.isString(message.inputType))return"inputType: string expected";if(message.outputType!=null&&message.hasOwnProperty("outputType"))if(!$util.isString(message.outputType))return"outputType: string expected";if(message.options!=null&&message.hasOwnProperty("options")){var error=$root.google.protobuf.MethodOptions.verify(message.options,long+1);if(error)return"options."+error}if(message.clientStreaming!=null&&message.hasOwnProperty("clientStreaming"))if(typeof message.clientStreaming!=="boolean")return"clientStreaming: boolean expected";if(message.serverStreaming!=null&&message.hasOwnProperty("serverStreaming"))if(typeof message.serverStreaming!=="boolean")return"serverStreaming: boolean expected";return null};MethodDescriptorProto.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.MethodDescriptorProto)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MethodDescriptorProto;if(object.name!=null)message.name=String(object.name);if(object.inputType!=null)message.inputType=String(object.inputType);if(object.outputType!=null)message.outputType=String(object.outputType);if(object.options!=null){if(typeof object.options!=="object")throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");message.options=$root.google.protobuf.MethodOptions.fromObject(object.options,long+1)}if(object.clientStreaming!=null)message.clientStreaming=Boolean(object.clientStreaming);if(object.serverStreaming!=null)message.serverStreaming=Boolean(object.serverStreaming);return message};MethodDescriptorProto.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.inputType="";object.outputType="";object.options=null;object.clientStreaming=false;object.serverStreaming=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.inputType!=null&&message.hasOwnProperty("inputType"))object.inputType=message.inputType;if(message.outputType!=null&&message.hasOwnProperty("outputType"))object.outputType=message.outputType;if(message.options!=null&&message.hasOwnProperty("options"))object.options=$root.google.protobuf.MethodOptions.toObject(message.options,options);if(message.clientStreaming!=null&&message.hasOwnProperty("clientStreaming"))object.clientStreaming=message.clientStreaming;if(message.serverStreaming!=null&&message.hasOwnProperty("serverStreaming"))object.serverStreaming=message.serverStreaming;return object};MethodDescriptorProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};MethodDescriptorProto.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.MethodDescriptorProto"};return MethodDescriptorProto}();protobuf.FileOptions=function(){function FileOptions(properties){this.uninterpretedOption=[];this[".google.api.resourceDefinition"]=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FileOptions;while(reader.pos>>3){case 1:{message.javaPackage=reader.string();break}case 8:{message.javaOuterClassname=reader.string();break}case 10:{message.javaMultipleFiles=reader.bool();break}case 20:{message.javaGenerateEqualsAndHash=reader.bool();break}case 27:{message.javaStringCheckUtf8=reader.bool();break}case 9:{message.optimizeFor=reader.int32();break}case 11:{message.goPackage=reader.string();break}case 16:{message.ccGenericServices=reader.bool();break}case 17:{message.javaGenericServices=reader.bool();break}case 18:{message.pyGenericServices=reader.bool();break}case 23:{message.deprecated=reader.bool();break}case 31:{message.ccEnableArenas=reader.bool();break}case 36:{message.objcClassPrefix=reader.string();break}case 37:{message.csharpNamespace=reader.string();break}case 39:{message.swiftPrefix=reader.string();break}case 40:{message.phpClassPrefix=reader.string();break}case 41:{message.phpNamespace=reader.string();break}case 44:{message.phpMetadataNamespace=reader.string();break}case 45:{message.rubyPackage=reader.string();break}case 50:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1053:{if(!(message[".google.api.resourceDefinition"]&&message[".google.api.resourceDefinition"].length))message[".google.api.resourceDefinition"]=[];message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};FileOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FileOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.javaPackage!=null&&message.hasOwnProperty("javaPackage"))if(!$util.isString(message.javaPackage))return"javaPackage: string expected";if(message.javaOuterClassname!=null&&message.hasOwnProperty("javaOuterClassname"))if(!$util.isString(message.javaOuterClassname))return"javaOuterClassname: string expected";if(message.javaMultipleFiles!=null&&message.hasOwnProperty("javaMultipleFiles"))if(typeof message.javaMultipleFiles!=="boolean")return"javaMultipleFiles: boolean expected";if(message.javaGenerateEqualsAndHash!=null&&message.hasOwnProperty("javaGenerateEqualsAndHash"))if(typeof message.javaGenerateEqualsAndHash!=="boolean")return"javaGenerateEqualsAndHash: boolean expected";if(message.javaStringCheckUtf8!=null&&message.hasOwnProperty("javaStringCheckUtf8"))if(typeof message.javaStringCheckUtf8!=="boolean")return"javaStringCheckUtf8: boolean expected";if(message.optimizeFor!=null&&message.hasOwnProperty("optimizeFor"))switch(message.optimizeFor){default:return"optimizeFor: enum value expected";case 1:case 2:case 3:break}if(message.goPackage!=null&&message.hasOwnProperty("goPackage"))if(!$util.isString(message.goPackage))return"goPackage: string expected";if(message.ccGenericServices!=null&&message.hasOwnProperty("ccGenericServices"))if(typeof message.ccGenericServices!=="boolean")return"ccGenericServices: boolean expected";if(message.javaGenericServices!=null&&message.hasOwnProperty("javaGenericServices"))if(typeof message.javaGenericServices!=="boolean")return"javaGenericServices: boolean expected";if(message.pyGenericServices!=null&&message.hasOwnProperty("pyGenericServices"))if(typeof message.pyGenericServices!=="boolean")return"pyGenericServices: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.ccEnableArenas!=null&&message.hasOwnProperty("ccEnableArenas"))if(typeof message.ccEnableArenas!=="boolean")return"ccEnableArenas: boolean expected";if(message.objcClassPrefix!=null&&message.hasOwnProperty("objcClassPrefix"))if(!$util.isString(message.objcClassPrefix))return"objcClassPrefix: string expected";if(message.csharpNamespace!=null&&message.hasOwnProperty("csharpNamespace"))if(!$util.isString(message.csharpNamespace))return"csharpNamespace: string expected";if(message.swiftPrefix!=null&&message.hasOwnProperty("swiftPrefix"))if(!$util.isString(message.swiftPrefix))return"swiftPrefix: string expected";if(message.phpClassPrefix!=null&&message.hasOwnProperty("phpClassPrefix"))if(!$util.isString(message.phpClassPrefix))return"phpClassPrefix: string expected";if(message.phpNamespace!=null&&message.hasOwnProperty("phpNamespace"))if(!$util.isString(message.phpNamespace))return"phpNamespace: string expected";if(message.phpMetadataNamespace!=null&&message.hasOwnProperty("phpMetadataNamespace"))if(!$util.isString(message.phpMetadataNamespace))return"phpMetadataNamespace: string expected";if(message.rubyPackage!=null&&message.hasOwnProperty("rubyPackage"))if(!$util.isString(message.rubyPackage))return"rubyPackage: string expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FileOptions;if(object.javaPackage!=null)message.javaPackage=String(object.javaPackage);if(object.javaOuterClassname!=null)message.javaOuterClassname=String(object.javaOuterClassname);if(object.javaMultipleFiles!=null)message.javaMultipleFiles=Boolean(object.javaMultipleFiles);if(object.javaGenerateEqualsAndHash!=null)message.javaGenerateEqualsAndHash=Boolean(object.javaGenerateEqualsAndHash);if(object.javaStringCheckUtf8!=null)message.javaStringCheckUtf8=Boolean(object.javaStringCheckUtf8);switch(object.optimizeFor){default:if(typeof object.optimizeFor==="number"){message.optimizeFor=object.optimizeFor;break}break;case"SPEED":case 1:message.optimizeFor=1;break;case"CODE_SIZE":case 2:message.optimizeFor=2;break;case"LITE_RUNTIME":case 3:message.optimizeFor=3;break}if(object.goPackage!=null)message.goPackage=String(object.goPackage);if(object.ccGenericServices!=null)message.ccGenericServices=Boolean(object.ccGenericServices);if(object.javaGenericServices!=null)message.javaGenericServices=Boolean(object.javaGenericServices);if(object.pyGenericServices!=null)message.pyGenericServices=Boolean(object.pyGenericServices);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.ccEnableArenas!=null)message.ccEnableArenas=Boolean(object.ccEnableArenas);if(object.objcClassPrefix!=null)message.objcClassPrefix=String(object.objcClassPrefix);if(object.csharpNamespace!=null)message.csharpNamespace=String(object.csharpNamespace);if(object.swiftPrefix!=null)message.swiftPrefix=String(object.swiftPrefix);if(object.phpClassPrefix!=null)message.phpClassPrefix=String(object.phpClassPrefix);if(object.phpNamespace!=null)message.phpNamespace=String(object.phpNamespace);if(object.phpMetadataNamespace!=null)message.phpMetadataNamespace=String(object.phpMetadataNamespace);if(object.rubyPackage!=null)message.rubyPackage=String(object.rubyPackage);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.FileOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MessageOptions;while(reader.pos>>3){case 1:{message.messageSetWireFormat=reader.bool();break}case 2:{message.noStandardDescriptorAccessor=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 7:{message.mapEntry=reader.bool();break}case 11:{message.deprecatedLegacyJsonFieldConflicts=reader.bool();break}case 12:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1053:{message[".google.api.resource"]=$root.google.api.ResourceDescriptor.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MessageOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MessageOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.messageSetWireFormat!=null&&message.hasOwnProperty("messageSetWireFormat"))if(typeof message.messageSetWireFormat!=="boolean")return"messageSetWireFormat: boolean expected";if(message.noStandardDescriptorAccessor!=null&&message.hasOwnProperty("noStandardDescriptorAccessor"))if(typeof message.noStandardDescriptorAccessor!=="boolean")return"noStandardDescriptorAccessor: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.mapEntry!=null&&message.hasOwnProperty("mapEntry"))if(typeof message.mapEntry!=="boolean")return"mapEntry: boolean expected";if(message.deprecatedLegacyJsonFieldConflicts!=null&&message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))if(typeof message.deprecatedLegacyJsonFieldConflicts!=="boolean")return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MessageOptions;if(object.messageSetWireFormat!=null)message.messageSetWireFormat=Boolean(object.messageSetWireFormat);if(object.noStandardDescriptorAccessor!=null)message.noStandardDescriptorAccessor=Boolean(object.noStandardDescriptorAccessor);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.mapEntry!=null)message.mapEntry=Boolean(object.mapEntry);if(object.deprecatedLegacyJsonFieldConflicts!=null)message.deprecatedLegacyJsonFieldConflicts=Boolean(object.deprecatedLegacyJsonFieldConflicts);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.MessageOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions;while(reader.pos>>3){case 1:{message.ctype=reader.int32();break}case 2:{message.packed=reader.bool();break}case 6:{message.jstype=reader.int32();break}case 5:{message.lazy=reader.bool();break}case 15:{message.unverifiedLazy=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 10:{message.weak=reader.bool();break}case 16:{message.debugRedact=reader.bool();break}case 17:{message.retention=reader.int32();break}case 19:{if(!(message.targets&&message.targets.length))message.targets=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.ctype!=null&&message.hasOwnProperty("ctype"))switch(message.ctype){default:return"ctype: enum value expected";case 0:case 1:case 2:break}if(message.packed!=null&&message.hasOwnProperty("packed"))if(typeof message.packed!=="boolean")return"packed: boolean expected";if(message.jstype!=null&&message.hasOwnProperty("jstype"))switch(message.jstype){default:return"jstype: enum value expected";case 0:case 1:case 2:break}if(message.lazy!=null&&message.hasOwnProperty("lazy"))if(typeof message.lazy!=="boolean")return"lazy: boolean expected";if(message.unverifiedLazy!=null&&message.hasOwnProperty("unverifiedLazy"))if(typeof message.unverifiedLazy!=="boolean")return"unverifiedLazy: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.weak!=null&&message.hasOwnProperty("weak"))if(typeof message.weak!=="boolean")return"weak: boolean expected";if(message.debugRedact!=null&&message.hasOwnProperty("debugRedact"))if(typeof message.debugRedact!=="boolean")return"debugRedact: boolean expected";if(message.retention!=null&&message.hasOwnProperty("retention"))switch(message.retention){default:return"retention: enum value expected";case 0:case 1:case 2:break}if(message.targets!=null&&message.hasOwnProperty("targets")){if(!Array.isArray(message.targets))return"targets: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions;switch(object.ctype){default:if(typeof object.ctype==="number"){message.ctype=object.ctype;break}break;case"STRING":case 0:message.ctype=0;break;case"CORD":case 1:message.ctype=1;break;case"STRING_PIECE":case 2:message.ctype=2;break}if(object.packed!=null)message.packed=Boolean(object.packed);switch(object.jstype){default:if(typeof object.jstype==="number"){message.jstype=object.jstype;break}break;case"JS_NORMAL":case 0:message.jstype=0;break;case"JS_STRING":case 1:message.jstype=1;break;case"JS_NUMBER":case 2:message.jstype=2;break}if(object.lazy!=null)message.lazy=Boolean(object.lazy);if(object.unverifiedLazy!=null)message.unverifiedLazy=Boolean(object.unverifiedLazy);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.weak!=null)message.weak=Boolean(object.weak);if(object.debugRedact!=null)message.debugRedact=Boolean(object.debugRedact);switch(object.retention){default:if(typeof object.retention==="number"){message.retention=object.retention;break}break;case"RETENTION_UNKNOWN":case 0:message.retention=0;break;case"RETENTION_RUNTIME":case 1:message.retention=1;break;case"RETENTION_SOURCE":case 2:message.retention=2;break}if(object.targets){if(!Array.isArray(object.targets))throw TypeError(".google.protobuf.FieldOptions.targets: array expected");message.targets=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions.EditionDefault;while(reader.pos>>3){case 3:{message.edition=reader.int32();break}case 2:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};EditionDefault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EditionDefault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isString(message.value))return"value: string expected";return null};EditionDefault.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldOptions.EditionDefault)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions.EditionDefault;switch(object.edition){default:if(typeof object.edition==="number"){message.edition=object.edition;break}break;case"EDITION_UNKNOWN":case 0:message.edition=0;break;case"EDITION_LEGACY":case 900:message.edition=900;break;case"EDITION_PROTO2":case 998:message.edition=998;break;case"EDITION_PROTO3":case 999:message.edition=999;break;case"EDITION_2023":case 1e3:message.edition=1e3;break;case"EDITION_2024":case 1001:message.edition=1001;break;case"EDITION_2026":case 1002:message.edition=1002;break;case"EDITION_UNSTABLE":case 9999:message.edition=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:message.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.edition=99999;break;case"EDITION_MAX":case 2147483647:message.edition=2147483647;break}if(object.value!=null)message.value=String(object.value);return message};EditionDefault.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.value="";object.edition=options.enums===String?"EDITION_UNKNOWN":0}if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;if(message.edition!=null&&message.hasOwnProperty("edition"))object.edition=options.enums===String?$root.google.protobuf.Edition[message.edition]===undefined?message.edition:$root.google.protobuf.Edition[message.edition]:message.edition;return object};EditionDefault.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EditionDefault.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldOptions.EditionDefault"};return EditionDefault}();FieldOptions.FeatureSupport=function(){function FeatureSupport(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldOptions.FeatureSupport;while(reader.pos>>3){case 1:{message.editionIntroduced=reader.int32();break}case 2:{message.editionDeprecated=reader.int32();break}case 3:{message.deprecationWarning=reader.string();break}case 4:{message.editionRemoved=reader.int32();break}case 5:{message.removalError=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSupport.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSupport.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.editionIntroduced!=null&&message.hasOwnProperty("editionIntroduced"))switch(message.editionIntroduced){default:return"editionIntroduced: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.editionDeprecated!=null&&message.hasOwnProperty("editionDeprecated"))switch(message.editionDeprecated){default:return"editionDeprecated: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.deprecationWarning!=null&&message.hasOwnProperty("deprecationWarning"))if(!$util.isString(message.deprecationWarning))return"deprecationWarning: string expected";if(message.editionRemoved!=null&&message.hasOwnProperty("editionRemoved"))switch(message.editionRemoved){default:return"editionRemoved: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.removalError!=null&&message.hasOwnProperty("removalError"))if(!$util.isString(message.removalError))return"removalError: string expected";return null};FeatureSupport.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FieldOptions.FeatureSupport)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldOptions.FeatureSupport;switch(object.editionIntroduced){default:if(typeof object.editionIntroduced==="number"){message.editionIntroduced=object.editionIntroduced;break}break;case"EDITION_UNKNOWN":case 0:message.editionIntroduced=0;break;case"EDITION_LEGACY":case 900:message.editionIntroduced=900;break;case"EDITION_PROTO2":case 998:message.editionIntroduced=998;break;case"EDITION_PROTO3":case 999:message.editionIntroduced=999;break;case"EDITION_2023":case 1e3:message.editionIntroduced=1e3;break;case"EDITION_2024":case 1001:message.editionIntroduced=1001;break;case"EDITION_2026":case 1002:message.editionIntroduced=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionIntroduced=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionIntroduced=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionIntroduced=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionIntroduced=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionIntroduced=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionIntroduced=99999;break;case"EDITION_MAX":case 2147483647:message.editionIntroduced=2147483647;break}switch(object.editionDeprecated){default:if(typeof object.editionDeprecated==="number"){message.editionDeprecated=object.editionDeprecated;break}break;case"EDITION_UNKNOWN":case 0:message.editionDeprecated=0;break;case"EDITION_LEGACY":case 900:message.editionDeprecated=900;break;case"EDITION_PROTO2":case 998:message.editionDeprecated=998;break;case"EDITION_PROTO3":case 999:message.editionDeprecated=999;break;case"EDITION_2023":case 1e3:message.editionDeprecated=1e3;break;case"EDITION_2024":case 1001:message.editionDeprecated=1001;break;case"EDITION_2026":case 1002:message.editionDeprecated=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionDeprecated=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionDeprecated=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionDeprecated=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionDeprecated=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionDeprecated=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionDeprecated=99999;break;case"EDITION_MAX":case 2147483647:message.editionDeprecated=2147483647;break}if(object.deprecationWarning!=null)message.deprecationWarning=String(object.deprecationWarning);switch(object.editionRemoved){default:if(typeof object.editionRemoved==="number"){message.editionRemoved=object.editionRemoved;break}break;case"EDITION_UNKNOWN":case 0:message.editionRemoved=0;break;case"EDITION_LEGACY":case 900:message.editionRemoved=900;break;case"EDITION_PROTO2":case 998:message.editionRemoved=998;break;case"EDITION_PROTO3":case 999:message.editionRemoved=999;break;case"EDITION_2023":case 1e3:message.editionRemoved=1e3;break;case"EDITION_2024":case 1001:message.editionRemoved=1001;break;case"EDITION_2026":case 1002:message.editionRemoved=1002;break;case"EDITION_UNSTABLE":case 9999:message.editionRemoved=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.editionRemoved=1;break;case"EDITION_2_TEST_ONLY":case 2:message.editionRemoved=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.editionRemoved=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.editionRemoved=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.editionRemoved=99999;break;case"EDITION_MAX":case 2147483647:message.editionRemoved=2147483647;break}if(object.removalError!=null)message.removalError=String(object.removalError);return message};FeatureSupport.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.editionIntroduced=options.enums===String?"EDITION_UNKNOWN":0;object.editionDeprecated=options.enums===String?"EDITION_UNKNOWN":0;object.deprecationWarning="";object.editionRemoved=options.enums===String?"EDITION_UNKNOWN":0;object.removalError=""}if(message.editionIntroduced!=null&&message.hasOwnProperty("editionIntroduced"))object.editionIntroduced=options.enums===String?$root.google.protobuf.Edition[message.editionIntroduced]===undefined?message.editionIntroduced:$root.google.protobuf.Edition[message.editionIntroduced]:message.editionIntroduced;if(message.editionDeprecated!=null&&message.hasOwnProperty("editionDeprecated"))object.editionDeprecated=options.enums===String?$root.google.protobuf.Edition[message.editionDeprecated]===undefined?message.editionDeprecated:$root.google.protobuf.Edition[message.editionDeprecated]:message.editionDeprecated;if(message.deprecationWarning!=null&&message.hasOwnProperty("deprecationWarning"))object.deprecationWarning=message.deprecationWarning;if(message.editionRemoved!=null&&message.hasOwnProperty("editionRemoved"))object.editionRemoved=options.enums===String?$root.google.protobuf.Edition[message.editionRemoved]===undefined?message.editionRemoved:$root.google.protobuf.Edition[message.editionRemoved]:message.editionRemoved;if(message.removalError!=null&&message.hasOwnProperty("removalError"))object.removalError=message.removalError;return object};FeatureSupport.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSupport.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FieldOptions.FeatureSupport"};return FeatureSupport}();return FieldOptions}();protobuf.OneofOptions=function(){function OneofOptions(properties){this.uninterpretedOption=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.OneofOptions;while(reader.pos>>3){case 1:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};OneofOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OneofOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.OneofOptions;if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.OneofOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumOptions;while(reader.pos>>3){case 2:{message.allowAlias=reader.bool();break}case 3:{message.deprecated=reader.bool();break}case 6:{message.deprecatedLegacyJsonFieldConflicts=reader.bool();break}case 7:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};EnumOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.allowAlias!=null&&message.hasOwnProperty("allowAlias"))if(typeof message.allowAlias!=="boolean")return"allowAlias: boolean expected";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.deprecatedLegacyJsonFieldConflicts!=null&&message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))if(typeof message.deprecatedLegacyJsonFieldConflicts!=="boolean")return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumOptions;if(object.allowAlias!=null)message.allowAlias=Boolean(object.allowAlias);if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.deprecatedLegacyJsonFieldConflicts!=null)message.deprecatedLegacyJsonFieldConflicts=Boolean(object.deprecatedLegacyJsonFieldConflicts);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.EnumOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.EnumValueOptions;while(reader.pos>>3){case 1:{message.deprecated=reader.bool();break}case 2:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.debugRedact=reader.bool();break}case 4:{message.featureSupport=$root.google.protobuf.FieldOptions.FeatureSupport.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};EnumValueOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};EnumValueOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.debugRedact!=null&&message.hasOwnProperty("debugRedact"))if(typeof message.debugRedact!=="boolean")return"debugRedact: boolean expected";if(message.featureSupport!=null&&message.hasOwnProperty("featureSupport")){var error=$root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport,long+1);if(error)return"featureSupport."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.EnumValueOptions;if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.EnumValueOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.debugRedact!=null)message.debugRedact=Boolean(object.debugRedact);if(object.featureSupport!=null){if(typeof object.featureSupport!=="object")throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected");message.featureSupport=$root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.ServiceOptions;while(reader.pos>>3){case 34:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 33:{message.deprecated=reader.bool();break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 1049:{message[".google.api.defaultHost"]=reader.string();break}case 1050:{message[".google.api.oauthScopes"]=reader.string();break}case 525000001:{message[".google.api.apiVersion"]=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};ServiceOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ServiceOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.ServiceOptions;if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.ServiceOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.MethodOptions;while(reader.pos>>3){case 33:{message.deprecated=reader.bool();break}case 34:{message.idempotencyLevel=reader.int32();break}case 35:{message.features=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 999:{if(!(message.uninterpretedOption&&message.uninterpretedOption.length))message.uninterpretedOption=[];message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader,reader.uint32(),undefined,long+1));break}case 72295728:{message[".google.api.http"]=$root.google.api.HttpRule.decode(reader,reader.uint32(),undefined,long+1);break}case 1051:{if(!(message[".google.api.methodSignature"]&&message[".google.api.methodSignature"].length))message[".google.api.methodSignature"]=[];message[".google.api.methodSignature"].push(reader.string());break}case 1049:{message[".google.longrunning.operationInfo"]=$root.google.longrunning.OperationInfo.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};MethodOptions.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};MethodOptions.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.deprecated!=null&&message.hasOwnProperty("deprecated"))if(typeof message.deprecated!=="boolean")return"deprecated: boolean expected";if(message.idempotencyLevel!=null&&message.hasOwnProperty("idempotencyLevel"))switch(message.idempotencyLevel){default:return"idempotencyLevel: enum value expected";case 0:case 1:case 2:break}if(message.features!=null&&message.hasOwnProperty("features")){var error=$root.google.protobuf.FeatureSet.verify(message.features,long+1);if(error)return"features."+error}if(message.uninterpretedOption!=null&&message.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(message.uninterpretedOption))return"uninterpretedOption: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.MethodOptions;if(object.deprecated!=null)message.deprecated=Boolean(object.deprecated);switch(object.idempotencyLevel){default:if(typeof object.idempotencyLevel==="number"){message.idempotencyLevel=object.idempotencyLevel;break}break;case"IDEMPOTENCY_UNKNOWN":case 0:message.idempotencyLevel=0;break;case"NO_SIDE_EFFECTS":case 1:message.idempotencyLevel=1;break;case"IDEMPOTENT":case 2:message.idempotencyLevel=2;break}if(object.features!=null){if(typeof object.features!=="object")throw TypeError(".google.protobuf.MethodOptions.features: object expected");message.features=$root.google.protobuf.FeatureSet.fromObject(object.features,long+1)}if(object.uninterpretedOption){if(!Array.isArray(object.uninterpretedOption))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");message.uninterpretedOption=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UninterpretedOption;while(reader.pos>>3){case 2:{if(!(message.name&&message.name.length))message.name=[];message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader,reader.uint32(),undefined,long+1));break}case 3:{message.identifierValue=reader.string();break}case 4:{message.positiveIntValue=reader.uint64();break}case 5:{message.negativeIntValue=reader.int64();break}case 6:{message.doubleValue=reader.double();break}case 7:{message.stringValue=reader.bytes();break}case 8:{message.aggregateValue=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};UninterpretedOption.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UninterpretedOption.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name")){if(!Array.isArray(message.name))return"name: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UninterpretedOption;if(object.name){if(!Array.isArray(object.name))throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");message.name=[];for(var i=0;i>>0,object.positiveIntValue.high>>>0).toNumber(true);if(object.negativeIntValue!=null)if($util.Long)(message.negativeIntValue=$util.Long.fromValue(object.negativeIntValue)).unsigned=false;else if(typeof object.negativeIntValue==="string")message.negativeIntValue=parseInt(object.negativeIntValue,10);else if(typeof object.negativeIntValue==="number")message.negativeIntValue=object.negativeIntValue;else if(typeof object.negativeIntValue==="object")message.negativeIntValue=new $util.LongBits(object.negativeIntValue.low>>>0,object.negativeIntValue.high>>>0).toNumber();if(object.doubleValue!=null)message.doubleValue=Number(object.doubleValue);if(object.stringValue!=null)if(typeof object.stringValue==="string")$util.base64.decode(object.stringValue,message.stringValue=$util.newBuffer($util.base64.length(object.stringValue)),0);else if(object.stringValue.length>=0)message.stringValue=object.stringValue;if(object.aggregateValue!=null)message.aggregateValue=String(object.aggregateValue);return message};UninterpretedOption.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.arrays||options.defaults)object.name=[];if(options.defaults){object.identifierValue="";if($util.Long){var long=new $util.Long(0,0,true);object.positiveIntValue=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.positiveIntValue=options.longs===String?"0":0;if($util.Long){var long=new $util.Long(0,0,false);object.negativeIntValue=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.negativeIntValue=options.longs===String?"0":0;object.doubleValue=0;if(options.bytes===String)object.stringValue="";else{object.stringValue=[];if(options.bytes!==Array)object.stringValue=$util.newBuffer(object.stringValue)}object.aggregateValue=""}if(message.name&&message.name.length){object.name=[];for(var j=0;j>>0,message.positiveIntValue.high>>>0).toNumber(true):message.positiveIntValue;if(message.negativeIntValue!=null&&message.hasOwnProperty("negativeIntValue"))if(typeof message.negativeIntValue==="number")object.negativeIntValue=options.longs===String?String(message.negativeIntValue):message.negativeIntValue;else object.negativeIntValue=options.longs===String?$util.Long.prototype.toString.call(message.negativeIntValue):options.longs===Number?new $util.LongBits(message.negativeIntValue.low>>>0,message.negativeIntValue.high>>>0).toNumber():message.negativeIntValue;if(message.doubleValue!=null&&message.hasOwnProperty("doubleValue"))object.doubleValue=options.json&&!isFinite(message.doubleValue)?String(message.doubleValue):message.doubleValue;if(message.stringValue!=null&&message.hasOwnProperty("stringValue"))object.stringValue=options.bytes===String?$util.base64.encode(message.stringValue,0,message.stringValue.length):options.bytes===Array?Array.prototype.slice.call(message.stringValue):message.stringValue;if(message.aggregateValue!=null&&message.hasOwnProperty("aggregateValue"))object.aggregateValue=message.aggregateValue;return object};UninterpretedOption.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UninterpretedOption.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UninterpretedOption"};UninterpretedOption.NamePart=function(){function NamePart(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UninterpretedOption.NamePart;while(reader.pos>>3){case 1:{message.namePart=reader.string();break}case 2:{message.isExtension=reader.bool();break}default:reader.skipType(tag&7,long);break}}if(!message.hasOwnProperty("namePart"))throw $util.ProtocolError("missing required 'namePart'",{instance:message});if(!message.hasOwnProperty("isExtension"))throw $util.ProtocolError("missing required 'isExtension'",{instance:message});return message};NamePart.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};NamePart.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(!$util.isString(message.namePart))return"namePart: string expected";if(typeof message.isExtension!=="boolean")return"isExtension: boolean expected";return null};NamePart.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UninterpretedOption.NamePart)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UninterpretedOption.NamePart;if(object.namePart!=null)message.namePart=String(object.namePart);if(object.isExtension!=null)message.isExtension=Boolean(object.isExtension);return message};NamePart.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.namePart="";object.isExtension=false}if(message.namePart!=null&&message.hasOwnProperty("namePart"))object.namePart=message.namePart;if(message.isExtension!=null&&message.hasOwnProperty("isExtension"))object.isExtension=message.isExtension;return object};NamePart.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NamePart.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UninterpretedOption.NamePart"};return NamePart}();return UninterpretedOption}();protobuf.FeatureSet=function(){function FeatureSet(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet;while(reader.pos>>3){case 1:{message.fieldPresence=reader.int32();break}case 2:{message.enumType=reader.int32();break}case 3:{message.repeatedFieldEncoding=reader.int32();break}case 4:{message.utf8Validation=reader.int32();break}case 5:{message.messageEncoding=reader.int32();break}case 6:{message.jsonFormat=reader.int32();break}case 7:{message.enforceNamingStyle=reader.int32();break}case 8:{message.defaultSymbolVisibility=reader.int32();break}case 9:{message.enforceProtoLimits=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSet.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSet.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.fieldPresence!=null&&message.hasOwnProperty("fieldPresence"))switch(message.fieldPresence){default:return"fieldPresence: enum value expected";case 0:case 1:case 2:case 3:break}if(message.enumType!=null&&message.hasOwnProperty("enumType"))switch(message.enumType){default:return"enumType: enum value expected";case 0:case 1:case 2:break}if(message.repeatedFieldEncoding!=null&&message.hasOwnProperty("repeatedFieldEncoding"))switch(message.repeatedFieldEncoding){default:return"repeatedFieldEncoding: enum value expected";case 0:case 1:case 2:break}if(message.utf8Validation!=null&&message.hasOwnProperty("utf8Validation"))switch(message.utf8Validation){default:return"utf8Validation: enum value expected";case 0:case 2:case 3:break}if(message.messageEncoding!=null&&message.hasOwnProperty("messageEncoding"))switch(message.messageEncoding){default:return"messageEncoding: enum value expected";case 0:case 1:case 2:break}if(message.jsonFormat!=null&&message.hasOwnProperty("jsonFormat"))switch(message.jsonFormat){default:return"jsonFormat: enum value expected";case 0:case 1:case 2:break}if(message.enforceNamingStyle!=null&&message.hasOwnProperty("enforceNamingStyle"))switch(message.enforceNamingStyle){default:return"enforceNamingStyle: enum value expected";case 0:case 1:case 2:case 3:break}if(message.defaultSymbolVisibility!=null&&message.hasOwnProperty("defaultSymbolVisibility"))switch(message.defaultSymbolVisibility){default:return"defaultSymbolVisibility: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(message.enforceProtoLimits!=null&&message.hasOwnProperty("enforceProtoLimits"))switch(message.enforceProtoLimits){default:return"enforceProtoLimits: enum value expected";case 0:case 1:case 2:break}return null};FeatureSet.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSet;switch(object.fieldPresence){default:if(typeof object.fieldPresence==="number"){message.fieldPresence=object.fieldPresence;break}break;case"FIELD_PRESENCE_UNKNOWN":case 0:message.fieldPresence=0;break;case"EXPLICIT":case 1:message.fieldPresence=1;break;case"IMPLICIT":case 2:message.fieldPresence=2;break;case"LEGACY_REQUIRED":case 3:message.fieldPresence=3;break}switch(object.enumType){default:if(typeof object.enumType==="number"){message.enumType=object.enumType;break}break;case"ENUM_TYPE_UNKNOWN":case 0:message.enumType=0;break;case"OPEN":case 1:message.enumType=1;break;case"CLOSED":case 2:message.enumType=2;break}switch(object.repeatedFieldEncoding){default:if(typeof object.repeatedFieldEncoding==="number"){message.repeatedFieldEncoding=object.repeatedFieldEncoding;break}break;case"REPEATED_FIELD_ENCODING_UNKNOWN":case 0:message.repeatedFieldEncoding=0;break;case"PACKED":case 1:message.repeatedFieldEncoding=1;break;case"EXPANDED":case 2:message.repeatedFieldEncoding=2;break}switch(object.utf8Validation){default:if(typeof object.utf8Validation==="number"){message.utf8Validation=object.utf8Validation;break}break;case"UTF8_VALIDATION_UNKNOWN":case 0:message.utf8Validation=0;break;case"VERIFY":case 2:message.utf8Validation=2;break;case"NONE":case 3:message.utf8Validation=3;break}switch(object.messageEncoding){default:if(typeof object.messageEncoding==="number"){message.messageEncoding=object.messageEncoding;break}break;case"MESSAGE_ENCODING_UNKNOWN":case 0:message.messageEncoding=0;break;case"LENGTH_PREFIXED":case 1:message.messageEncoding=1;break;case"DELIMITED":case 2:message.messageEncoding=2;break}switch(object.jsonFormat){default:if(typeof object.jsonFormat==="number"){message.jsonFormat=object.jsonFormat;break}break;case"JSON_FORMAT_UNKNOWN":case 0:message.jsonFormat=0;break;case"ALLOW":case 1:message.jsonFormat=1;break;case"LEGACY_BEST_EFFORT":case 2:message.jsonFormat=2;break}switch(object.enforceNamingStyle){default:if(typeof object.enforceNamingStyle==="number"){message.enforceNamingStyle=object.enforceNamingStyle;break}break;case"ENFORCE_NAMING_STYLE_UNKNOWN":case 0:message.enforceNamingStyle=0;break;case"STYLE2024":case 1:message.enforceNamingStyle=1;break;case"STYLE_LEGACY":case 2:message.enforceNamingStyle=2;break;case"STYLE2026":case 3:message.enforceNamingStyle=3;break}switch(object.defaultSymbolVisibility){default:if(typeof object.defaultSymbolVisibility==="number"){message.defaultSymbolVisibility=object.defaultSymbolVisibility;break}break;case"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":case 0:message.defaultSymbolVisibility=0;break;case"EXPORT_ALL":case 1:message.defaultSymbolVisibility=1;break;case"EXPORT_TOP_LEVEL":case 2:message.defaultSymbolVisibility=2;break;case"LOCAL_ALL":case 3:message.defaultSymbolVisibility=3;break;case"STRICT":case 4:message.defaultSymbolVisibility=4;break}switch(object.enforceProtoLimits){default:if(typeof object.enforceProtoLimits==="number"){message.enforceProtoLimits=object.enforceProtoLimits;break}break;case"PROTO_LIMITS_UNKNOWN":case 0:message.enforceProtoLimits=0;break;case"LEGACY_NO_EXPLICIT_LIMITS":case 1:message.enforceProtoLimits=1;break;case"PROTO_LIMITS2026":case 2:message.enforceProtoLimits=2;break}return message};FeatureSet.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.fieldPresence=options.enums===String?"FIELD_PRESENCE_UNKNOWN":0;object.enumType=options.enums===String?"ENUM_TYPE_UNKNOWN":0;object.repeatedFieldEncoding=options.enums===String?"REPEATED_FIELD_ENCODING_UNKNOWN":0;object.utf8Validation=options.enums===String?"UTF8_VALIDATION_UNKNOWN":0;object.messageEncoding=options.enums===String?"MESSAGE_ENCODING_UNKNOWN":0;object.jsonFormat=options.enums===String?"JSON_FORMAT_UNKNOWN":0;object.enforceNamingStyle=options.enums===String?"ENFORCE_NAMING_STYLE_UNKNOWN":0;object.defaultSymbolVisibility=options.enums===String?"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":0;object.enforceProtoLimits=options.enums===String?"PROTO_LIMITS_UNKNOWN":0}if(message.fieldPresence!=null&&message.hasOwnProperty("fieldPresence"))object.fieldPresence=options.enums===String?$root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence]===undefined?message.fieldPresence:$root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence]:message.fieldPresence;if(message.enumType!=null&&message.hasOwnProperty("enumType"))object.enumType=options.enums===String?$root.google.protobuf.FeatureSet.EnumType[message.enumType]===undefined?message.enumType:$root.google.protobuf.FeatureSet.EnumType[message.enumType]:message.enumType;if(message.repeatedFieldEncoding!=null&&message.hasOwnProperty("repeatedFieldEncoding"))object.repeatedFieldEncoding=options.enums===String?$root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding]===undefined?message.repeatedFieldEncoding:$root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding]:message.repeatedFieldEncoding;if(message.utf8Validation!=null&&message.hasOwnProperty("utf8Validation"))object.utf8Validation=options.enums===String?$root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation]===undefined?message.utf8Validation:$root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation]:message.utf8Validation;if(message.messageEncoding!=null&&message.hasOwnProperty("messageEncoding"))object.messageEncoding=options.enums===String?$root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding]===undefined?message.messageEncoding:$root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding]:message.messageEncoding;if(message.jsonFormat!=null&&message.hasOwnProperty("jsonFormat"))object.jsonFormat=options.enums===String?$root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat]===undefined?message.jsonFormat:$root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat]:message.jsonFormat;if(message.enforceNamingStyle!=null&&message.hasOwnProperty("enforceNamingStyle"))object.enforceNamingStyle=options.enums===String?$root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle]===undefined?message.enforceNamingStyle:$root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle]:message.enforceNamingStyle;if(message.defaultSymbolVisibility!=null&&message.hasOwnProperty("defaultSymbolVisibility"))object.defaultSymbolVisibility=options.enums===String?$root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility]===undefined?message.defaultSymbolVisibility:$root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility]:message.defaultSymbolVisibility;if(message.enforceProtoLimits!=null&&message.hasOwnProperty("enforceProtoLimits"))object.enforceProtoLimits=options.enums===String?$root.google.protobuf.FeatureSet.ProtoLimitsFeature.EnforceProtoLimits[message.enforceProtoLimits]===undefined?message.enforceProtoLimits:$root.google.protobuf.FeatureSet.ProtoLimitsFeature.EnforceProtoLimits[message.enforceProtoLimits]:message.enforceProtoLimits;return object};FeatureSet.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSet.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet"};FeatureSet.FieldPresence=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FIELD_PRESENCE_UNKNOWN"]=0;values[valuesById[1]="EXPLICIT"]=1;values[valuesById[2]="IMPLICIT"]=2;values[valuesById[3]="LEGACY_REQUIRED"]=3;return values}();FeatureSet.EnumType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENUM_TYPE_UNKNOWN"]=0;values[valuesById[1]="OPEN"]=1;values[valuesById[2]="CLOSED"]=2;return values}();FeatureSet.RepeatedFieldEncoding=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="REPEATED_FIELD_ENCODING_UNKNOWN"]=0;values[valuesById[1]="PACKED"]=1;values[valuesById[2]="EXPANDED"]=2;return values}();FeatureSet.Utf8Validation=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UTF8_VALIDATION_UNKNOWN"]=0;values[valuesById[2]="VERIFY"]=2;values[valuesById[3]="NONE"]=3;return values}();FeatureSet.MessageEncoding=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MESSAGE_ENCODING_UNKNOWN"]=0;values[valuesById[1]="LENGTH_PREFIXED"]=1;values[valuesById[2]="DELIMITED"]=2;return values}();FeatureSet.JsonFormat=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="JSON_FORMAT_UNKNOWN"]=0;values[valuesById[1]="ALLOW"]=1;values[valuesById[2]="LEGACY_BEST_EFFORT"]=2;return values}();FeatureSet.EnforceNamingStyle=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENFORCE_NAMING_STYLE_UNKNOWN"]=0;values[valuesById[1]="STYLE2024"]=1;values[valuesById[2]="STYLE_LEGACY"]=2;values[valuesById[3]="STYLE2026"]=3;return values}();FeatureSet.VisibilityFeature=function(){function VisibilityFeature(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet.VisibilityFeature;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};VisibilityFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};VisibilityFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};VisibilityFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.FeatureSet.VisibilityFeature};VisibilityFeature.toObject=function toObject(){return{}};VisibilityFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};VisibilityFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet.VisibilityFeature"};VisibilityFeature.DefaultSymbolVisibility=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"]=0;values[valuesById[1]="EXPORT_ALL"]=1;values[valuesById[2]="EXPORT_TOP_LEVEL"]=2;values[valuesById[3]="LOCAL_ALL"]=3;values[valuesById[4]="STRICT"]=4;return values}();return VisibilityFeature}();FeatureSet.ProtoLimitsFeature=function(){function ProtoLimitsFeature(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSet.ProtoLimitsFeature;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};ProtoLimitsFeature.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ProtoLimitsFeature.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};ProtoLimitsFeature.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSet.ProtoLimitsFeature)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.FeatureSet.ProtoLimitsFeature};ProtoLimitsFeature.toObject=function toObject(){return{}};ProtoLimitsFeature.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ProtoLimitsFeature.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSet.ProtoLimitsFeature"};ProtoLimitsFeature.EnforceProtoLimits=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PROTO_LIMITS_UNKNOWN"]=0;values[valuesById[1]="LEGACY_NO_EXPLICIT_LIMITS"]=1;values[valuesById[2]="PROTO_LIMITS2026"]=2;return values}();return ProtoLimitsFeature}();return FeatureSet}();protobuf.FeatureSetDefaults=function(){function FeatureSetDefaults(properties){this.defaults=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSetDefaults;while(reader.pos>>3){case 1:{if(!(message.defaults&&message.defaults.length))message.defaults=[];message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader,reader.uint32(),undefined,long+1));break}case 4:{message.minimumEdition=reader.int32();break}case 5:{message.maximumEdition=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};FeatureSetDefaults.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSetDefaults.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.defaults!=null&&message.hasOwnProperty("defaults")){if(!Array.isArray(message.defaults))return"defaults: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSetDefaults;if(object.defaults){if(!Array.isArray(object.defaults))throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected");message.defaults=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;while(reader.pos>>3){case 3:{message.edition=reader.int32();break}case 4:{message.overridableFeatures=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.fixedFeatures=$root.google.protobuf.FeatureSet.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};FeatureSetEditionDefault.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FeatureSetEditionDefault.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.edition!=null&&message.hasOwnProperty("edition"))switch(message.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1002:case 9999:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:break}if(message.overridableFeatures!=null&&message.hasOwnProperty("overridableFeatures")){var error=$root.google.protobuf.FeatureSet.verify(message.overridableFeatures,long+1);if(error)return"overridableFeatures."+error}if(message.fixedFeatures!=null&&message.hasOwnProperty("fixedFeatures")){var error=$root.google.protobuf.FeatureSet.verify(message.fixedFeatures,long+1);if(error)return"fixedFeatures."+error}return null};FeatureSetEditionDefault.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;switch(object.edition){default:if(typeof object.edition==="number"){message.edition=object.edition;break}break;case"EDITION_UNKNOWN":case 0:message.edition=0;break;case"EDITION_LEGACY":case 900:message.edition=900;break;case"EDITION_PROTO2":case 998:message.edition=998;break;case"EDITION_PROTO3":case 999:message.edition=999;break;case"EDITION_2023":case 1e3:message.edition=1e3;break;case"EDITION_2024":case 1001:message.edition=1001;break;case"EDITION_2026":case 1002:message.edition=1002;break;case"EDITION_UNSTABLE":case 9999:message.edition=9999;break;case"EDITION_1_TEST_ONLY":case 1:message.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:message.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:message.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:message.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:message.edition=99999;break;case"EDITION_MAX":case 2147483647:message.edition=2147483647;break}if(object.overridableFeatures!=null){if(typeof object.overridableFeatures!=="object")throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected");message.overridableFeatures=$root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures,long+1)}if(object.fixedFeatures!=null){if(typeof object.fixedFeatures!=="object")throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected");message.fixedFeatures=$root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures,long+1)}return message};FeatureSetEditionDefault.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.edition=options.enums===String?"EDITION_UNKNOWN":0;object.overridableFeatures=null;object.fixedFeatures=null}if(message.edition!=null&&message.hasOwnProperty("edition"))object.edition=options.enums===String?$root.google.protobuf.Edition[message.edition]===undefined?message.edition:$root.google.protobuf.Edition[message.edition]:message.edition;if(message.overridableFeatures!=null&&message.hasOwnProperty("overridableFeatures"))object.overridableFeatures=$root.google.protobuf.FeatureSet.toObject(message.overridableFeatures,options);if(message.fixedFeatures!=null&&message.hasOwnProperty("fixedFeatures"))object.fixedFeatures=$root.google.protobuf.FeatureSet.toObject(message.fixedFeatures,options);return object};FeatureSetEditionDefault.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FeatureSetEditionDefault.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"};return FeatureSetEditionDefault}();return FeatureSetDefaults}();protobuf.SourceCodeInfo=function(){function SourceCodeInfo(properties){this.location=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.SourceCodeInfo;while(reader.pos>>3){case 1:{if(!(message.location&&message.location.length))message.location=[];message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};SourceCodeInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};SourceCodeInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.location!=null&&message.hasOwnProperty("location")){if(!Array.isArray(message.location))return"location: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.SourceCodeInfo;if(object.location){if(!Array.isArray(object.location))throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");message.location=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.SourceCodeInfo.Location;while(reader.pos>>3){case 1:{if(!(message.path&&message.path.length))message.path=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.path!=null&&message.hasOwnProperty("path")){if(!Array.isArray(message.path))return"path: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.SourceCodeInfo.Location;if(object.path){if(!Array.isArray(object.path))throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");message.path=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.GeneratedCodeInfo;while(reader.pos>>3){case 1:{if(!(message.annotation&&message.annotation.length))message.annotation=[];message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};GeneratedCodeInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GeneratedCodeInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.annotation!=null&&message.hasOwnProperty("annotation")){if(!Array.isArray(message.annotation))return"annotation: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.GeneratedCodeInfo;if(object.annotation){if(!Array.isArray(object.annotation))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");message.annotation=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.GeneratedCodeInfo.Annotation;while(reader.pos>>3){case 1:{if(!(message.path&&message.path.length))message.path=[];if((tag&7)===2){var end2=reader.uint32()+reader.pos;while(reader.pos$util.recursionLimit)return"maximum nesting depth exceeded";if(message.path!=null&&message.hasOwnProperty("path")){if(!Array.isArray(message.path))return"path: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.GeneratedCodeInfo.Annotation;if(object.path){if(!Array.isArray(object.path))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");message.path=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Duration;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Duration.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Duration.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected";if(message.nanos!=null&&message.hasOwnProperty("nanos"))if(!$util.isInteger(message.nanos))return"nanos: integer expected";return null};Duration.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Duration)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Duration;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};Duration.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.seconds=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.seconds=options.longs===String?"0":0;object.nanos=0}if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(message.nanos!=null&&message.hasOwnProperty("nanos"))object.nanos=message.nanos;return object};Duration.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Duration.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Duration"};return Duration}();protobuf.FieldMask=function(){function FieldMask(properties){this.paths=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FieldMask;while(reader.pos>>3){case 1:{if(!(message.paths&&message.paths.length))message.paths=[];message.paths.push(reader.string());break}default:reader.skipType(tag&7,long);break}}return message};FieldMask.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FieldMask.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.paths!=null&&message.hasOwnProperty("paths")){if(!Array.isArray(message.paths))return"paths: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FieldMask;if(object.paths){if(!Array.isArray(object.paths))throw TypeError(".google.protobuf.FieldMask.paths: array expected");message.paths=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Timestamp;while(reader.pos>>3){case 1:{message.seconds=reader.int64();break}case 2:{message.nanos=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Timestamp.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Timestamp.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(!$util.isInteger(message.seconds)&&!(message.seconds&&$util.isInteger(message.seconds.low)&&$util.isInteger(message.seconds.high)))return"seconds: integer|Long expected";if(message.nanos!=null&&message.hasOwnProperty("nanos"))if(!$util.isInteger(message.nanos))return"nanos: integer expected";return null};Timestamp.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Timestamp)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Timestamp;if(object.seconds!=null)if($util.Long)(message.seconds=$util.Long.fromValue(object.seconds)).unsigned=false;else if(typeof object.seconds==="string")message.seconds=parseInt(object.seconds,10);else if(typeof object.seconds==="number")message.seconds=object.seconds;else if(typeof object.seconds==="object")message.seconds=new $util.LongBits(object.seconds.low>>>0,object.seconds.high>>>0).toNumber();if(object.nanos!=null)message.nanos=object.nanos|0;return message};Timestamp.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.seconds=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.seconds=options.longs===String?"0":0;object.nanos=0}if(message.seconds!=null&&message.hasOwnProperty("seconds"))if(typeof message.seconds==="number")object.seconds=options.longs===String?String(message.seconds):message.seconds;else object.seconds=options.longs===String?$util.Long.prototype.toString.call(message.seconds):options.longs===Number?new $util.LongBits(message.seconds.low>>>0,message.seconds.high>>>0).toNumber():message.seconds;if(message.nanos!=null&&message.hasOwnProperty("nanos"))object.nanos=message.nanos;return object};Timestamp.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Timestamp.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Timestamp"};return Timestamp}();protobuf.Any=function(){function Any(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Any;while(reader.pos>>3){case 1:{message.type_url=reader.string();break}case 2:{message.value=reader.bytes();break}default:reader.skipType(tag&7,long);break}}return message};Any.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Any.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.type_url!=null&&message.hasOwnProperty("type_url"))if(!$util.isString(message.type_url))return"type_url: string expected";if(message.value!=null&&message.hasOwnProperty("value"))if(!(message.value&&typeof message.value.length==="number"||$util.isString(message.value)))return"value: buffer expected";return null};Any.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Any)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Any;if(object.type_url!=null)message.type_url=String(object.type_url);if(object.value!=null)if(typeof object.value==="string")$util.base64.decode(object.value,message.value=$util.newBuffer($util.base64.length(object.value)),0);else if(object.value.length>=0)message.value=object.value;return message};Any.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.type_url="";if(options.bytes===String)object.value="";else{object.value=[];if(options.bytes!==Array)object.value=$util.newBuffer(object.value)}}if(message.type_url!=null&&message.hasOwnProperty("type_url"))object.type_url=message.type_url;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.bytes===String?$util.base64.encode(message.value,0,message.value.length):options.bytes===Array?Array.prototype.slice.call(message.value):message.value;return object};Any.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Any.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Any"};return Any}();protobuf.Empty=function(){function Empty(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Empty;while(reader.pos>>3){default:reader.skipType(tag&7,long);break}}return message};Empty.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Empty.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";return null};Empty.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Empty)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");return new $root.google.protobuf.Empty};Empty.toObject=function toObject(){return{}};Empty.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Empty.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Empty"};return Empty}();protobuf.DoubleValue=function(){function DoubleValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.DoubleValue;while(reader.pos>>3){case 1:{message.value=reader.double();break}default:reader.skipType(tag&7,long);break}}return message};DoubleValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DoubleValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="number")return"value: number expected";return null};DoubleValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.DoubleValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.DoubleValue;if(object.value!=null)message.value=Number(object.value);return message};DoubleValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.json&&!isFinite(message.value)?String(message.value):message.value;return object};DoubleValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DoubleValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.DoubleValue"};return DoubleValue}();protobuf.FloatValue=function(){function FloatValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.FloatValue;while(reader.pos>>3){case 1:{message.value=reader.float();break}default:reader.skipType(tag&7,long);break}}return message};FloatValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};FloatValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="number")return"value: number expected";return null};FloatValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.FloatValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.FloatValue;if(object.value!=null)message.value=Number(object.value);return message};FloatValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.json&&!isFinite(message.value)?String(message.value):message.value;return object};FloatValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FloatValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.FloatValue"};return FloatValue}();protobuf.Int64Value=function(){function Int64Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Int64Value;while(reader.pos>>3){case 1:{message.value=reader.int64();break}default:reader.skipType(tag&7,long);break}}return message};Int64Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Int64Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value)&&!(message.value&&$util.isInteger(message.value.low)&&$util.isInteger(message.value.high)))return"value: integer|Long expected";return null};Int64Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Int64Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Int64Value;if(object.value!=null)if($util.Long)(message.value=$util.Long.fromValue(object.value)).unsigned=false;else if(typeof object.value==="string")message.value=parseInt(object.value,10);else if(typeof object.value==="number")message.value=object.value;else if(typeof object.value==="object")message.value=new $util.LongBits(object.value.low>>>0,object.value.high>>>0).toNumber();return message};Int64Value.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.value=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.value=options.longs===String?"0":0;if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value==="number")object.value=options.longs===String?String(message.value):message.value;else object.value=options.longs===String?$util.Long.prototype.toString.call(message.value):options.longs===Number?new $util.LongBits(message.value.low>>>0,message.value.high>>>0).toNumber():message.value;return object};Int64Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Int64Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Int64Value"};return Int64Value}();protobuf.UInt64Value=function(){function UInt64Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UInt64Value;while(reader.pos>>3){case 1:{message.value=reader.uint64();break}default:reader.skipType(tag&7,long);break}}return message};UInt64Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UInt64Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value)&&!(message.value&&$util.isInteger(message.value.low)&&$util.isInteger(message.value.high)))return"value: integer|Long expected";return null};UInt64Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UInt64Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UInt64Value;if(object.value!=null)if($util.Long)(message.value=$util.Long.fromValue(object.value)).unsigned=true;else if(typeof object.value==="string")message.value=parseInt(object.value,10);else if(typeof object.value==="number")message.value=object.value;else if(typeof object.value==="object")message.value=new $util.LongBits(object.value.low>>>0,object.value.high>>>0).toNumber(true);return message};UInt64Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)if($util.Long){var long=new $util.Long(0,0,true);object.value=options.longs===String?long.toString():options.longs===Number?long.toNumber():long}else object.value=options.longs===String?"0":0;if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value==="number")object.value=options.longs===String?String(message.value):message.value;else object.value=options.longs===String?$util.Long.prototype.toString.call(message.value):options.longs===Number?new $util.LongBits(message.value.low>>>0,message.value.high>>>0).toNumber(true):message.value;return object};UInt64Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UInt64Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UInt64Value"};return UInt64Value}();protobuf.Int32Value=function(){function Int32Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.Int32Value;while(reader.pos>>3){case 1:{message.value=reader.int32();break}default:reader.skipType(tag&7,long);break}}return message};Int32Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Int32Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value))return"value: integer expected";return null};Int32Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.Int32Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.Int32Value;if(object.value!=null)message.value=object.value|0;return message};Int32Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};Int32Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Int32Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.Int32Value"};return Int32Value}();protobuf.UInt32Value=function(){function UInt32Value(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.UInt32Value;while(reader.pos>>3){case 1:{message.value=reader.uint32();break}default:reader.skipType(tag&7,long);break}}return message};UInt32Value.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};UInt32Value.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isInteger(message.value))return"value: integer expected";return null};UInt32Value.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.UInt32Value)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.UInt32Value;if(object.value!=null)message.value=object.value>>>0;return message};UInt32Value.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=0;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};UInt32Value.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UInt32Value.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.UInt32Value"};return UInt32Value}();protobuf.BoolValue=function(){function BoolValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.BoolValue;while(reader.pos>>3){case 1:{message.value=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};BoolValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BoolValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(typeof message.value!=="boolean")return"value: boolean expected";return null};BoolValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.BoolValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.BoolValue;if(object.value!=null)message.value=Boolean(object.value);return message};BoolValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value=false;if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};BoolValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BoolValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.BoolValue"};return BoolValue}();protobuf.StringValue=function(){function StringValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.StringValue;while(reader.pos>>3){case 1:{message.value=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};StringValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};StringValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!$util.isString(message.value))return"value: string expected";return null};StringValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.StringValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.StringValue;if(object.value!=null)message.value=String(object.value);return message};StringValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.value="";if(message.value!=null&&message.hasOwnProperty("value"))object.value=message.value;return object};StringValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};StringValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.StringValue"};return StringValue}();protobuf.BytesValue=function(){function BytesValue(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.protobuf.BytesValue;while(reader.pos>>3){case 1:{message.value=reader.bytes();break}default:reader.skipType(tag&7,long);break}}return message};BytesValue.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};BytesValue.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.value!=null&&message.hasOwnProperty("value"))if(!(message.value&&typeof message.value.length==="number"||$util.isString(message.value)))return"value: buffer expected";return null};BytesValue.fromObject=function fromObject(object,long){if(object instanceof $root.google.protobuf.BytesValue)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.protobuf.BytesValue;if(object.value!=null)if(typeof object.value==="string")$util.base64.decode(object.value,message.value=$util.newBuffer($util.base64.length(object.value)),0);else if(object.value.length>=0)message.value=object.value;return message};BytesValue.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)if(options.bytes===String)object.value="";else{object.value=[];if(options.bytes!==Array)object.value=$util.newBuffer(object.value)}if(message.value!=null&&message.hasOwnProperty("value"))object.value=options.bytes===String?$util.base64.encode(message.value,0,message.value.length):options.bytes===Array?Array.prototype.slice.call(message.value):message.value;return object};BytesValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BytesValue.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.protobuf.BytesValue"};return BytesValue}();return protobuf}();google.type=function(){var type={};type.DayOfWeek=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DAY_OF_WEEK_UNSPECIFIED"]=0;values[valuesById[1]="MONDAY"]=1;values[valuesById[2]="TUESDAY"]=2;values[valuesById[3]="WEDNESDAY"]=3;values[valuesById[4]="THURSDAY"]=4;values[valuesById[5]="FRIDAY"]=5;values[valuesById[6]="SATURDAY"]=6;values[valuesById[7]="SUNDAY"]=7;return values}();type.Month=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MONTH_UNSPECIFIED"]=0;values[valuesById[1]="JANUARY"]=1;values[valuesById[2]="FEBRUARY"]=2;values[valuesById[3]="MARCH"]=3;values[valuesById[4]="APRIL"]=4;values[valuesById[5]="MAY"]=5;values[valuesById[6]="JUNE"]=6;values[valuesById[7]="JULY"]=7;values[valuesById[8]="AUGUST"]=8;values[valuesById[9]="SEPTEMBER"]=9;values[valuesById[10]="OCTOBER"]=10;values[valuesById[11]="NOVEMBER"]=11;values[valuesById[12]="DECEMBER"]=12;return values}();return type}();google.rpc=function(){var rpc={};rpc.Status=function(){function Status(properties){this.details=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.rpc.Status;while(reader.pos>>3){case 1:{message.code=reader.int32();break}case 2:{message.message=reader.string();break}case 3:{if(!(message.details&&message.details.length))message.details=[];message.details.push($root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1));break}default:reader.skipType(tag&7,long);break}}return message};Status.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Status.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.code!=null&&message.hasOwnProperty("code"))if(!$util.isInteger(message.code))return"code: integer expected";if(message.message!=null&&message.hasOwnProperty("message"))if(!$util.isString(message.message))return"message: string expected";if(message.details!=null&&message.hasOwnProperty("details")){if(!Array.isArray(message.details))return"details: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.rpc.Status;if(object.code!=null)message.code=object.code|0;if(object.message!=null)message.message=String(object.message);if(object.details){if(!Array.isArray(object.details))throw TypeError(".google.rpc.Status.details: array expected");message.details=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.Operation;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.metadata=$root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1);break}case 3:{message.done=reader.bool();break}case 4:{message.error=$root.google.rpc.Status.decode(reader,reader.uint32(),undefined,long+1);break}case 5:{message.response=$root.google.protobuf.Any.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};Operation.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};Operation.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";var properties={};if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.metadata!=null&&message.hasOwnProperty("metadata")){var error=$root.google.protobuf.Any.verify(message.metadata,long+1);if(error)return"metadata."+error}if(message.done!=null&&message.hasOwnProperty("done"))if(typeof message.done!=="boolean")return"done: boolean expected";if(message.error!=null&&message.hasOwnProperty("error")){properties.result=1;{var error=$root.google.rpc.Status.verify(message.error,long+1);if(error)return"error."+error}}if(message.response!=null&&message.hasOwnProperty("response")){if(properties.result===1)return"result: multiple values";properties.result=1;{var error=$root.google.protobuf.Any.verify(message.response,long+1);if(error)return"response."+error}}return null};Operation.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.Operation)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.Operation;if(object.name!=null)message.name=String(object.name);if(object.metadata!=null){if(typeof object.metadata!=="object")throw TypeError(".google.longrunning.Operation.metadata: object expected");message.metadata=$root.google.protobuf.Any.fromObject(object.metadata,long+1)}if(object.done!=null)message.done=Boolean(object.done);if(object.error!=null){if(typeof object.error!=="object")throw TypeError(".google.longrunning.Operation.error: object expected");message.error=$root.google.rpc.Status.fromObject(object.error,long+1)}if(object.response!=null){if(typeof object.response!=="object")throw TypeError(".google.longrunning.Operation.response: object expected");message.response=$root.google.protobuf.Any.fromObject(object.response,long+1)}return message};Operation.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.metadata=null;object.done=false}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.metadata!=null&&message.hasOwnProperty("metadata"))object.metadata=$root.google.protobuf.Any.toObject(message.metadata,options);if(message.done!=null&&message.hasOwnProperty("done"))object.done=message.done;if(message.error!=null&&message.hasOwnProperty("error")){object.error=$root.google.rpc.Status.toObject(message.error,options);if(options.oneofs)object.result="error"}if(message.response!=null&&message.hasOwnProperty("response")){object.response=$root.google.protobuf.Any.toObject(message.response,options);if(options.oneofs)object.result="response"}return object};Operation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Operation.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.Operation"};return Operation}();longrunning.GetOperationRequest=function(){function GetOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.GetOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};GetOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};GetOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};GetOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.GetOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.GetOperationRequest;if(object.name!=null)message.name=String(object.name);return message};GetOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};GetOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.GetOperationRequest"};return GetOperationRequest}();longrunning.ListOperationsRequest=function(){function ListOperationsRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.ListOperationsRequest;while(reader.pos>>3){case 4:{message.name=reader.string();break}case 1:{message.filter=reader.string();break}case 2:{message.pageSize=reader.int32();break}case 3:{message.pageToken=reader.string();break}case 5:{message.returnPartialSuccess=reader.bool();break}default:reader.skipType(tag&7,long);break}}return message};ListOperationsRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListOperationsRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.filter!=null&&message.hasOwnProperty("filter"))if(!$util.isString(message.filter))return"filter: 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.returnPartialSuccess!=null&&message.hasOwnProperty("returnPartialSuccess"))if(typeof message.returnPartialSuccess!=="boolean")return"returnPartialSuccess: boolean expected";return null};ListOperationsRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.ListOperationsRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.ListOperationsRequest;if(object.name!=null)message.name=String(object.name);if(object.filter!=null)message.filter=String(object.filter);if(object.pageSize!=null)message.pageSize=object.pageSize|0;if(object.pageToken!=null)message.pageToken=String(object.pageToken);if(object.returnPartialSuccess!=null)message.returnPartialSuccess=Boolean(object.returnPartialSuccess);return message};ListOperationsRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.filter="";object.pageSize=0;object.pageToken="";object.name="";object.returnPartialSuccess=false}if(message.filter!=null&&message.hasOwnProperty("filter"))object.filter=message.filter;if(message.pageSize!=null&&message.hasOwnProperty("pageSize"))object.pageSize=message.pageSize;if(message.pageToken!=null&&message.hasOwnProperty("pageToken"))object.pageToken=message.pageToken;if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.returnPartialSuccess!=null&&message.hasOwnProperty("returnPartialSuccess"))object.returnPartialSuccess=message.returnPartialSuccess;return object};ListOperationsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListOperationsRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.ListOperationsRequest"};return ListOperationsRequest}();longrunning.ListOperationsResponse=function(){function ListOperationsResponse(properties){this.operations=[];this.unreachable=[];if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.ListOperationsResponse;while(reader.pos>>3){case 1:{if(!(message.operations&&message.operations.length))message.operations=[];message.operations.push($root.google.longrunning.Operation.decode(reader,reader.uint32(),undefined,long+1));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,long);break}}return message};ListOperationsResponse.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};ListOperationsResponse.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.operations!=null&&message.hasOwnProperty("operations")){if(!Array.isArray(message.operations))return"operations: array expected";for(var i=0;i$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.ListOperationsResponse;if(object.operations){if(!Array.isArray(object.operations))throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");message.operations=[];for(var i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.CancelOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};CancelOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};CancelOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};CancelOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.CancelOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.CancelOperationRequest;if(object.name!=null)message.name=String(object.name);return message};CancelOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};CancelOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CancelOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.CancelOperationRequest"};return CancelOperationRequest}();longrunning.DeleteOperationRequest=function(){function DeleteOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.DeleteOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};DeleteOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};DeleteOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";return null};DeleteOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.DeleteOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.DeleteOperationRequest;if(object.name!=null)message.name=String(object.name);return message};DeleteOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults)object.name="";if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;return object};DeleteOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.DeleteOperationRequest"};return DeleteOperationRequest}();longrunning.WaitOperationRequest=function(){function WaitOperationRequest(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.WaitOperationRequest;while(reader.pos>>3){case 1:{message.name=reader.string();break}case 2:{message.timeout=$root.google.protobuf.Duration.decode(reader,reader.uint32(),undefined,long+1);break}default:reader.skipType(tag&7,long);break}}return message};WaitOperationRequest.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};WaitOperationRequest.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.name!=null&&message.hasOwnProperty("name"))if(!$util.isString(message.name))return"name: string expected";if(message.timeout!=null&&message.hasOwnProperty("timeout")){var error=$root.google.protobuf.Duration.verify(message.timeout,long+1);if(error)return"timeout."+error}return null};WaitOperationRequest.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.WaitOperationRequest)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.WaitOperationRequest;if(object.name!=null)message.name=String(object.name);if(object.timeout!=null){if(typeof object.timeout!=="object")throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");message.timeout=$root.google.protobuf.Duration.fromObject(object.timeout,long+1)}return message};WaitOperationRequest.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.name="";object.timeout=null}if(message.name!=null&&message.hasOwnProperty("name"))object.name=message.name;if(message.timeout!=null&&message.hasOwnProperty("timeout"))object.timeout=$root.google.protobuf.Duration.toObject(message.timeout,options);return object};WaitOperationRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WaitOperationRequest.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.WaitOperationRequest"};return WaitOperationRequest}();longrunning.OperationInfo=function(){function OperationInfo(properties){if(properties)for(var keys=Object.keys(properties),i=0;i$Reader.recursionLimit)throw Error("maximum nesting depth exceeded");var end=length===undefined?reader.len:reader.pos+length,message=new $root.google.longrunning.OperationInfo;while(reader.pos>>3){case 1:{message.responseType=reader.string();break}case 2:{message.metadataType=reader.string();break}default:reader.skipType(tag&7,long);break}}return message};OperationInfo.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof $Reader))reader=new $Reader(reader);return this.decode(reader,reader.uint32())};OperationInfo.verify=function verify(message,long){if(typeof message!=="object"||message===null)return"object expected";if(long===undefined)long=0;if(long>$util.recursionLimit)return"maximum nesting depth exceeded";if(message.responseType!=null&&message.hasOwnProperty("responseType"))if(!$util.isString(message.responseType))return"responseType: string expected";if(message.metadataType!=null&&message.hasOwnProperty("metadataType"))if(!$util.isString(message.metadataType))return"metadataType: string expected";return null};OperationInfo.fromObject=function fromObject(object,long){if(object instanceof $root.google.longrunning.OperationInfo)return object;if(long===undefined)long=0;if(long>$util.recursionLimit)throw Error("maximum nesting depth exceeded");var message=new $root.google.longrunning.OperationInfo;if(object.responseType!=null)message.responseType=String(object.responseType);if(object.metadataType!=null)message.metadataType=String(object.metadataType);return message};OperationInfo.toObject=function toObject(message,options){if(!options)options={};var object={};if(options.defaults){object.responseType="";object.metadataType=""}if(message.responseType!=null&&message.hasOwnProperty("responseType"))object.responseType=message.responseType;if(message.metadataType!=null&&message.hasOwnProperty("metadataType"))object.metadataType=message.metadataType;return object};OperationInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OperationInfo.getTypeUrl=function getTypeUrl(typeUrlPrefix){if(typeUrlPrefix===undefined){typeUrlPrefix="type.googleapis.com"}return typeUrlPrefix+"/google.longrunning.OperationInfo"};return OperationInfo}();return longrunning}();return google}();return $root}); \ No newline at end of file diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index a90d4701a2b6..7f168f40bb0e 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -6983,6 +6983,8402 @@ } } } + }, + "v1beta": { + "options": { + "csharp_namespace": "Google.Cloud.BackupDR.V1Beta", + "go_package": "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb", + "java_multiple_files": true, + "java_outer_classname": "ProtectionSummaryProto", + "java_package": "com.google.cloud.backupdr.v1beta", + "php_namespace": "Google\\Cloud\\BackupDR\\V1beta", + "ruby_package": "Google::Cloud::BackupDR::V1beta", + "(google.api.resource_definition).type": "compute.googleapis.com/StoragePool", + "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/storagePools/{storage_pool}", + "(google.api.resource_definition).plural": "clusters", + "(google.api.resource_definition).singular": "cluster" + }, + "nested": { + "AppliedAutoProtectionPolicy": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/AppliedAutoProtectionPolicy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/appliedAutoProtectionPolicies/{applied_auto_protection_policy}", + "(google.api.resource).plural": "appliedAutoProtectionPolicies", + "(google.api.resource).singular": "appliedAutoProtectionPolicy" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "sourceBinding": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "criteria": { + "type": "Criteria", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupPlanDetails": { + "rule": "repeated", + "type": "BackupPlanDetail", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bindingEvaluationSummary": { + "type": "BindingEvaluationSummary", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETION_INITIATED": 3 + } + } + } + }, + "ListAppliedAutoProtectionPoliciesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAppliedAutoProtectionPoliciesResponse": { + "fields": { + "appliedAutoProtectionPolicies": { + "rule": "repeated", + "type": "AppliedAutoProtectionPolicy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "AutoProtectionPolicy": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/AutoProtectionPolicy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}", + "(google.api.resource).plural": "autoProtectionPolicies", + "(google.api.resource).singular": "autoProtectionPolicy" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupPlanDetails": { + "rule": "repeated", + "type": "BackupPlanDetail", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "criteria": { + "type": "Criteria", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 6 + }, + "bindingSummary": { + "type": "BindingSummary", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "policyEvaluationSummary": { + "type": "PolicyEvaluationSummary", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "UPDATING": 3, + "DELETING": 4 + } + } + } + }, + "BackupPlanDetail": { + "fields": { + "resourceType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "Criteria": { + "fields": { + "matchingConditions": { + "rule": "repeated", + "type": "MatchingCondition", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MatchingCondition": { + "oneofs": { + "condition": { + "oneof": [ + "labelCondition" + ] + } + }, + "fields": { + "labelCondition": { + "type": "KeyValuePair", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PolicyEvaluationSummary": { + "fields": { + "matchingResourceCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "protectedResourceCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failedResourceCount": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BindingSummary": { + "fields": { + "projectCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KeyValuePair": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateAutoProtectionPolicyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "autoProtectionPolicyId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoProtectionPolicy": { + "type": "AutoProtectionPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetAutoProtectionPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicy" + } + } + } + }, + "UpdateAutoProtectionPolicyRequest": { + "fields": { + "autoProtectionPolicy": { + "type": "AutoProtectionPolicy", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteAutoProtectionPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicy" + } + }, + "etag": { + "type": "string", + "id": 2 + } + } + }, + "ListAutoProtectionPoliciesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAutoProtectionPoliciesResponse": { + "fields": { + "autoProtectionPolicies": { + "rule": "repeated", + "type": "AutoProtectionPolicy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "AutoProtectionPolicyBinding": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}", + "(google.api.resource).plural": "autoProtectionPolicyBindings", + "(google.api.resource).singular": "autoProtectionPolicyBinding" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "scope": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "*" + } + }, + "bindingEvaluationSummary": { + "type": "BindingEvaluationSummary", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETION_INITIATED": 3 + } + } + } + }, + "BindingEvaluationSummary": { + "fields": { + "matchingResourceCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "protectedResourceCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failedResourceCount": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateAutoProtectionPolicyBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicy" + } + }, + "autoProtectionPolicyBindingId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoProtectionPolicyBinding": { + "type": "AutoProtectionPolicyBinding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetAutoProtectionPolicyBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + } + } + }, + "ListAutoProtectionPolicyBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicy" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAutoProtectionPolicyBindingsResponse": { + "fields": { + "autoProtectionPolicyBindings": { + "rule": "repeated", + "type": "AutoProtectionPolicyBinding", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "InitiateDeleteAutoProtectionPolicyBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + } + } + }, + "BackupDR": { + "options": { + "(google.api.default_host)": "backupdr.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-backupdr,https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListManagementServers": { + "requestType": "ListManagementServersRequest", + "responseType": "ListManagementServersResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/managementServers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/managementServers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetManagementServer": { + "requestType": "GetManagementServerRequest", + "responseType": "ManagementServer", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/managementServers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateManagementServer": { + "requestType": "CreateManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/managementServers", + "(google.api.http).body": "management_server", + "(google.api.method_signature)": "parent,management_server,management_server_id", + "(google.longrunning.operation_info).response_type": "ManagementServer", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/managementServers", + "body": "management_server" + } + }, + { + "(google.api.method_signature)": "parent,management_server,management_server_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ManagementServer", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteManagementServer": { + "requestType": "DeleteManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/managementServers/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/backupVaults", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/backupVaults", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchUsableBackupVaults": { + "requestType": "FetchUsableBackupVaultsRequest", + "responseType": "FetchUsableBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "backup_vault,update_mask", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "backup_vault,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupVault": { + "requestType": "DeleteBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListDataSources": { + "requestType": "ListDataSourcesRequest", + "responseType": "ListDataSourcesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSource": { + "requestType": "GetDataSourceRequest", + "responseType": "DataSource", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataSource": { + "requestType": "UpdateDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.http).body": "data_source", + "(google.api.method_signature)": "data_source,update_mask", + "(google.longrunning.operation_info).response_type": "DataSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "body": "data_source" + } + }, + { + "(google.api.method_signature)": "data_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchBackupsForResourceType": { + "requestType": "FetchBackupsForResourceTypeRequest", + "responseType": "FetchBackupsForResourceTypeResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType", + "(google.api.method_signature)": "parent,resource_type" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType" + } + }, + { + "(google.api.method_signature)": "parent,resource_type" + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackup": { + "requestType": "RestoreBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlan": { + "requestType": "CreateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/backupPlans", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/backupPlans", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateBackupPlan": { + "requestType": "UpdateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{backup_plan.name=projects/*/locations/*/backupPlans/*}", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "backup_plan,update_mask", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{backup_plan.name=projects/*/locations/*/backupPlans/*}", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "backup_plan,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlan": { + "requestType": "GetBackupPlanRequest", + "responseType": "BackupPlan", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlans": { + "requestType": "ListBackupPlansRequest", + "responseType": "ListBackupPlansResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/backupPlans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/backupPlans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlan": { + "requestType": "DeleteBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanRevision": { + "requestType": "GetBackupPlanRevisionRequest", + "responseType": "BackupPlanRevision", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupPlans/*/revisions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupPlans/*/revisions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanRevisions": { + "requestType": "ListBackupPlanRevisionsRequest", + "responseType": "ListBackupPlanRevisionsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/backupPlans/*}/revisions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/backupPlans/*}/revisions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateBackupPlanAssociation": { + "requestType": "CreateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateBackupPlanAssociation": { + "requestType": "UpdateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "backup_plan_association,update_mask", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "backup_plan_association,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanAssociation": { + "requestType": "GetBackupPlanAssociationRequest", + "responseType": "BackupPlanAssociation", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanAssociations": { + "requestType": "ListBackupPlanAssociationsRequest", + "responseType": "ListBackupPlanAssociationsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "requestType": "FetchBackupPlanAssociationsForResourceTypeRequest", + "responseType": "FetchBackupPlanAssociationsForResourceTypeResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType", + "(google.api.method_signature)": "parent,resource_type" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType" + } + }, + { + "(google.api.method_signature)": "parent,resource_type" + } + ] + }, + "DeleteBackupPlanAssociation": { + "requestType": "DeleteBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TriggerBackup": { + "requestType": "TriggerBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,rule_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetDataSourceReference": { + "requestType": "GetDataSourceReferenceRequest", + "responseType": "DataSourceReference", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/dataSourceReferences/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/dataSourceReferences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataSourceReferences": { + "requestType": "ListDataSourceReferencesRequest", + "responseType": "ListDataSourceReferencesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchDataSourceReferencesForResourceType": { + "requestType": "FetchDataSourceReferencesForResourceTypeRequest", + "responseType": "FetchDataSourceReferencesForResourceTypeResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType", + "(google.api.method_signature)": "parent,resource_type" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType" + } + }, + { + "(google.api.method_signature)": "parent,resource_type" + } + ] + }, + "InitializeService": { + "requestType": "InitializeServiceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/serviceConfig}:initialize", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "InitializeServiceResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/serviceConfig}:initialize", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "InitializeServiceResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateAutoProtectionPolicy": { + "requestType": "CreateAutoProtectionPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies", + "(google.api.http).body": "auto_protection_policy", + "(google.api.method_signature)": "parent,auto_protection_policy,auto_protection_policy_id", + "(google.longrunning.operation_info).response_type": "AutoProtectionPolicy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies", + "body": "auto_protection_policy" + } + }, + { + "(google.api.method_signature)": "parent,auto_protection_policy,auto_protection_policy_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoProtectionPolicy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListAutoProtectionPolicies": { + "requestType": "ListAutoProtectionPoliciesRequest", + "responseType": "ListAutoProtectionPoliciesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetAutoProtectionPolicy": { + "requestType": "GetAutoProtectionPolicyRequest", + "responseType": "AutoProtectionPolicy", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAutoProtectionPolicy": { + "requestType": "UpdateAutoProtectionPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{auto_protection_policy.name=projects/*/locations/*/autoProtectionPolicies/*}", + "(google.api.http).body": "auto_protection_policy", + "(google.api.method_signature)": "auto_protection_policy,update_mask", + "(google.longrunning.operation_info).response_type": "AutoProtectionPolicy", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{auto_protection_policy.name=projects/*/locations/*/autoProtectionPolicies/*}", + "body": "auto_protection_policy" + } + }, + { + "(google.api.method_signature)": "auto_protection_policy,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoProtectionPolicy", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteAutoProtectionPolicy": { + "requestType": "DeleteAutoProtectionPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateAutoProtectionPolicyBinding": { + "requestType": "CreateAutoProtectionPolicyBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings", + "(google.api.http).body": "auto_protection_policy_binding", + "(google.api.method_signature)": "parent,auto_protection_policy_binding,auto_protection_policy_binding_id", + "(google.longrunning.operation_info).response_type": "AutoProtectionPolicyBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings", + "body": "auto_protection_policy_binding" + } + }, + { + "(google.api.method_signature)": "parent,auto_protection_policy_binding,auto_protection_policy_binding_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoProtectionPolicyBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetAutoProtectionPolicyBinding": { + "requestType": "GetAutoProtectionPolicyBindingRequest", + "responseType": "AutoProtectionPolicyBinding", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAutoProtectionPolicyBindings": { + "requestType": "ListAutoProtectionPolicyBindingsRequest", + "responseType": "ListAutoProtectionPolicyBindingsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListAppliedAutoProtectionPolicies": { + "requestType": "ListAppliedAutoProtectionPoliciesRequest", + "responseType": "ListAppliedAutoProtectionPoliciesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/appliedAutoProtectionPolicies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/appliedAutoProtectionPolicies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "InitiateDeleteAutoProtectionPolicyBinding": { + "requestType": "InitiateDeleteAutoProtectionPolicyBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}:initiateDelete", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "AutoProtectionPolicyBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}:initiateDelete", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AutoProtectionPolicyBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBindingMatchingResource": { + "requestType": "GetBindingMatchingResourceRequest", + "responseType": "BindingMatchingResource", + "options": { + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*/matchingResources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*/matchingResources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBindingMatchingResources": { + "requestType": "ListBindingMatchingResourcesRequest", + "responseType": "ListBindingMatchingResourcesResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}/matchingResources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}/matchingResources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "NetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peeringMode": { + "type": "PeeringMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PeeringMode": { + "values": { + "PEERING_MODE_UNSPECIFIED": 0, + "PRIVATE_SERVICE_ACCESS": 1 + } + } + } + }, + "ManagementURI": { + "fields": { + "webUi": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "api": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedManagementURI": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "fields": { + "firstPartyOauth2ClientId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyOauth2ClientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ManagementServer": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", + "(google.api.resource).plural": "managementServers", + "(google.api.resource).singular": "managementServer" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "InstanceType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "managementUri": { + "type": "ManagementURI", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedManagementUri": { + "type": "WorkforceIdentityBasedManagementURI", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "InstanceState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networks": { + "rule": "repeated", + "type": "NetworkConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauth2ClientId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedOauth2ClientId": { + "type": "WorkforceIdentityBasedOAuth2ClientID", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baProxyUri": { + "rule": "repeated", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "google.protobuf.BoolValue", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "BACKUP_RESTORE": 1 + } + }, + "InstanceState": { + "values": { + "INSTANCE_STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "REPAIRING": 5, + "MAINTENANCE": 6, + "ERROR": 7 + } + } + } + }, + "ListManagementServersRequest": { + "oneofs": { + "_filter": { + "oneof": [ + "filter" + ] + }, + "_orderBy": { + "oneof": [ + "orderBy" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListManagementServersResponse": { + "fields": { + "managementServers": { + "rule": "repeated", + "type": "ManagementServer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + } + } + }, + "CreateManagementServerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "managementServerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "managementServer": { + "type": "ManagementServer", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "InitializeServiceRequest": { + "oneofs": { + "initializationConfig": { + "oneof": [ + "cloudSqlInstanceInitializationConfig" + ] + } + }, + "fields": { + "cloudSqlInstanceInitializationConfig": { + "type": "CloudSqlInstanceInitializationConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupPlanLocation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "InitializeServiceResponse": { + "fields": { + "backupVaultName": { + "type": "string", + "id": 1 + }, + "backupPlanName": { + "type": "string", + "id": 2 + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "additionalInfo": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupPlan": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", + "(google.api.resource).plural": "backupPlans", + "(google.api.resource).singular": "backupPlan" + }, + "oneofs": { + "resourceProperties": { + "oneof": [ + "diskBackupPlanProperties", + "computeInstanceBackupPlanProperties" + ] + } + }, + "fields": { + "diskBackupPlanProperties": { + "type": "DiskBackupPlanProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceBackupPlanProperties": { + "type": "ComputeInstanceBackupPlanProperties", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupRules": { + "rule": "repeated", + "type": "BackupRule", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxCustomOnDemandRetentionDays": { + "type": "int32", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultServiceAccount": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logRetentionDays": { + "type": "int64", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "supportedResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionId": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionName": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4, + "UPDATING": 5 + } + } + } + }, + "BackupRule": { + "oneofs": { + "backupScheduleOneof": { + "oneof": [ + "standardSchedule" + ] + } + }, + "fields": { + "standardSchedule": { + "type": "StandardSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "backupRetentionDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StandardSchedule": { + "fields": { + "recurrenceType": { + "type": "RecurrenceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hourlyFrequency": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfWeek": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfMonth": { + "rule": "repeated", + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "months": { + "rule": "repeated", + "type": "google.type.Month", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupWindow": { + "type": "BackupWindow", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timeZone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "RecurrenceType": { + "values": { + "RECURRENCE_TYPE_UNSPECIFIED": 0, + "HOURLY": 1, + "DAILY": 2, + "WEEKLY": 3, + "MONTHLY": 4, + "YEARLY": 5 + } + } + } + }, + "BackupWindow": { + "fields": { + "startHourOfDay": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endHourOfDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOfMonth": { + "type": "WeekOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "WeekOfMonth": { + "values": { + "WEEK_OF_MONTH_UNSPECIFIED": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "FOURTH": 4, + "LAST": 5 + } + } + } + }, + "CreateBackupPlanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "BackupPlan", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansResponse": { + "fields": { + "backupPlans": { + "rule": "repeated", + "type": "BackupPlan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "DeleteBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupPlanRequest": { + "fields": { + "backupPlan": { + "type": "BackupPlan", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanRevision": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanRevision", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}", + "(google.api.resource).plural": "backupPlanRevisions", + "(google.api.resource).singular": "backupPlanRevision" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "revisionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupPlanSnapshot": { + "type": "BackupPlan", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "GetBackupPlanRevisionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanRevision" + } + } + } + }, + "ListBackupPlanRevisionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanRevision" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanRevisionsResponse": { + "fields": { + "backupPlanRevisions": { + "rule": "repeated", + "type": "BackupPlanRevision", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DiskBackupPlanProperties": { + "fields": { + "guestFlush": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ComputeInstanceBackupPlanProperties": { + "fields": { + "guestFlush": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanAssociation": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", + "(google.api.resource).plural": "backupPlanAssociations", + "(google.api.resource).singular": "backupPlanAssociation" + }, + "oneofs": { + "resourceProperties": { + "oneof": [ + "cloudSqlInstanceBackupPlanAssociationProperties", + "alloydbClusterBackupPlanAssociationProperties" + ] + } + }, + "fields": { + "cloudSqlInstanceBackupPlanAssociationProperties": { + "type": "CloudSqlInstanceBackupPlanAssociationProperties", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "alloydbClusterBackupPlanAssociationProperties": { + "type": "AlloyDBClusterBackupPlanAssociationProperties", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rulesConfigInfo": { + "rule": "repeated", + "type": "RuleConfigInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSource": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupPlanRevisionId": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupPlanRevisionName": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoProtectionPolicyBinding": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4, + "UPDATING": 5, + "PAUSED": 6 + } + } + } + }, + "RuleConfigInfo": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "PERMISSION_DENIED": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "CreateBackupPlanAssociationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanAssociationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchBackupPlanAssociationsForResourceTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchBackupPlanAssociationsForResourceTypeResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nextPageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + } + } + }, + "DeleteBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoProtectionPolicyBinding": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + } + } + }, + "UpdateBackupPlanAssociationRequest": { + "fields": { + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggerBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "ruleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customRetentionDays": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AlloyDBClusterDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "alloydb.googleapis.com/Cluster" + } + }, + "pitrWindows": { + "rule": "repeated", + "type": "AlloyDbPitrWindow", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clusterUid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "AlloyDBClusterDataSourceReferenceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "alloydb.googleapis.com/Cluster" + } + } + } + }, + "AlloyDbPitrWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logRetentionDays": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "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": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "sqladmin.googleapis.com/Instance" + } + }, + "databaseInstalledVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceTier": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudSqlInstanceBackupProperties": { + "fields": { + "databaseInstalledVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "finalBackup": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceInstance": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "sqladmin.googleapis.com/Instance" + } + }, + "instanceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceTier": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceDeleteTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudSqlInstanceDataSourceReferenceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "sqladmin.googleapis.com/Instance" + } + }, + "databaseInstalledVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "instanceTier": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CloudSqlInstanceInitializationConfig": { + "fields": { + "edition": { + "type": "Edition", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Edition": { + "values": { + "EDITION_UNSPECIFIED": 0, + "ENTERPRISE": 1, + "ENTERPRISE_PLUS": 2 + } + } + } + }, + "CloudSqlInstanceBackupPlanAssociationProperties": { + "fields": { + "instanceCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupConfigState": { + "values": { + "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PASSIVE": 2 + } + }, + "BackupView": { + "values": { + "BACKUP_VIEW_UNSPECIFIED": 0, + "BACKUP_VIEW_BASIC": 1, + "BACKUP_VIEW_FULL": 2 + } + }, + "BackupVaultView": { + "values": { + "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, + "BACKUP_VAULT_VIEW_BASIC": 1, + "BACKUP_VAULT_VIEW_FULL": 2 + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupMinimumEnforcedRetentionDuration": { + "oneof": [ + "backupMinimumEnforcedRetentionDuration" + ] + }, + "_backupRetentionInheritance": { + "oneof": [ + "backupRetentionInheritance" + ] + }, + "_deletable": { + "oneof": [ + "deletable" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_effectiveTime": { + "oneof": [ + "effectiveTime" + ] + }, + "_encryptionConfig": { + "oneof": [ + "encryptionConfig" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupMinimumEnforcedRetentionDuration": { + "type": "google.protobuf.Duration", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "backupRetentionInheritance": { + "type": "BackupRetentionInheritance", + "id": 27, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletable": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "accessRestriction": { + "type": "AccessRestriction", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "EncryptionConfig": { + "oneofs": { + "_kmsKeyName": { + "oneof": [ + "kmsKeyName" + ] + } + }, + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey", + "proto3_optional": true + } + } + } + }, + "BackupRetentionInheritance": { + "values": { + "BACKUP_RETENTION_INHERITANCE_UNSPECIFIED": 0, + "INHERIT_VAULT_RETENTION": 1, + "MATCH_BACKUP_EXPIRE_TIME": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4, + "UPDATING": 5 + } + }, + "AccessRestriction": { + "values": { + "ACCESS_RESTRICTION_UNSPECIFIED": 0, + "WITHIN_PROJECT": 1, + "WITHIN_ORGANIZATION": 2, + "UNRESTRICTED": 3, + "WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA": 4 + } + } + } + }, + "DataSource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", + "(google.api.resource).plural": "dataSources", + "(google.api.resource).singular": "dataSource" + }, + "oneofs": { + "sourceResource": { + "oneof": [ + "dataSourceGcpResource", + "dataSourceBackupApplianceApplication" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupCount": { + "oneof": [ + "backupCount" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + } + }, + "fields": { + "dataSourceGcpResource": { + "type": "DataSourceGcpResource", + "id": 26 + }, + "dataSourceBackupApplianceApplication": { + "type": "DataSourceBackupApplianceApplication", + "id": 27 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 23, + "options": { + "proto3_optional": true + } + }, + "configState": { + "type": "BackupConfigState", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigInfo": { + "type": "BackupConfigInfo", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupBlockedByVaultAccessRestriction": { + "type": "bool", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, + "BackupConfigInfo": { + "oneofs": { + "backupConfig": { + "oneof": [ + "gcpBackupConfig", + "backupApplianceBackupConfig" + ] + } + }, + "fields": { + "gcpBackupConfig": { + "type": "GcpBackupConfig", + "id": 4 + }, + "backupApplianceBackupConfig": { + "type": "BackupApplianceBackupConfig", + "id": 5 + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "PERMISSION_DENIED": 4 + } + } + } + }, + "GcpBackupConfig": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanDescription": { + "type": "string", + "id": 2 + }, + "backupPlanAssociation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanRules": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "backupPlanRevisionName": { + "type": "string", + "id": 5 + }, + "backupPlanRevisionId": { + "type": "string", + "id": 6 + }, + "autoProtectionPolicyBinding": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + } + } + }, + "BackupApplianceBackupConfig": { + "fields": { + "backupApplianceName": { + "type": "string", + "id": 1 + }, + "backupApplianceId": { + "type": "int64", + "id": 2 + }, + "slaId": { + "type": "int64", + "id": 3 + }, + "applicationName": { + "type": "string", + "id": 4 + }, + "hostName": { + "type": "string", + "id": 5 + }, + "sltName": { + "type": "string", + "id": 6 + }, + "slpName": { + "type": "string", + "id": 7 + } + } + }, + "DataSourceGcpResource": { + "oneofs": { + "gcpResourceProperties": { + "oneof": [ + "computeInstanceDatasourceProperties", + "cloudSqlInstanceDatasourceProperties", + "alloyDbClusterDatasourceProperties", + "diskDatasourceProperties" + ] + } + }, + "fields": { + "computeInstanceDatasourceProperties": { + "type": "ComputeInstanceDataSourceProperties", + "id": 4 + }, + "cloudSqlInstanceDatasourceProperties": { + "type": "CloudSqlInstanceDataSourceProperties", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "alloyDbClusterDatasourceProperties": { + "type": "AlloyDBClusterDataSourceProperties", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "diskDatasourceProperties": { + "type": "DiskDataSourceProperties", + "id": 7 + }, + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "DataSourceBackupApplianceApplication": { + "fields": { + "applicationName": { + "type": "string", + "id": 1 + }, + "backupAppliance": { + "type": "string", + "id": 2 + }, + "applianceId": { + "type": "int64", + "id": 3 + }, + "type": { + "type": "string", + "id": 4 + }, + "applicationId": { + "type": "int64", + "id": 8 + }, + "hostname": { + "type": "string", + "id": 6 + }, + "hostId": { + "type": "int64", + "id": 7 + } + } + }, + "ServiceLockInfo": { + "fields": { + "operation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupApplianceLockInfo": { + "oneofs": { + "lockSource": { + "oneof": [ + "jobName", + "backupImage", + "slaId" + ] + } + }, + "fields": { + "jobName": { + "type": "string", + "id": 6 + }, + "backupImage": { + "type": "string", + "id": 7 + }, + "slaId": { + "type": "int64", + "id": 8 + }, + "backupApplianceId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lockReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BackupLock": { + "oneofs": { + "ClientLockInfo": { + "oneof": [ + "backupApplianceLockInfo", + "serviceLockInfo" + ] + } + }, + "fields": { + "backupApplianceLockInfo": { + "type": "BackupApplianceLockInfo", + "id": 3 + }, + "serviceLockInfo": { + "type": "ServiceLockInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lockUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "backupProperties": { + "oneof": [ + "computeInstanceBackupProperties", + "cloudSqlInstanceBackupProperties", + "backupApplianceBackupProperties", + "alloyDbBackupProperties", + "diskBackupProperties" + ] + }, + "planInfo": { + "oneof": [ + "gcpBackupPlanInfo" + ] + }, + "sourceResource": { + "oneof": [ + "gcpResource" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_enforcedRetentionEndTime": { + "oneof": [ + "enforcedRetentionEndTime" + ] + }, + "_backupRetentionInheritance": { + "oneof": [ + "backupRetentionInheritance" + ] + }, + "_expireTime": { + "oneof": [ + "expireTime" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_satisfiesPzs": { + "oneof": [ + "satisfiesPzs" + ] + }, + "_satisfiesPzi": { + "oneof": [ + "satisfiesPzi" + ] + } + }, + "fields": { + "computeInstanceBackupProperties": { + "type": "ComputeInstanceBackupProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudSqlInstanceBackupProperties": { + "type": "CloudSqlInstanceBackupProperties", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceBackupProperties": { + "type": "BackupApplianceBackupProperties", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "alloyDbBackupProperties": { + "type": "AlloyDbClusterBackupProperties", + "id": 27, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "diskBackupProperties": { + "type": "DiskBackupProperties", + "id": 28, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupPlanInfo": { + "type": "GCPBackupPlanInfo", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpResource": { + "type": "BackupGcpResource", + "id": 31, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupRetentionInheritance": { + "type": "BackupVault.BackupRetentionInheritance", + "id": 30, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupType": { + "type": "BackupType", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSizeBytes": { + "type": "int64", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "kmsKeyVersions": { + "rule": "repeated", + "type": "string", + "id": 33, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + }, + "nested": { + "GCPBackupPlanInfo": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanRuleId": { + "type": "string", + "id": 2 + }, + "backupPlanRevisionName": { + "type": "string", + "id": 3 + }, + "backupPlanRevisionId": { + "type": "string", + "id": 4 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4, + "UPLOADING": 5 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "ON_DEMAND": 2, + "ON_DEMAND_OPERATIONAL": 3 + } + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupVaultView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchUsableBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchUsableBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchBackupsForResourceTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchBackupsForResourceTypeResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "view": { + "type": "BackupVaultView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupVaultRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "forceUpdateAccessRestriction": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4 + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreBackupPlanReferences": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + } + } + }, + "UpdateDataSourceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "view": { + "type": "BackupView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupRequest": { + "oneofs": { + "targetEnvironment": { + "oneof": [ + "computeInstanceTargetEnvironment", + "diskTargetEnvironment", + "regionDiskTargetEnvironment" + ] + }, + "instanceProperties": { + "oneof": [ + "computeInstanceRestoreProperties", + "diskRestoreProperties" + ] + }, + "_clearOverridesFieldMask": { + "oneof": [ + "clearOverridesFieldMask" + ] + } + }, + "fields": { + "computeInstanceTargetEnvironment": { + "type": "ComputeInstanceTargetEnvironment", + "id": 3 + }, + "diskTargetEnvironment": { + "type": "DiskTargetEnvironment", + "id": 5 + }, + "regionDiskTargetEnvironment": { + "type": "RegionDiskTargetEnvironment", + "id": 6 + }, + "computeInstanceRestoreProperties": { + "type": "ComputeInstanceRestoreProperties", + "id": 4 + }, + "diskRestoreProperties": { + "type": "DiskRestoreProperties", + "id": 7 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clearOverridesFieldMask": { + "type": "google.protobuf.FieldMask", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "RestoreBackupResponse": { + "fields": { + "targetResource": { + "type": "TargetResource", + "id": 1 + } + } + }, + "TargetResource": { + "oneofs": { + "targetResourceInfo": { + "oneof": [ + "gcpResource" + ] + } + }, + "fields": { + "gcpResource": { + "type": "GcpResource", + "id": 1 + } + } + }, + "GcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupGcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupApplianceBackupProperties": { + "oneofs": { + "_generationId": { + "oneof": [ + "generationId" + ] + }, + "_finalizeTime": { + "oneof": [ + "finalizeTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + } + }, + "fields": { + "generationId": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "finalizeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DiskTargetEnvironment": { + "oneofs": { + "_useProjectServiceAccount": { + "oneof": [ + "useProjectServiceAccount" + ] + } + }, + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "useProjectServiceAccount": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "RegionDiskTargetEnvironment": { + "oneofs": { + "_useProjectServiceAccount": { + "oneof": [ + "useProjectServiceAccount" + ] + } + }, + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "region": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "useProjectServiceAccount": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DiskRestoreProperties": { + "oneofs": { + "sourceOptions": { + "oneof": [ + "instanceBackupSource" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_sizeGb": { + "oneof": [ + "sizeGb" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_physicalBlockSizeBytes": { + "oneof": [ + "physicalBlockSizeBytes" + ] + }, + "_provisionedIops": { + "oneof": [ + "provisionedIops" + ] + }, + "_provisionedThroughput": { + "oneof": [ + "provisionedThroughput" + ] + }, + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + }, + "_storagePool": { + "oneof": [ + "storagePool" + ] + }, + "_accessMode": { + "oneof": [ + "accessMode" + ] + }, + "_architecture": { + "oneof": [ + "architecture" + ] + }, + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "instanceBackupSource": { + "type": "RestoreDiskFromInstanceOptions", + "id": 19 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "sizeGb": { + "type": "int64", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "licenses": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "physicalBlockSizeBytes": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "provisionedIops": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "provisionedThroughput": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableConfidentialCompute": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "storagePool": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "compute.googleapis.com/StoragePool", + "proto3_optional": true + } + }, + "accessMode": { + "type": "AccessMode", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "architecture": { + "type": "Architecture", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicy": { + "rule": "repeated", + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceManagerTags": { + "keyType": "string", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AccessMode": { + "values": { + "READ_WRITE_SINGLE": 0, + "READ_WRITE_MANY": 1, + "READ_ONLY_MANY": 2 + } + }, + "Architecture": { + "values": { + "ARCHITECTURE_UNSPECIFIED": 0, + "X86_64": 1, + "ARM64": 2 + } + } + } + }, + "RestoreDiskFromInstanceOptions": { + "oneofs": { + "sourceDisk": { + "oneof": [ + "sourceDeviceName", + "bootDisk" + ] + } + }, + "fields": { + "sourceDeviceName": { + "type": "string", + "id": 1 + }, + "bootDisk": { + "type": "bool", + "id": 2 + } + } + }, + "DiskBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_architecture": { + "oneof": [ + "architecture" + ] + }, + "_type": { + "oneof": [ + "type" + ] + }, + "_sizeGb": { + "oneof": [ + "sizeGb" + ] + }, + "_region": { + "oneof": [ + "region" + ] + }, + "_zone": { + "oneof": [ + "zone" + ] + }, + "_sourceDisk": { + "oneof": [ + "sourceDisk" + ] + }, + "_accessMode": { + "oneof": [ + "accessMode" + ] + }, + "_provisionedIops": { + "oneof": [ + "provisionedIops" + ] + }, + "_provisionedThroughput": { + "oneof": [ + "provisionedThroughput" + ] + }, + "_physicalBlockSizeBytes": { + "oneof": [ + "physicalBlockSizeBytes" + ] + }, + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + }, + "_storagePool": { + "oneof": [ + "storagePool" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "licenses": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 3 + }, + "architecture": { + "type": "Architecture", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "type": { + "type": "string", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "sizeGb": { + "type": "int64", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "region": { + "type": "string", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "zone": { + "type": "string", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 9 + }, + "sourceDisk": { + "type": "string", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "accessMode": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "provisionedIops": { + "type": "int64", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "provisionedThroughput": { + "type": "int64", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "physicalBlockSizeBytes": { + "type": "int64", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "enableConfidentialCompute": { + "type": "bool", + "id": 15, + "options": { + "proto3_optional": true + } + }, + "storagePool": { + "type": "string", + "id": 16, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 17 + }, + "guestFlush": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Architecture": { + "values": { + "ARCHITECTURE_UNSPECIFIED": 0, + "X86_64": 1, + "ARM64": 2 + } + } + } + }, + "DiskDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "sizeGb": { + "type": "int64", + "id": 4 + } + } + }, + "KeyRevocationActionType": { + "values": { + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "STOP": 2 + } + }, + "ComputeInstanceBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_sourceInstance": { + "oneof": [ + "sourceInstance" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "tags": { + "type": "Tags", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "machineType": { + "type": "string", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "networkInterface": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 5 + }, + "disk": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 6 + }, + "metadata": { + "type": "Metadata", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "serviceAccount": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 8 + }, + "scheduling": { + "type": "Scheduling", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "guestAccelerator": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 10 + }, + "minCpuPlatform": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "sourceInstance": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + }, + "guestFlush": { + "type": "bool", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ComputeInstanceRestoreProperties": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_advancedMachineFeatures": { + "oneof": [ + "advancedMachineFeatures" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_confidentialInstanceConfig": { + "oneof": [ + "confidentialInstanceConfig" + ] + }, + "_deletionProtection": { + "oneof": [ + "deletionProtection" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_displayDevice": { + "oneof": [ + "displayDevice" + ] + }, + "_hostname": { + "oneof": [ + "hostname" + ] + }, + "_instanceEncryptionKey": { + "oneof": [ + "instanceEncryptionKey" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + }, + "_params": { + "oneof": [ + "params" + ] + }, + "_privateIpv6GoogleAccess": { + "oneof": [ + "privateIpv6GoogleAccess" + ] + }, + "_allocationAffinity": { + "oneof": [ + "allocationAffinity" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "confidentialInstanceConfig": { + "type": "ConfidentialInstanceConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletionProtection": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "disks": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayDevice": { + "type": "DisplayDevice", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestAccelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hostname": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "minCpuPlatform": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkInterfaces": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "params": { + "type": "InstanceParams", + "id": 19, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY", + "proto3_optional": true + } + }, + "privateIpv6GoogleAccess": { + "type": "InstancePrivateIpv6GoogleAccess", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "allocationAffinity": { + "type": "AllocationAffinity", + "id": 21, + "options": { + "json_name": "reservationAffinity", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicies": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scheduling": { + "type": "Scheduling", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccounts": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "type": "Tags", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InstancePrivateIpv6GoogleAccess": { + "values": { + "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "INHERIT_FROM_SUBNETWORK": 1, + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 + } + } + } + }, + "ComputeInstanceTargetEnvironment": { + "oneofs": { + "_useProjectServiceAccount": { + "oneof": [ + "useProjectServiceAccount" + ] + } + }, + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "useProjectServiceAccount": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ComputeInstanceDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "machineType": { + "type": "string", + "id": 3 + }, + "totalDiskCount": { + "type": "int64", + "id": 4 + }, + "totalDiskSizeGb": { + "type": "int64", + "id": 5 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + }, + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_visibleCoreCount": { + "oneof": [ + "visibleCoreCount" + ] + }, + "_enableUefiNetworking": { + "oneof": [ + "enableUefiNetworking" + ] + } + }, + "fields": { + "enableNestedVirtualization": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "threadsPerCore": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "visibleCoreCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableUefiNetworking": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ConfidentialInstanceConfig": { + "oneofs": { + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + } + }, + "fields": { + "enableConfidentialCompute": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DisplayDevice": { + "oneofs": { + "_enableDisplay": { + "oneof": [ + "enableDisplay" + ] + } + }, + "fields": { + "enableDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "DEFAULT": 1, + "TIER_1": 2 + } + } + } + }, + "InstanceParams": { + "fields": { + "resourceManagerTags": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GuestOsFeature": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "type": { + "type": "FeatureType", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "FeatureType": { + "values": { + "FEATURE_TYPE_UNSPECIFIED": 0, + "VIRTIO_SCSI_MULTIQUEUE": 1, + "WINDOWS": 2, + "MULTI_IP_SUBNET": 3, + "UEFI_COMPATIBLE": 4, + "SECURE_BOOT": 5, + "GVNIC": 6, + "SEV_CAPABLE": 7, + "BARE_METAL_LINUX_COMPATIBLE": 8, + "SUSPEND_RESUME_COMPATIBLE": 9, + "SEV_LIVE_MIGRATABLE": 10, + "SEV_SNP_CAPABLE": 11, + "TDX_CAPABLE": 12, + "IDPF": 13, + "SEV_LIVE_MIGRATABLE_V2": 14 + } + } + } + }, + "AllocationAffinity": { + "oneofs": { + "_consumeAllocationType": { + "oneof": [ + "consumeAllocationType" + ] + }, + "_key": { + "oneof": [ + "key" + ] + } + }, + "fields": { + "consumeAllocationType": { + "type": "Type", + "id": 1, + "options": { + "json_name": "consumeReservationType", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "key": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_acceleratorType": { + "oneof": [ + "acceleratorType" + ] + }, + "_acceleratorCount": { + "oneof": [ + "acceleratorCount" + ] + } + }, + "fields": { + "acceleratorType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "acceleratorCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CustomerEncryptionKey": { + "oneofs": { + "key": { + "oneof": [ + "rawKey", + "rsaEncryptedKey", + "kmsKeyName" + ] + }, + "_kmsKeyServiceAccount": { + "oneof": [ + "kmsKeyServiceAccount" + ] + } + }, + "fields": { + "rawKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rsaEncryptedKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyServiceAccount": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Entry": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Metadata": { + "fields": { + "items": { + "rule": "repeated", + "type": "Entry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NetworkInterface": { + "oneofs": { + "_network": { + "oneof": [ + "network" + ] + }, + "_subnetwork": { + "oneof": [ + "subnetwork" + ] + }, + "_ipAddress": { + "oneof": [ + "ipAddress" + ] + }, + "_ipv6Address": { + "oneof": [ + "ipv6Address" + ] + }, + "_internalIpv6PrefixLength": { + "oneof": [ + "internalIpv6PrefixLength" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_stackType": { + "oneof": [ + "stackType" + ] + }, + "_ipv6AccessType": { + "oneof": [ + "ipv6AccessType" + ] + }, + "_queueCount": { + "oneof": [ + "queueCount" + ] + }, + "_nicType": { + "oneof": [ + "nicType" + ] + }, + "_networkAttachment": { + "oneof": [ + "networkAttachment" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "json_name": "networkIP", + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipv6Address": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV6", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "internalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipv6AccessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aliasIpRanges": { + "rule": "repeated", + "type": "AliasIpRange", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stackType": { + "type": "StackType", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "ipv6AccessType": { + "type": "Ipv6AccessType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "queueCount": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nicType": { + "type": "NicType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkAttachment": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4_ONLY": 1, + "IPV4_IPV6": 2 + } + }, + "Ipv6AccessType": { + "values": { + "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "NicType": { + "values": { + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2 + } + } + } + }, + "AccessConfig": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_externalIp": { + "oneof": [ + "externalIp" + ] + }, + "_externalIpv6": { + "oneof": [ + "externalIpv6" + ] + }, + "_externalIpv6PrefixLength": { + "oneof": [ + "externalIpv6PrefixLength" + ] + }, + "_setPublicPtr": { + "oneof": [ + "setPublicPtr" + ] + }, + "_publicPtrDomainName": { + "oneof": [ + "publicPtrDomainName" + ] + }, + "_networkTier": { + "oneof": [ + "networkTier" + ] + } + }, + "fields": { + "type": { + "type": "AccessType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIp": { + "type": "string", + "id": 3, + "options": { + "json_name": "natIP", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "setPublicPtr": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "publicPtrDomainName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkTier": { + "type": "NetworkTier", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "ONE_TO_ONE_NAT": 1, + "DIRECT_IPV6": 2 + } + }, + "NetworkTier": { + "values": { + "NETWORK_TIER_UNSPECIFIED": 0, + "PREMIUM": 1, + "STANDARD": 2 + } + } + } + }, + "AliasIpRange": { + "oneofs": { + "_ipCidrRange": { + "oneof": [ + "ipCidrRange" + ] + }, + "_subnetworkRangeName": { + "oneof": [ + "subnetworkRangeName" + ] + } + }, + "fields": { + "ipCidrRange": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetworkRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Scheduling": { + "oneofs": { + "_onHostMaintenance": { + "oneof": [ + "onHostMaintenance" + ] + }, + "_automaticRestart": { + "oneof": [ + "automaticRestart" + ] + }, + "_preemptible": { + "oneof": [ + "preemptible" + ] + }, + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + }, + "_provisioningModel": { + "oneof": [ + "provisioningModel" + ] + }, + "_instanceTerminationAction": { + "oneof": [ + "instanceTerminationAction" + ] + }, + "_localSsdRecoveryTimeout": { + "oneof": [ + "localSsdRecoveryTimeout" + ] + } + }, + "fields": { + "onHostMaintenance": { + "type": "OnHostMaintenance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "automaticRestart": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "preemptible": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minNodeCpus": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "provisioningModel": { + "type": "ProvisioningModel", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceTerminationAction": { + "type": "InstanceTerminationAction", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "localSsdRecoveryTimeout": { + "type": "SchedulingDuration", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "NodeAffinity": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_operator": { + "oneof": [ + "operator" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "operator": { + "type": "Operator", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } + } + }, + "OnHostMaintenance": { + "values": { + "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, + "TERMINATE": 1, + "MIGRATE": 1000 + } + }, + "ProvisioningModel": { + "values": { + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2 + } + }, + "InstanceTerminationAction": { + "values": { + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "STOP": 2 + } + } + } + }, + "SchedulingDuration": { + "oneofs": { + "_seconds": { + "oneof": [ + "seconds" + ] + }, + "_nanos": { + "oneof": [ + "nanos" + ] + } + }, + "fields": { + "seconds": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nanos": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ServiceAccount": { + "oneofs": { + "_email": { + "oneof": [ + "email" + ] + } + }, + "fields": { + "email": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "scopes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Tags": { + "fields": { + "items": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedDisk": { + "oneofs": { + "_initializeParams": { + "oneof": [ + "initializeParams" + ] + }, + "_deviceName": { + "oneof": [ + "deviceName" + ] + }, + "_kind": { + "oneof": [ + "kind" + ] + }, + "_diskTypeDeprecated": { + "oneof": [ + "diskTypeDeprecated" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + }, + "_source": { + "oneof": [ + "source" + ] + }, + "_index": { + "oneof": [ + "index" + ] + }, + "_boot": { + "oneof": [ + "boot" + ] + }, + "_autoDelete": { + "oneof": [ + "autoDelete" + ] + }, + "_diskInterface": { + "oneof": [ + "diskInterface" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_diskSizeGb": { + "oneof": [ + "diskSizeGb" + ] + }, + "_savedState": { + "oneof": [ + "savedState" + ] + }, + "_diskType": { + "oneof": [ + "diskType" + ] + }, + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "initializeParams": { + "type": "InitializeParams", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deviceName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "kind": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskTypeDeprecated": { + "type": "DiskType", + "id": 6, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "mode": { + "type": "DiskMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "source": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "index": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "boot": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "autoDelete": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "license": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskInterface": { + "type": "DiskInterface", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskSizeGb": { + "type": "int64", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "savedState": { + "type": "DiskSavedState", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "diskType": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "type": { + "type": "DiskType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InitializeParams": { + "oneofs": { + "_diskName": { + "oneof": [ + "diskName" + ] + } + }, + "fields": { + "diskName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiskType": { + "values": { + "DISK_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 + } + }, + "DiskMode": { + "values": { + "DISK_MODE_UNSPECIFIED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "LOCKED": 3 + } + }, + "DiskInterface": { + "values": { + "DISK_INTERFACE_UNSPECIFIED": 0, + "SCSI": 1, + "NVME": 2, + "NVDIMM": 3, + "ISCSI": 4 + } + }, + "DiskSavedState": { + "values": { + "DISK_SAVED_STATE_UNSPECIFIED": 0, + "PRESERVED": 1 + } + } + } + }, + "GetBindingMatchingResourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BindingMatchingResource" + } + } + } + }, + "ListBindingMatchingResourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BindingMatchingResource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBindingMatchingResourcesResponse": { + "fields": { + "matchingResources": { + "rule": "repeated", + "type": "BindingMatchingResource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "BindingMatchingResource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BindingMatchingResource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}", + "(google.api.resource).plural": "bindingMatchingResources", + "(google.api.resource).singular": "bindingMatchingResource" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "resource": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lastEvaluationTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoProtectionDetails": { + "type": "AutoProtectionDetails", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "AutoProtectionDetails": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupPlanAssociation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "dataSource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "error": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PROTECTED": 1, + "PROTECTION_FAILED": 2, + "UNPROTECTING": 3, + "UNPROTECTION_FAILED": 4 + } + } + } + }, + "DataSourceReference": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSourceReference", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}", + "(google.api.resource).plural": "dataSourceReferences", + "(google.api.resource).singular": "dataSourceReference" + }, + "oneofs": { + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "dataSource": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceBackupConfigState": { + "type": "BackupConfigState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceBackupCount": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceBackupConfigInfo": { + "type": "DataSourceBackupConfigInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceGcpResourceInfo": { + "type": "DataSourceGcpResourceInfo", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "DataSourceBackupConfigInfo": { + "fields": { + "lastBackupState": { + "type": "BackupConfigInfo.LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataSourceGcpResourceInfo": { + "oneofs": { + "resourceProperties": { + "oneof": [ + "cloudSqlInstanceProperties", + "alloyDbClusterProperties" + ] + } + }, + "fields": { + "cloudSqlInstanceProperties": { + "type": "CloudSqlInstanceDataSourceReferenceProperties", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "alloyDbClusterProperties": { + "type": "AlloyDBClusterDataSourceReferenceProperties", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetDataSourceReferenceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSourceReference" + } + } + } + }, + "ListDataSourceReferencesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSourceReference" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourceReferencesResponse": { + "fields": { + "dataSourceReferences": { + "rule": "repeated", + "type": "DataSourceReference", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchDataSourceReferencesForResourceTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSourceReference" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchDataSourceReferencesForResourceTypeResponse": { + "fields": { + "dataSourceReferences": { + "rule": "repeated", + "type": "DataSourceReference", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "BackupDrProtectionSummary": { + "options": { + "(google.api.default_host)": "backupdr.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-backupdr,https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListResourceBackupConfigs": { + "requestType": "ListResourceBackupConfigsRequest", + "responseType": "ListResourceBackupConfigsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*}/resourceBackupConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*}/resourceBackupConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListResourceBackupConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListResourceBackupConfigsResponse": { + "fields": { + "resourceBackupConfigs": { + "rule": "repeated", + "type": "ResourceBackupConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ResourceBackupConfig": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ResourceBackupConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}", + "(google.api.resource).plural": "resourceBackupConfigs", + "(google.api.resource).singular": "resourceBackupConfig" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetResource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetResourceDisplayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetResourceType": { + "type": "ResourceType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "targetResourceLabels": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "backupConfigsDetails": { + "rule": "repeated", + "type": "BackupConfigDetails", + "id": 7 + }, + "backupConfigured": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "vaulted": { + "type": "bool", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ResourceType": { + "values": { + "RESOURCE_TYPE_UNSPECIFIED": 0, + "CLOUD_SQL_INSTANCE": 1, + "COMPUTE_ENGINE_VM": 2, + "COMPUTE_ENGINE_DISK": 3, + "COMPUTE_ENGINE_REGIONAL_DISK": 4 + } + } + } + }, + "BackupConfigDetails": { + "oneofs": { + "planSpecificConfig": { + "oneof": [ + "backupDrPlanConfig", + "backupDrTemplateConfig" + ] + } + }, + "fields": { + "backupDrPlanConfig": { + "type": "BackupDrPlanConfig", + "id": 10 + }, + "backupDrTemplateConfig": { + "type": "BackupDrTemplateConfig", + "id": 11 + }, + "backupConfigSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigSourceDisplayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pitrSettings": { + "type": "PitrSettings", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestSuccessfulBackupTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "applicableResource": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupVault": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupLocations": { + "rule": "repeated", + "type": "BackupLocation", + "id": 12 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CLOUD_SQL_INSTANCE_BACKUP_CONFIG": 1, + "COMPUTE_ENGINE_RESOURCE_POLICY": 2, + "BACKUPDR_BACKUP_PLAN": 3, + "BACKUPDR_TEMPLATE": 4 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + "ERROR": 3 + } + } + } + }, + "PitrSettings": { + "fields": { + "retentionDays": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupDrTemplateConfig": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupDrPlanConfig": { + "fields": { + "backupDrPlanRules": { + "rule": "repeated", + "type": "BackupDrPlanRule", + "id": 1 + } + } + }, + "BackupDrPlanRule": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupLocation": { + "fields": { + "type": { + "type": "Type", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "locationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ZONAL": 1, + "REGIONAL": 2, + "MULTI_REGIONAL": 3 + } + } + } + } + } } } } diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy.js new file mode 100644 index 000000000000..e0dee50c255e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, autoProtectionPolicyId, autoProtectionPolicy) { + // [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this policy will be created. + * Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the policy. + * This will become the final component of the policy's resource name. + */ + // const autoProtectionPolicyId = 'abc123' + /** + * Required. The AutoProtectionPolicy resource to create. + */ + // const autoProtectionPolicy = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateAutoProtectionPolicy() { + // Construct request + const request = { + parent, + autoProtectionPolicyId, + autoProtectionPolicy, + }; + + // Run request + const [operation] = await backupdrClient.createAutoProtectionPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAutoProtectionPolicy(); + // [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy_binding.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy_binding.js new file mode 100644 index 000000000000..22c7197ac2b9 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_auto_protection_policy_binding.js @@ -0,0 +1,75 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, autoProtectionPolicyBindingId, autoProtectionPolicyBinding) { + // [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this binding will be created. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + */ + // const parent = 'abc123' + /** + * Required. The ID to use for the binding. + * This will become the final component of the binding's resource name. + */ + // const autoProtectionPolicyBindingId = 'abc123' + /** + * Required. The AutoProtectionPolicyBinding resource to create. + */ + // const autoProtectionPolicyBinding = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateAutoProtectionPolicyBinding() { + // Construct request + const request = { + parent, + autoProtectionPolicyBindingId, + autoProtectionPolicyBinding, + }; + + // Run request + const [operation] = await backupdrClient.createAutoProtectionPolicyBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAutoProtectionPolicyBinding(); + // [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan.js new file mode 100644 index 000000000000..b9274bef2ee4 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, backupPlanId, backupPlan) { + // [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /[a-z][a-z0-9-]{,62}/. + */ + // const backupPlanId = 'abc123' + /** + * Required. The `BackupPlan` resource object to create. + */ + // const backupPlan = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlan() { + // Construct request + const request = { + parent, + backupPlanId, + backupPlan, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlan(); + // [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan_association.js new file mode 100644 index 000000000000..e9845e7d9b0c --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_plan_association.js @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, backupPlanAssociationId, backupPlanAssociation) { + // [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR locations + * map to Google Cloud regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + */ + // const backupPlanAssociationId = 'abc123' + /** + * Required. The resource being created + */ + // const backupPlanAssociation = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlanAssociation() { + // Construct request + const request = { + parent, + backupPlanAssociationId, + backupPlanAssociation, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlanAssociation(); + // [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_vault.js new file mode 100644 index 000000000000..acf309e23c9a --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_backup_vault.js @@ -0,0 +1,93 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, backupVaultId, backupVault) { + // [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + */ + // const backupVaultId = 'abc123' + /** + * Required. The resource being created + */ + // const backupVault = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupVault() { + // Construct request + const request = { + parent, + backupVaultId, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.createBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupVault(); + // [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_management_server.js new file mode 100644 index 000000000000..991d95ee20dd --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.create_management_server.js @@ -0,0 +1,90 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, managementServerId, managementServer) { + // [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + */ + // const managementServerId = 'abc123' + /** + * Required. A management server + * resource google.cloud.backupdr.v1.ManagementServer + */ + // const managementServer = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateManagementServer() { + // Construct request + const request = { + parent, + managementServerId, + managementServer, + }; + + // Run request + const [operation] = await backupdrClient.createManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateManagementServer(); + // [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_auto_protection_policy.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_auto_protection_policy.js new file mode 100644 index 000000000000..1ac3044e8ee5 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_auto_protection_policy.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the policy to delete. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + */ + // const name = 'abc123' + /** + * The current etag of the AutoProtectionPolicy. + * If an etag is provided and does not match the current etag of the + * connection, the request will be rejected with an ABORTED error. + */ + // const etag = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteAutoProtectionPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteAutoProtectionPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteAutoProtectionPolicy(); + // [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup.js new file mode 100644 index 000000000000..c9081a3771c6 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackup(); + // [END backupdr_v1beta_generated_BackupDR_DeleteBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan.js new file mode 100644 index 000000000000..de4de750ee11 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the `BackupPlan` to delete. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlan(); + // [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan_association.js new file mode 100644 index 000000000000..91926a25fcbb --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_plan_association.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. This field is exclusively used by Backup and DR's auto-protection + * feature. The resource name of the `AutoProtectionPolicyBinding` that + * triggered the deletion of this association. + * Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + */ + // const autoProtectionPolicyBinding = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlanAssociation(); + // [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_vault.js new file mode 100644 index 000000000000..848e472c9abb --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_backup_vault.js @@ -0,0 +1,102 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, any data source from this backup vault will also + * be deleted. + */ + // const force = true + /** + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + */ + // const etag = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + */ + // const allowMissing = true + /** + * Optional. If set to true, backupvault deletion will proceed even if there + * are backup plans referencing the backupvault. The default is 'false'. + */ + // const ignoreBackupPlanReferences = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupVault(); + // [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_management_server.js new file mode 100644 index 000000000000..79b86ece21b8 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.delete_management_server.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteManagementServer(); + // [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backup_plan_associations_for_resource_type.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backup_plan_associations_for_resource_type.js new file mode 100644 index 000000000000..b3ea625afc26 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backup_plan_associations_for_resource_type.js @@ -0,0 +1,105 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, resourceType) { + // [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + */ + // const resourceType = 'abc123' + /** + * Optional. The maximum number of BackupPlanAssociations to return. The + * service may return fewer than this value. If unspecified, at most 50 + * BackupPlanAssociations will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous call of + * `FetchBackupPlanAssociationsForResourceType`. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `FetchBackupPlanAssociationsForResourceType` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * resource + * * backup_plan + * * state + * * data_source + * * cloud_sql_instance_backup_plan_association_properties.instance_create_time + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * Supported fields: + * * name + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchBackupPlanAssociationsForResourceType() { + // Construct request + const request = { + parent, + resourceType, + }; + + // Run request + const iterable = backupdrClient.fetchBackupPlanAssociationsForResourceTypeAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchBackupPlanAssociationsForResourceType(); + // [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backups_for_resource_type.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backups_for_resource_type.js new file mode 100644 index 000000000000..8e5ad5a0746e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_backups_for_resource_type.js @@ -0,0 +1,115 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, resourceType) { + // [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + */ + // const parent = 'abc123' + /** + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + */ + // const resourceType = 'abc123' + /** + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * name + * * state + * * backup_type + * * create_time + * * expire_time + * * enforced_retention_end_time + * * gcp_backup_plan_info.backup_plan + * * cloud_sql_instance_backup_properties.instance_tier + * * cloud_sql_instance_backup_properties.database_installed_version + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * Supported fields: + * * name + */ + // const orderBy = 'abc123' + /** + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchBackupsForResourceType() { + // Construct request + const request = { + parent, + resourceType, + }; + + // Run request + const iterable = backupdrClient.fetchBackupsForResourceTypeAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchBackupsForResourceType(); + // [END backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_data_source_references_for_resource_type.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_data_source_references_for_resource_type.js new file mode 100644 index 000000000000..b41adf06446c --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_data_source_references_for_resource_type.js @@ -0,0 +1,109 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, resourceType) { + // [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + */ + // const resourceType = 'abc123' + /** + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous call of + * `FetchDataSourceReferencesForResourceType`. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `FetchDataSourceReferencesForResourceType` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_backup_config_state + * * data_source_backup_count + * * data_source_backup_config_info.last_backup_state + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_gcp_resource_info.type + * * data_source_gcp_resource_info.location + * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * Supported fields: + * * name + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchDataSourceReferencesForResourceType() { + // Construct request + const request = { + parent, + resourceType, + }; + + // Run request + const iterable = backupdrClient.fetchDataSourceReferencesForResourceTypeAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchDataSourceReferencesForResourceType(); + // [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_usable_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_usable_backup_vaults.js new file mode 100644 index 000000000000..2b7b4bab83db --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.fetch_usable_backup_vaults.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchUsableBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.fetchUsableBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchUsableBackupVaults(); + // [END backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy.js new file mode 100644 index 000000000000..307a649c9208 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the policy to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetAutoProtectionPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getAutoProtectionPolicy(request); + console.log(response); + } + + callGetAutoProtectionPolicy(); + // [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy_binding.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy_binding.js new file mode 100644 index 000000000000..c8bd75edc63e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_auto_protection_policy_binding.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the binding to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetAutoProtectionPolicyBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getAutoProtectionPolicyBinding(request); + console.log(response); + } + + callGetAutoProtectionPolicyBinding(); + // [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup.js new file mode 100644 index 000000000000..347942e553ab --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackup(request); + console.log(response); + } + + callGetBackup(); + // [END backupdr_v1beta_generated_BackupDR_GetBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan.js new file mode 100644 index 000000000000..27daac9e26c6 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBackupPlan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the `BackupPlan` to retrieve. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlan(request); + console.log(response); + } + + callGetBackupPlan(); + // [END backupdr_v1beta_generated_BackupDR_GetBackupPlan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_association.js new file mode 100644 index 000000000000..df58557bcbd9 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_association.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlanAssociation(request); + console.log(response); + } + + callGetBackupPlanAssociation(); + // [END backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_revision.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_revision.js new file mode 100644 index 000000000000..32f7aeb812bb --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_plan_revision.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the `BackupPlanRevision` to retrieve. + * Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlanRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlanRevision(request); + console.log(response); + } + + callGetBackupPlanRevision(); + // [END backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_vault.js new file mode 100644 index 000000000000..c9fb26b15a21 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_backup_vault.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBackupVault_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupVault(request); + console.log(response); + } + + callGetBackupVault(); + // [END backupdr_v1beta_generated_BackupDR_GetBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_binding_matching_resource.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_binding_matching_resource.js new file mode 100644 index 000000000000..b31bf9b8f32c --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_binding_matching_resource.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the matching resource to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBindingMatchingResource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBindingMatchingResource(request); + console.log(response); + } + + callGetBindingMatchingResource(); + // [END backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source.js new file mode 100644 index 000000000000..cee1a4c0f358 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetDataSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetDataSource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getDataSource(request); + console.log(response); + } + + callGetDataSource(); + // [END backupdr_v1beta_generated_BackupDR_GetDataSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source_reference.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source_reference.js new file mode 100644 index 000000000000..284087492ba9 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_data_source_reference.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetDataSourceReference_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the DataSourceReference to retrieve. + * Format: + * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetDataSourceReference() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getDataSourceReference(request); + console.log(response); + } + + callGetDataSourceReference(); + // [END backupdr_v1beta_generated_BackupDR_GetDataSourceReference_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_management_server.js new file mode 100644 index 000000000000..0b383c783789 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.get_management_server.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_GetManagementServer_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getManagementServer(request); + console.log(response); + } + + callGetManagementServer(); + // [END backupdr_v1beta_generated_BackupDR_GetManagementServer_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initialize_service.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initialize_service.js new file mode 100644 index 000000000000..4565d6f4bb2f --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initialize_service.js @@ -0,0 +1,103 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, resourceType) { + // [START backupdr_v1beta_generated_BackupDR_InitializeService_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. The configuration for initializing a Cloud SQL instance. + */ + // const cloudSqlInstanceInitializationConfig = {} + /** + * Required. The resource name of the serviceConfig used to initialize the + * service. The location must be the location of the BackupVault. + * Format: `projects/{project_id}/locations/{location}/serviceConfig`. + */ + // const name = 'abc123' + /** + * Required. The resource type to which the default service config will be + * applied. Examples include, "compute.googleapis.com/Instance" and + * "storage.googleapis.com/Bucket". + */ + // const resourceType = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. The location where the BackupPlan will be created. This field is + * required for multi-region BackupVaults and is optional for regional + * BackupVaults. It is useful when creating a Backup Vault in a multi-region, + * allowing the BackupPlan to reside in a specific region within that + * multi-region. If this field is not provided, the BackupPlan will be created + * in the same location as specified in the `name` field. + */ + // const backupPlanLocation = 'abc123' + /** + * Optional. If set, validates the request and returns the result, but does + * not actually run it. + */ + // const validateOnly = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callInitializeService() { + // Construct request + const request = { + name, + resourceType, + }; + + // Run request + const [operation] = await backupdrClient.initializeService(request); + const [response] = await operation.promise(); + console.log(response); + } + + callInitializeService(); + // [END backupdr_v1beta_generated_BackupDR_InitializeService_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initiate_delete_auto_protection_policy_binding.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initiate_delete_auto_protection_policy_binding.js new file mode 100644 index 000000000000..e6624790f77a --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.initiate_delete_auto_protection_policy_binding.js @@ -0,0 +1,64 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the binding to delete. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callInitiateDeleteAutoProtectionPolicyBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.initiateDeleteAutoProtectionPolicyBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callInitiateDeleteAutoProtectionPolicyBinding(); + // [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_applied_auto_protection_policies.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_applied_auto_protection_policies.js new file mode 100644 index 000000000000..02fcee1ff0ec --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_applied_auto_protection_policies.js @@ -0,0 +1,83 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve the list of + * applied policies. Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of applied policies to return in a single + * page. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListAppliedAutoProtectionPolicies` call. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters resources listed in the + * response. + */ + // const filter = 'abc123' + /** + * Optional. An expression that sorts the results in the response. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListAppliedAutoProtectionPolicies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listAppliedAutoProtectionPoliciesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAppliedAutoProtectionPolicies(); + // [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policies.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policies.js new file mode 100644 index 000000000000..f322b08602ab --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policies.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + */ + // const filter = 'abc123' + /** + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListAutoProtectionPolicies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listAutoProtectionPoliciesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAutoProtectionPolicies(); + // [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policy_bindings.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policy_bindings.js new file mode 100644 index 000000000000..64490c62973e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_auto_protection_policy_bindings.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + */ + // const filter = 'abc123' + /** + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListAutoProtectionPolicyBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listAutoProtectionPolicyBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAutoProtectionPolicyBindings(); + // [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_associations.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_associations.js new file mode 100644 index 000000000000..2c9d3689a65e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_associations.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR, locations + * map to Google Cloud regions, for example **us-central1**. To retrieve + * backup plan associations for all locations, use "-" for the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlanAssociations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlanAssociationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlanAssociations(); + // [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_revisions.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_revisions.js new file mode 100644 index 000000000000..d6052f1d1186 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plan_revisions.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve + * `BackupPlanRevisions` information. Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * next_page_token google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * Optional. The value of + * next_page_token google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlanRevisions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlanRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlanRevisions(); + // [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plans.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plans.js new file mode 100644 index 000000000000..b2c6a4233603 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_plans.js @@ -0,0 +1,94 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. To retrieve backup plans for all locations, use "-" for + * the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * next_page_token google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * Optional. The value of + * next_page_token google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Field match expression used to filter the results. + */ + // const filter = 'abc123' + /** + * Optional. Field by which to sort the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlans() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlansAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlans(); + // [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_vaults.js new file mode 100644 index 000000000000..4485c0f0e80e --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backup_vaults.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupVaults(); + // [END backupdr_v1beta_generated_BackupDR_ListBackupVaults_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backups.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backups.js new file mode 100644 index 000000000000..d47e027b252a --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_backups.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBackups_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackups(); + // [END backupdr_v1beta_generated_BackupDR_ListBackups_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_binding_matching_resources.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_binding_matching_resources.js new file mode 100644 index 000000000000..bf908dac6307 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_binding_matching_resources.js @@ -0,0 +1,93 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project, location, auto protection policy and binding for + * which to retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example **us-central1**. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BindingMatchingResources` to return in a + * single response. The default page size is 100 and maximum page size is 200. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * next_page_token google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * Optional. The value of + * next_page_token google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token + * received from a previous `ListBindingMatchingResources` call. Provide this + * to retrieve the subsequent page in a multi-page list of results. When + * paginating, all other parameters provided to `ListBindingMatchingResources` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Field match expression used to filter the results. + */ + // const filter = 'abc123' + /** + * Optional. Field by which to sort the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBindingMatchingResources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBindingMatchingResourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBindingMatchingResources(); + // [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_source_references.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_source_references.js new file mode 100644 index 000000000000..2b764401fc74 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_source_references.js @@ -0,0 +1,96 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * The following field and operator combinations are supported: + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + */ + // const filter = 'abc123' + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * Supported fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListDataSourceReferences() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listDataSourceReferencesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataSourceReferences(); + // [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_sources.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_sources.js new file mode 100644 index 000000000000..148becb812ef --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_data_sources.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListDataSources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListDataSources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listDataSourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataSources(); + // [END backupdr_v1beta_generated_BackupDR_ListDataSources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_management_servers.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_management_servers.js new file mode 100644 index 000000000000..9c042164a959 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.list_management_servers.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDR_ListManagementServers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListManagementServers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listManagementServersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListManagementServers(); + // [END backupdr_v1beta_generated_BackupDR_ListManagementServers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.restore_backup.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.restore_backup.js new file mode 100644 index 000000000000..a8b6ed13fa0f --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.restore_backup.js @@ -0,0 +1,109 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_RestoreBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Compute Engine target environment to be used during restore. + */ + // const computeInstanceTargetEnvironment = {} + /** + * Disk target environment to be used during restore. + */ + // const diskTargetEnvironment = {} + /** + * Region disk target environment to be used during restore. + */ + // const regionDiskTargetEnvironment = {} + /** + * Compute Engine instance properties to be overridden during restore. + */ + // const computeInstanceRestoreProperties = {} + /** + * Disk properties to be overridden during restore. + */ + // const diskRestoreProperties = {} + /** + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. A field mask used to clear server-side default values + * for fields within the `instance_properties` oneof. + * When a field in this mask is cleared, the server will not apply its + * default logic (like inheriting a value from the source) for that field. + * The most common current use case is clearing default encryption keys. + * Examples of field mask paths: + * - Compute Instance Disks: + * `compute_instance_restore_properties.disks.*.disk_encryption_key` + * - Single Disk: `disk_restore_properties.disk_encryption_key` + */ + // const clearOverridesFieldMask = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callRestoreBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.restoreBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestoreBackup(); + // [END backupdr_v1beta_generated_BackupDR_RestoreBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.trigger_backup.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.trigger_backup.js new file mode 100644 index 000000000000..3763eb77085d --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.trigger_backup.js @@ -0,0 +1,93 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START backupdr_v1beta_generated_BackupDR_TriggerBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Optional. backup rule_id for which a backup needs to be triggered. + * If not specified, on-demand backup with custom retention will be triggered. + */ + // const ruleId = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. The duration for which backup data will be kept, while taking an + * on-demand backup with custom retention. It is defined in "days". + * It is mutually exclusive with rule_id. This field is required if + * rule_id is not provided. + */ + // const customRetentionDays = 1234 + /** + * Optional. Labels to be applied on the backup. + */ + // const labels = [1,2,3,4] + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callTriggerBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.triggerBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callTriggerBackup(); + // [END backupdr_v1beta_generated_BackupDR_TriggerBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_auto_protection_policy.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_auto_protection_policy.js new file mode 100644 index 000000000000..072cd497a645 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_auto_protection_policy.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(autoProtectionPolicy, updateMask) { + // [START backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The policy to update. + */ + // const autoProtectionPolicy = {} + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * AutoProtectionPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateAutoProtectionPolicy() { + // Construct request + const request = { + autoProtectionPolicy, + updateMask, + }; + + // Run request + const [operation] = await backupdrClient.updateAutoProtectionPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateAutoProtectionPolicy(); + // [END backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup.js new file mode 100644 index 000000000000..98b4d5428f9f --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup.js @@ -0,0 +1,85 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, backup) { + // [START backupdr_v1beta_generated_BackupDR_UpdateBackup_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backup = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackup() { + // Construct request + const request = { + updateMask, + backup, + }; + + // Run request + const [operation] = await backupdrClient.updateBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackup(); + // [END backupdr_v1beta_generated_BackupDR_UpdateBackup_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan.js new file mode 100644 index 000000000000..836019f0cbf2 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(backupPlan, updateMask) { + // [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource being updated + */ + // const backupPlan = {} + /** + * Required. The list of fields to update. + * Field mask is used to specify the fields to be overwritten in the + * BackupPlan resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * Currently, these fields are supported in update: description, schedules, + * retention period, adding and removing Backup Rules. + */ + // const updateMask = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackupPlan() { + // Construct request + const request = { + backupPlan, + updateMask, + }; + + // Run request + const [operation] = await backupdrClient.updateBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupPlan(); + // [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan_association.js new file mode 100644 index 000000000000..fff042410c6f --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_plan_association.js @@ -0,0 +1,87 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(backupPlanAssociation, updateMask) { + // [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource being updated + */ + // const backupPlanAssociation = {} + /** + * Required. The list of fields to update. + * Field mask is used to specify the fields to be overwritten in the + * BackupPlanAssociation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * Currently backup_plan_association.backup_plan is the only supported field. + */ + // const updateMask = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackupPlanAssociation() { + // Construct request + const request = { + backupPlanAssociation, + updateMask, + }; + + // Run request + const [operation] = await backupdrClient.updateBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupPlanAssociation(); + // [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_vault.js new file mode 100644 index 000000000000..30422769753d --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_backup_vault.js @@ -0,0 +1,100 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, backupVault) { + // [START backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backupVault = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + */ + // const force = true + /** + * Optional. If set to true, we will force update access restriction even if + * some non compliant data sources are present. The default is 'false'. + */ + // const forceUpdateAccessRestriction = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackupVault() { + // Construct request + const request = { + updateMask, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.updateBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupVault(); + // [END backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_data_source.js new file mode 100644 index 000000000000..7b869f92575d --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_d_r.update_data_source.js @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(updateMask, dataSource) { + // [START backupdr_v1beta_generated_BackupDR_UpdateDataSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const dataSource = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. Enable upsert. + */ + // const allowMissing = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateDataSource() { + // Construct request + const request = { + updateMask, + dataSource, + }; + + // Run request + const [operation] = await backupdrClient.updateDataSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataSource(); + // [END backupdr_v1beta_generated_BackupDR_UpdateDataSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/samples/generated/v1beta/backup_dr_protection_summary.list_resource_backup_configs.js b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_dr_protection_summary.list_resource_backup_configs.js new file mode 100644 index 000000000000..2cdc1c1fe0c9 --- /dev/null +++ b/packages/google-cloud-backupdr/samples/generated/v1beta/backup_dr_protection_summary.list_resource_backup_configs.js @@ -0,0 +1,84 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve resource backup + * configs. Format: 'projects/{project_id}/locations/{location}'. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will use 100 as default. Maximum value is + * 500 and values above 500 will be coerced to 500. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDrProtectionSummaryClient} = require('@google-cloud/backupdr').v1beta; + + // Instantiates a client + const backupdrClient = new BackupDrProtectionSummaryClient(); + + async function callListResourceBackupConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listResourceBackupConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceBackupConfigs(); + // [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-backupdr/src/index.ts b/packages/google-cloud-backupdr/src/index.ts index 7ce4bacf80ab..b855c64e9bf5 100644 --- a/packages/google-cloud-backupdr/src/index.ts +++ b/packages/google-cloud-backupdr/src/index.ts @@ -17,13 +17,14 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; +import * as v1beta from './v1beta'; const BackupDRClient = v1.BackupDRClient; type BackupDRClient = v1.BackupDRClient; const BackupDrProtectionSummaryClient = v1.BackupDrProtectionSummaryClient; type BackupDrProtectionSummaryClient = v1.BackupDrProtectionSummaryClient; -export {v1, BackupDRClient, BackupDrProtectionSummaryClient}; -export default {v1, BackupDRClient, BackupDrProtectionSummaryClient}; +export {v1, v1beta, BackupDRClient, BackupDrProtectionSummaryClient}; +export default {v1, v1beta, BackupDRClient, BackupDrProtectionSummaryClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client.ts new file mode 100644 index 000000000000..5dacb40b90c5 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client.ts @@ -0,0 +1,12468 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/backup_d_r_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './backup_d_r_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The BackupDR Service + * @class + * @memberof v1beta + */ +export class BackupDRClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('backupdr'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + backupDRStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BackupDRClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BackupDRClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof BackupDRClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'backupdr.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts, + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + appliedAutoProtectionPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/appliedAutoProtectionPolicies/{applied_auto_protection_policy}', + ), + autoProtectionPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}', + ), + autoProtectionPolicyBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}', + ), + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}', + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}', + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}', + ), + backupPlanRevisionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}', + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}', + ), + bindingMatchingResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}', + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}', + ), + dataSourceReferencePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}', + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + managementServerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/managementServers/{managementserver}', + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}', + ), + resourceBackupConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listManagementServers: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'managementServers', + ), + listBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults', + ), + fetchUsableBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults', + ), + listDataSources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataSources', + ), + listBackups: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backups', + ), + fetchBackupsForResourceType: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backups', + ), + listBackupPlans: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlans', + ), + listBackupPlanRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlanRevisions', + ), + listBackupPlanAssociations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlanAssociations', + ), + fetchBackupPlanAssociationsForResourceType: + new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlanAssociations', + ), + listDataSourceReferences: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataSourceReferences', + ), + fetchDataSourceReferencesForResourceType: + new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataSourceReferences', + ), + listAutoProtectionPolicies: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'autoProtectionPolicies', + ), + listAutoProtectionPolicyBindings: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'autoProtectionPolicyBindings', + ), + listAppliedAutoProtectionPolicies: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'appliedAutoProtectionPolicies', + ), + listBindingMatchingResources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'matchingResources', + ), + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1beta/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1beta/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1beta/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy', + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1beta/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy', + body: '*', + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1beta/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions', + body: '*', + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1beta/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1beta/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1beta/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createManagementServerResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.ManagementServer', + ) as gax.protobuf.Type; + const createManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteManagementServerResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty', + ) as gax.protobuf.Type; + const deleteManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupVault', + ) as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupVault', + ) as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty', + ) as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateDataSourceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.DataSource', + ) as gax.protobuf.Type; + const updateDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.Backup', + ) as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.Backup', + ) as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const restoreBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.RestoreBackupResponse', + ) as gax.protobuf.Type; + const restoreBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const createBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupPlan', + ) as gax.protobuf.Type; + const createBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupPlan', + ) as gax.protobuf.Type; + const updateBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteBackupPlanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty', + ) as gax.protobuf.Type; + const deleteBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const createBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupPlanAssociation', + ) as gax.protobuf.Type; + const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupPlanAssociation', + ) as gax.protobuf.Type; + const updateBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty', + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const triggerBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.BackupPlanAssociation', + ) as gax.protobuf.Type; + const triggerBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const initializeServiceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.InitializeServiceResponse', + ) as gax.protobuf.Type; + const initializeServiceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const createAutoProtectionPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.AutoProtectionPolicy', + ) as gax.protobuf.Type; + const createAutoProtectionPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const updateAutoProtectionPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.AutoProtectionPolicy', + ) as gax.protobuf.Type; + const updateAutoProtectionPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const deleteAutoProtectionPolicyResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty', + ) as gax.protobuf.Type; + const deleteAutoProtectionPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const createAutoProtectionPolicyBindingResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding', + ) as gax.protobuf.Type; + const createAutoProtectionPolicyBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + const initiateDeleteAutoProtectionPolicyBindingResponse = + protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding', + ) as gax.protobuf.Type; + const initiateDeleteAutoProtectionPolicyBindingMetadata = + protoFilesRoot.lookup( + '.google.cloud.backupdr.v1beta.OperationMetadata', + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createManagementServerResponse.decode.bind( + createManagementServerResponse, + ), + createManagementServerMetadata.decode.bind( + createManagementServerMetadata, + ), + ), + deleteManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteManagementServerResponse.decode.bind( + deleteManagementServerResponse, + ), + deleteManagementServerMetadata.decode.bind( + deleteManagementServerMetadata, + ), + ), + createBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupVaultResponse.decode.bind(createBackupVaultResponse), + createBackupVaultMetadata.decode.bind(createBackupVaultMetadata), + ), + updateBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), + updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata), + ), + deleteBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), + deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata), + ), + updateDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataSourceResponse.decode.bind(updateDataSourceResponse), + updateDataSourceMetadata.decode.bind(updateDataSourceMetadata), + ), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata), + ), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata), + ), + restoreBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupResponse.decode.bind(restoreBackupResponse), + restoreBackupMetadata.decode.bind(restoreBackupMetadata), + ), + createBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanResponse.decode.bind(createBackupPlanResponse), + createBackupPlanMetadata.decode.bind(createBackupPlanMetadata), + ), + updateBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupPlanResponse.decode.bind(updateBackupPlanResponse), + updateBackupPlanMetadata.decode.bind(updateBackupPlanMetadata), + ), + deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), + deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata), + ), + createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanAssociationResponse.decode.bind( + createBackupPlanAssociationResponse, + ), + createBackupPlanAssociationMetadata.decode.bind( + createBackupPlanAssociationMetadata, + ), + ), + updateBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupPlanAssociationResponse.decode.bind( + updateBackupPlanAssociationResponse, + ), + updateBackupPlanAssociationMetadata.decode.bind( + updateBackupPlanAssociationMetadata, + ), + ), + deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanAssociationResponse.decode.bind( + deleteBackupPlanAssociationResponse, + ), + deleteBackupPlanAssociationMetadata.decode.bind( + deleteBackupPlanAssociationMetadata, + ), + ), + triggerBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + triggerBackupResponse.decode.bind(triggerBackupResponse), + triggerBackupMetadata.decode.bind(triggerBackupMetadata), + ), + initializeService: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + initializeServiceResponse.decode.bind(initializeServiceResponse), + initializeServiceMetadata.decode.bind(initializeServiceMetadata), + ), + createAutoProtectionPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAutoProtectionPolicyResponse.decode.bind( + createAutoProtectionPolicyResponse, + ), + createAutoProtectionPolicyMetadata.decode.bind( + createAutoProtectionPolicyMetadata, + ), + ), + updateAutoProtectionPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateAutoProtectionPolicyResponse.decode.bind( + updateAutoProtectionPolicyResponse, + ), + updateAutoProtectionPolicyMetadata.decode.bind( + updateAutoProtectionPolicyMetadata, + ), + ), + deleteAutoProtectionPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteAutoProtectionPolicyResponse.decode.bind( + deleteAutoProtectionPolicyResponse, + ), + deleteAutoProtectionPolicyMetadata.decode.bind( + deleteAutoProtectionPolicyMetadata, + ), + ), + createAutoProtectionPolicyBinding: + new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAutoProtectionPolicyBindingResponse.decode.bind( + createAutoProtectionPolicyBindingResponse, + ), + createAutoProtectionPolicyBindingMetadata.decode.bind( + createAutoProtectionPolicyBindingMetadata, + ), + ), + initiateDeleteAutoProtectionPolicyBinding: + new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + initiateDeleteAutoProtectionPolicyBindingResponse.decode.bind( + initiateDeleteAutoProtectionPolicyBindingResponse, + ), + initiateDeleteAutoProtectionPolicyBindingMetadata.decode.bind( + initiateDeleteAutoProtectionPolicyBindingMetadata, + ), + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.backupdr.v1beta.BackupDR', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')}, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.backupDRStub) { + return this.backupDRStub; + } + + // Put together the "service stub" for + // google.cloud.backupdr.v1beta.BackupDR. + this.backupDRStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.backupdr.v1beta.BackupDR', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.backupdr.v1beta.BackupDR, + this._opts, + this._providedCustomServicePath, + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const backupDRStubMethods = [ + 'listManagementServers', + 'getManagementServer', + 'createManagementServer', + 'deleteManagementServer', + 'createBackupVault', + 'listBackupVaults', + 'fetchUsableBackupVaults', + 'getBackupVault', + 'updateBackupVault', + 'deleteBackupVault', + 'listDataSources', + 'getDataSource', + 'updateDataSource', + 'listBackups', + 'fetchBackupsForResourceType', + 'getBackup', + 'updateBackup', + 'deleteBackup', + 'restoreBackup', + 'createBackupPlan', + 'updateBackupPlan', + 'getBackupPlan', + 'listBackupPlans', + 'deleteBackupPlan', + 'getBackupPlanRevision', + 'listBackupPlanRevisions', + 'createBackupPlanAssociation', + 'updateBackupPlanAssociation', + 'getBackupPlanAssociation', + 'listBackupPlanAssociations', + 'fetchBackupPlanAssociationsForResourceType', + 'deleteBackupPlanAssociation', + 'triggerBackup', + 'getDataSourceReference', + 'listDataSourceReferences', + 'fetchDataSourceReferencesForResourceType', + 'initializeService', + 'createAutoProtectionPolicy', + 'listAutoProtectionPolicies', + 'getAutoProtectionPolicy', + 'updateAutoProtectionPolicy', + 'deleteAutoProtectionPolicy', + 'createAutoProtectionPolicyBinding', + 'getAutoProtectionPolicyBinding', + 'listAutoProtectionPolicyBindings', + 'listAppliedAutoProtectionPolicies', + 'initiateDeleteAutoProtectionPolicyBinding', + 'getBindingMatchingResource', + 'listBindingMatchingResources', + ]; + for (const methodName of backupDRStubMethods) { + const callPromise = this.backupDRStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.backupDRStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'backupdr.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'backupdr.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-backupdr', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets details of a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.ManagementServer|ManagementServer}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_management_server.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetManagementServer_async + */ + getManagementServer( + request?: protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IManagementServer, + ( + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | undefined + ), + {} | undefined, + ] + >; + getManagementServer( + request: protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IManagementServer, + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getManagementServer( + request: protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IManagementServer, + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getManagementServer( + request?: protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IManagementServer, + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IManagementServer, + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IManagementServer, + ( + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getManagementServer request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IManagementServer, + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getManagementServer response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getManagementServer(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IManagementServer, + ( + | protos.google.cloud.backupdr.v1beta.IGetManagementServerRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getManagementServer response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @param {google.cloud.backupdr.v1beta.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBackupVault_async + */ + getBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest | undefined, + {} | undefined, + ] + >; + getBackupVault( + request: protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupVault, + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupVault( + request: protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupVault, + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupVault, + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBackupVault, + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBackupVault request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupVault, + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackupVault response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackupVault(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBackupVault, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupVaultRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getBackupVault response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.DataSource|DataSource}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_data_source.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetDataSource_async + */ + getDataSource( + request?: protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest | undefined, + {} | undefined, + ] + >; + getDataSource( + request: protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IDataSource, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDataSource( + request: protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IDataSource, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDataSource( + request?: protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IDataSource, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IDataSource, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getDataSource request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IDataSource, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataSource response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getDataSource(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IGetDataSourceRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getDataSource response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.Backup|Backup}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | undefined, + {} | undefined, + ] + >; + getBackup( + request: protos.google.cloud.backupdr.v1beta.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + getBackup( + request: protos.google.cloud.backupdr.v1beta.IGetBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): void; + getBackup( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBackup, + | protos.google.cloud.backupdr.v1beta.IGetBackupRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBackup request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBackup, + | protos.google.cloud.backupdr.v1beta.IGetBackupRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackup response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackup(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IGetBackupRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getBackup response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to retrieve. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlan|BackupPlan}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBackupPlan_async + */ + getBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest | undefined, + {} | undefined, + ] + >; + getBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBackupPlan request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackupPlan response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackupPlan(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IGetBackupPlanRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getBackupPlan response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single BackupPlanRevision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlanRevision` to retrieve. + * + * Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlanRevision|BackupPlanRevision}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_backup_plan_revision.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_async + */ + getBackupPlanRevision( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | undefined + ), + {} | undefined, + ] + >; + getBackupPlanRevision( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlanRevision( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlanRevision( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBackupPlanRevision request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackupPlanRevision response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackupPlanRevision(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanRevisionRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getBackupPlanRevision response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_async + */ + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | undefined + ), + {} | undefined, + ] + >; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBackupPlanAssociation request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBackupPlanAssociation response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBackupPlanAssociation(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1beta.IGetBackupPlanAssociationRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getBackupPlanAssociation response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single DataSourceReference. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DataSourceReference to retrieve. + * Format: + * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_data_source_reference.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetDataSourceReference_async + */ + getDataSourceReference( + request?: protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + ( + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | undefined + ), + {} | undefined, + ] + >; + getDataSourceReference( + request: protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDataSourceReference( + request: protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDataSourceReference( + request?: protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + ( + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getDataSourceReference request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataSourceReference response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getDataSourceReference(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference, + ( + | protos.google.cloud.backupdr.v1beta.IGetDataSourceReferenceRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getDataSourceReference response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single AutoProtectionPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the policy to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy|AutoProtectionPolicy}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_async + */ + getAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | undefined + ), + {} | undefined, + ] + >; + getAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getAutoProtectionPolicy request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getAutoProtectionPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getAutoProtectionPolicy(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getAutoProtectionPolicy response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Returns the auto protection policy binding read from the CCFE tables. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the binding to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding|AutoProtectionPolicyBinding}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_auto_protection_policy_binding.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_async + */ + getAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | undefined + ), + {} | undefined, + ] + >; + getAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getAutoProtectionPolicyBinding request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info( + 'getAutoProtectionPolicyBinding response %j', + response, + ); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getAutoProtectionPolicyBinding(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + ( + | protos.google.cloud.backupdr.v1beta.IGetAutoProtectionPolicyBindingRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info( + 'getAutoProtectionPolicyBinding response %j', + response, + ); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets details of a single Binding Matching Resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the matching resource to retrieve. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1beta.BindingMatchingResource|BindingMatchingResource}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.get_binding_matching_resource.js + * region_tag:backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_async + */ + getBindingMatchingResource( + request?: protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + ( + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | undefined + ), + {} | undefined, + ] + >; + getBindingMatchingResource( + request: protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBindingMatchingResource( + request: protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getBindingMatchingResource( + request?: protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + ( + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + this._log.info('getBindingMatchingResource request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getBindingMatchingResource response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getBindingMatchingResource(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource, + ( + | protos.google.cloud.backupdr.v1beta.IGetBindingMatchingResourceRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getBindingMatchingResource response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Creates a new ManagementServer in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.managementServerId + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + * @param {google.cloud.backupdr.v1beta.ManagementServer} request.managementServer + * Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_management_server.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateManagementServer_async + */ + createManagementServer( + request?: protos.google.cloud.backupdr.v1beta.ICreateManagementServerRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createManagementServer( + request: protos.google.cloud.backupdr.v1beta.ICreateManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createManagementServer( + request: protos.google.cloud.backupdr.v1beta.ICreateManagementServerRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createManagementServer( + request?: protos.google.cloud.backupdr.v1beta.ICreateManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createManagementServer response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createManagementServer request %j', request); + return this.innerApiCalls + .createManagementServer(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createManagementServer response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createManagementServer()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_management_server.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateManagementServer_async + */ + async checkCreateManagementServerProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.ManagementServer, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createManagementServer long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createManagementServer, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.ManagementServer, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async + */ + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1beta.IDeleteManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteManagementServer response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteManagementServer request %j', request); + return this.innerApiCalls + .deleteManagementServer(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteManagementServer response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteManagementServer()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async + */ + async checkDeleteManagementServerProgress( + name: string, + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteManagementServer long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteManagementServer, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Creates a new BackupVault in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.backupVaultId + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + * @param {google.cloud.backupdr.v1beta.BackupVault} request.backupVault + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupVault( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupVault( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupVault( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createBackupVault response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackupVault request %j', request); + return this.innerApiCalls + .createBackupVault(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createBackupVault response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createBackupVault()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupVault, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createBackupVault long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createBackupVault, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupVault, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Updates the settings of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * @param {google.cloud.backupdr.v1beta.BackupVault} request.backupVault + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.force] + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + * @param {boolean} [request.forceUpdateAccessRestriction] + * Optional. If set to true, we will force update access restriction even if + * some non compliant data sources are present. The default is 'false'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackupVault( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupVault( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'backup_vault.name': request.backupVault!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateBackupVault response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateBackupVault request %j', request); + return this.innerApiCalls + .updateBackupVault(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateBackupVault response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateBackupVault()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupVault, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateBackupVault long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateBackupVault, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupVault, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, any data source from this backup vault will also + * be deleted. + * @param {string} request.etag + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.allowMissing] + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + * @param {boolean} [request.ignoreBackupPlanReferences] + * Optional. If set to true, backupvault deletion will proceed even if there + * are backup plans referencing the backupvault. The default is 'false'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteBackupVault response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteBackupVault request %j', request); + return this.innerApiCalls + .deleteBackupVault(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteBackupVault response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteBackupVault()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress( + name: string, + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteBackupVault long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteBackupVault, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Updates the settings of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * @param {google.cloud.backupdr.v1beta.DataSource} request.dataSource + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.allowMissing] + * Optional. Enable upsert. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_data_source.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateDataSource_async + */ + updateDataSource( + request?: protos.google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateDataSource( + request: protos.google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateDataSource( + request: protos.google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateDataSource( + request?: protos.google.cloud.backupdr.v1beta.IUpdateDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'data_source.name': request.dataSource!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateDataSource response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateDataSource request %j', request); + return this.innerApiCalls + .updateDataSource(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateDataSource response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateDataSource()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_data_source.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateDataSource_async + */ + async checkUpdateDataSourceProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.DataSource, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateDataSource long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateDataSource, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.DataSource, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Updates the settings of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * @param {google.cloud.backupdr.v1beta.Backup} request.backup + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackup( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackup( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackup( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateBackup request %j', request); + return this.innerApiCalls + .updateBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackup_async + */ + async checkUpdateBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.Backup, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.Backup, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackup( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackup( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackup( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteBackup request %j', request); + return this.innerApiCalls + .deleteBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackup_async + */ + async checkDeleteBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.Backup, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.Backup, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Restore from a Backup + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment + * Compute Engine target environment to be used during restore. + * @param {google.cloud.backupdr.v1beta.DiskTargetEnvironment} request.diskTargetEnvironment + * Disk target environment to be used during restore. + * @param {google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment} request.regionDiskTargetEnvironment + * Region disk target environment to be used during restore. + * @param {google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties + * Compute Engine instance properties to be overridden during restore. + * @param {google.cloud.backupdr.v1beta.DiskRestoreProperties} request.diskRestoreProperties + * Disk properties to be overridden during restore. + * @param {string} request.name + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {google.protobuf.FieldMask} [request.clearOverridesFieldMask] + * Optional. A field mask used to clear server-side default values + * for fields within the `instance_properties` oneof. + * + * When a field in this mask is cleared, the server will not apply its + * default logic (like inheriting a value from the source) for that field. + * + * The most common current use case is clearing default encryption keys. + * + * Examples of field mask paths: + * - Compute Instance Disks: + * `compute_instance_restore_properties.disks.*.disk_encryption_key` + * - Single Disk: `disk_restore_properties.disk_encryption_key` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.restore_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_RestoreBackup_async + */ + restoreBackup( + request?: protos.google.cloud.backupdr.v1beta.IRestoreBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + restoreBackup( + request: protos.google.cloud.backupdr.v1beta.IRestoreBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + restoreBackup( + request: protos.google.cloud.backupdr.v1beta.IRestoreBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + restoreBackup( + request?: protos.google.cloud.backupdr.v1beta.IRestoreBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('restoreBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('restoreBackup request %j', request); + return this.innerApiCalls + .restoreBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('restoreBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `restoreBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.restore_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_RestoreBackup_async + */ + async checkRestoreBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.RestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('restoreBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.restoreBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.RestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Create a BackupPlan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.backupPlanId + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. + * @param {google.cloud.backupdr.v1beta.BackupPlan} request.backupPlan + * Required. The `BackupPlan` resource object to create. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async + */ + createBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlan( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupPlan( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createBackupPlan response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackupPlan request %j', request); + return this.innerApiCalls + .createBackupPlan(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createBackupPlan response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createBackupPlan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async + */ + async checkCreateBackupPlanProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlan, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createBackupPlan long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createBackupPlan, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlan, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Update a BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.backupdr.v1beta.BackupPlan} request.backupPlan + * Required. The resource being updated + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * Field mask is used to specify the fields to be overwritten in the + * BackupPlan resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * Currently, these fields are supported in update: description, schedules, + * retention period, adding and removing Backup Rules. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async + */ + updateBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'backup_plan.name': request.backupPlan!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateBackupPlan response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateBackupPlan request %j', request); + return this.innerApiCalls + .updateBackupPlan(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateBackupPlan response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateBackupPlan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async + */ + async checkUpdateBackupPlanProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlan, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateBackupPlan long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateBackupPlan, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlan, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to delete. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async + */ + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteBackupPlan response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteBackupPlan request %j', request); + return this.innerApiCalls + .deleteBackupPlan(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteBackupPlan response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async + */ + async checkDeleteBackupPlanProgress( + name: string, + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteBackupPlan long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteBackupPlan, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Create a BackupPlanAssociation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR locations + * map to Google Cloud regions, for example **us-central1**. + * @param {string} request.backupPlanAssociationId + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + * @param {google.cloud.backupdr.v1beta.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async + */ + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.ICreateBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info( + 'createBackupPlanAssociation response %j', + rawResponse, + ); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createBackupPlanAssociation request %j', request); + return this.innerApiCalls + .createBackupPlanAssociation(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info( + 'createBackupPlanAssociation response %j', + rawResponse, + ); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createBackupPlanAssociation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async + */ + async checkCreateBackupPlanAssociationProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createBackupPlanAssociation long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Update a BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.backupdr.v1beta.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being updated + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * Field mask is used to specify the fields to be overwritten in the + * BackupPlanAssociation resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then the request will fail. + * Currently backup_plan_association.backup_plan is the only supported field. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async + */ + updateBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IUpdateBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'backup_plan_association.name': + request.backupPlanAssociation!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info( + 'updateBackupPlanAssociation response %j', + rawResponse, + ); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateBackupPlanAssociation request %j', request); + return this.innerApiCalls + .updateBackupPlanAssociation(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info( + 'updateBackupPlanAssociation response %j', + rawResponse, + ); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateBackupPlanAssociation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async + */ + async checkUpdateBackupPlanAssociationProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateBackupPlanAssociation long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} [request.autoProtectionPolicyBinding] + * Optional. This field is exclusively used by Backup and DR's auto-protection + * feature. The resource name of the `AutoProtectionPolicyBinding` that + * triggered the deletion of this association. + * Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1beta.IDeleteBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info( + 'deleteBackupPlanAssociation response %j', + rawResponse, + ); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteBackupPlanAssociation request %j', request); + return this.innerApiCalls + .deleteBackupPlanAssociation(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info( + 'deleteBackupPlanAssociation response %j', + rawResponse, + ); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + async checkDeleteBackupPlanAssociationProgress( + name: string, + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteBackupPlanAssociation long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Triggers a new Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.ruleId] + * Optional. backup rule_id for which a backup needs to be triggered. + * If not specified, on-demand backup with custom retention will be triggered. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {number} [request.customRetentionDays] + * Optional. The duration for which backup data will be kept, while taking an + * on-demand backup with custom retention. It is defined in "days". + * It is mutually exclusive with rule_id. This field is required if + * rule_id is not provided. + * @param {number[]} [request.labels] + * Optional. Labels to be applied on the backup. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_TriggerBackup_async + */ + triggerBackup( + request?: protos.google.cloud.backupdr.v1beta.ITriggerBackupRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + triggerBackup( + request: protos.google.cloud.backupdr.v1beta.ITriggerBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + triggerBackup( + request: protos.google.cloud.backupdr.v1beta.ITriggerBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + triggerBackup( + request?: protos.google.cloud.backupdr.v1beta.ITriggerBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('triggerBackup response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('triggerBackup request %j', request); + return this.innerApiCalls + .triggerBackup(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('triggerBackup response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `triggerBackup()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1beta_generated_BackupDR_TriggerBackup_async + */ + async checkTriggerBackupProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('triggerBackup long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.triggerBackup, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Initializes the service related config for a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig} [request.cloudSqlInstanceInitializationConfig] + * Optional. The configuration for initializing a Cloud SQL instance. + * @param {string} request.name + * Required. The resource name of the serviceConfig used to initialize the + * service. The location must be the location of the BackupVault. + * Format: `projects/{project_id}/locations/{location}/serviceConfig`. + * @param {string} request.resourceType + * Required. The resource type to which the default service config will be + * applied. Examples include, "compute.googleapis.com/Instance" and + * "storage.googleapis.com/Bucket". + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} [request.backupPlanLocation] + * Optional. The location where the BackupPlan will be created. This field is + * required for multi-region BackupVaults and is optional for regional + * BackupVaults. It is useful when creating a Backup Vault in a multi-region, + * allowing the BackupPlan to reside in a specific region within that + * multi-region. If this field is not provided, the BackupPlan will be created + * in the same location as specified in the `name` field. + * @param {boolean} [request.validateOnly] + * Optional. If set, validates the request and returns the result, but does + * not actually run it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.initialize_service.js + * region_tag:backupdr_v1beta_generated_BackupDR_InitializeService_async + */ + initializeService( + request?: protos.google.cloud.backupdr.v1beta.IInitializeServiceRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + initializeService( + request: protos.google.cloud.backupdr.v1beta.IInitializeServiceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + initializeService( + request: protos.google.cloud.backupdr.v1beta.IInitializeServiceRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + initializeService( + request?: protos.google.cloud.backupdr.v1beta.IInitializeServiceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('initializeService response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('initializeService request %j', request); + return this.innerApiCalls + .initializeService(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('initializeService response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `initializeService()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.initialize_service.js + * region_tag:backupdr_v1beta_generated_BackupDR_InitializeService_async + */ + async checkInitializeServiceProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.InitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('initializeService long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.initializeService, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.InitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this policy will be created. + * Format: projects/{project}/locations/{location} + * @param {string} request.autoProtectionPolicyId + * Required. The ID to use for the policy. + * This will become the final component of the policy's resource name. + * @param {google.cloud.backupdr.v1beta.AutoProtectionPolicy} request.autoProtectionPolicy + * Required. The AutoProtectionPolicy resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async + */ + createAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createAutoProtectionPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAutoProtectionPolicy request %j', request); + return this.innerApiCalls + .createAutoProtectionPolicy(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('createAutoProtectionPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createAutoProtectionPolicy()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async + */ + async checkCreateAutoProtectionPolicyProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createAutoProtectionPolicy long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAutoProtectionPolicy, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Updates the parameters of a single AutoProtectionPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.backupdr.v1beta.AutoProtectionPolicy} request.autoProtectionPolicy + * Required. The policy to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * AutoProtectionPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async + */ + updateAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + updateAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IUpdateAutoProtectionPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'auto_protection_policy.name': request.autoProtectionPolicy!.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateAutoProtectionPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateAutoProtectionPolicy request %j', request); + return this.innerApiCalls + .updateAutoProtectionPolicy(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('updateAutoProtectionPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `updateAutoProtectionPolicy()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.update_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async + */ + async checkUpdateAutoProtectionPolicyProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('updateAutoProtectionPolicy long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateAutoProtectionPolicy, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Deletes a single AutoProtectionPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the policy to delete. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @param {string} request.etag + * The current etag of the AutoProtectionPolicy. + * If an etag is provided and does not match the current etag of the + * connection, the request will be rejected with an ABORTED error. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async + */ + deleteAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteAutoProtectionPolicy( + request: protos.google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + deleteAutoProtectionPolicy( + request?: protos.google.cloud.backupdr.v1beta.IDeleteAutoProtectionPolicyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteAutoProtectionPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteAutoProtectionPolicy request %j', request); + return this.innerApiCalls + .deleteAutoProtectionPolicy(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info('deleteAutoProtectionPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `deleteAutoProtectionPolicy()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.delete_auto_protection_policy.js + * region_tag:backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async + */ + async checkDeleteAutoProtectionPolicyProgress( + name: string, + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('deleteAutoProtectionPolicy long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteAutoProtectionPolicy, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Creates a new AutoProtectionPolicyBinding in a given project and + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this binding will be created. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @param {string} request.autoProtectionPolicyBindingId + * Required. The ID to use for the binding. + * This will become the final component of the binding's resource name. + * @param {google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding} request.autoProtectionPolicyBinding + * Required. The AutoProtectionPolicyBinding resource to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_auto_protection_policy_binding.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async + */ + createAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + createAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.ICreateAutoProtectionPolicyBindingRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info( + 'createAutoProtectionPolicyBinding response %j', + rawResponse, + ); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createAutoProtectionPolicyBinding request %j', request); + return this.innerApiCalls + .createAutoProtectionPolicyBinding(request, options, wrappedCallback) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info( + 'createAutoProtectionPolicyBinding response %j', + rawResponse, + ); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `createAutoProtectionPolicyBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.create_auto_protection_policy_binding.js + * region_tag:backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async + */ + async checkCreateAutoProtectionPolicyBindingProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('createAutoProtectionPolicyBinding long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAutoProtectionPolicyBinding, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for + * AutoProtectionPolicy Binding + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the binding to delete. + * Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.initiate_delete_auto_protection_policy_binding.js + * region_tag:backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async + */ + initiateDeleteAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, + options?: CallOptions, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + initiateDeleteAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + initiateDeleteAutoProtectionPolicyBinding( + request: protos.google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): void; + initiateDeleteAutoProtectionPolicyBinding( + request?: protos.google.cloud.backupdr.v1beta.IInitiateDeleteAutoProtectionPolicyBindingRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | Callback< + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info( + 'initiateDeleteAutoProtectionPolicyBinding response %j', + rawResponse, + ); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info( + 'initiateDeleteAutoProtectionPolicyBinding request %j', + request, + ); + return this.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding( + request, + options, + wrappedCallback, + ) + ?.then( + ([response, rawResponse, _]: [ + LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ]) => { + this._log.info( + 'initiateDeleteAutoProtectionPolicyBinding response %j', + rawResponse, + ); + return [response, rawResponse, _]; + }, + ); + } + /** + * Check the status of the long running operation returned by `initiateDeleteAutoProtectionPolicyBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.initiate_delete_auto_protection_policy_binding.js + * region_tag:backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async + */ + async checkInitiateDeleteAutoProtectionPolicyBindingProgress( + name: string, + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.OperationMetadata + > + > { + this._log.info('initiateDeleteAutoProtectionPolicyBinding long-running'); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name}, + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.initiateDeleteAutoProtectionPolicyBinding, + this._gaxModule.createDefaultBackoffSettings(), + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.OperationMetadata + >; + } + /** + * Lists ManagementServers in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.ManagementServer|ManagementServer}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listManagementServersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listManagementServers( + request?: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IManagementServer[], + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1beta.IListManagementServersResponse, + ] + >; + listManagementServers( + request: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1beta.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IManagementServer + >, + ): void; + listManagementServers( + request: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1beta.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IManagementServer + >, + ): void; + listManagementServers( + request?: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1beta.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IManagementServer + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1beta.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IManagementServer + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IManagementServer[], + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1beta.IListManagementServersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1beta.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IManagementServer + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listManagementServers values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listManagementServers request %j', request); + return this.innerApiCalls + .listManagementServers(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IManagementServer[], + protos.google.cloud.backupdr.v1beta.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1beta.IListManagementServersResponse, + ]) => { + this._log.info('listManagementServers values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listManagementServers`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.ManagementServer|ManagementServer} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listManagementServersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listManagementServersStream( + request?: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listManagementServers stream %j', request); + return this.descriptors.page.listManagementServers.createStream( + this.innerApiCalls.listManagementServers as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listManagementServers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.ManagementServer|ManagementServer}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_management_servers.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListManagementServers_async + */ + listManagementServersAsync( + request?: protos.google.cloud.backupdr.v1beta.IListManagementServersRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listManagementServers iterate %j', request); + return this.descriptors.page.listManagementServers.asyncIterate( + this.innerApiCalls['listManagementServers'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists BackupVaults in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupVaultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupVaults( + request?: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse, + ] + >; + listBackupVaults( + request: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): void; + listBackupVaults( + request: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): void; + listBackupVaults( + request?: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackupVaults values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackupVaults request %j', request); + return this.innerApiCalls + .listBackupVaults(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupVaultsResponse, + ]) => { + this._log.info('listBackupVaults values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackupVaults`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupVaultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupVaults stream %j', request); + return this.descriptors.page.listBackupVaults.createStream( + this.innerApiCalls.listBackupVaults as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_backup_vaults.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBackupVaultsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupVaults iterate %j', request); + return this.descriptors.page.listBackupVaults.asyncIterate( + this.innerApiCalls['listBackupVaults'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and + * location. Usable BackupVault are the ones that user has + * backupdr.backupVaults.get permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `fetchUsableBackupVaultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse, + ] + >; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): void; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): void; + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupVault + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('fetchUsableBackupVaults values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('fetchUsableBackupVaults request %j', request); + return this.innerApiCalls + .fetchUsableBackupVaults(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupVault[], + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsResponse, + ]) => { + this._log.info('fetchUsableBackupVaults values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `fetchUsableBackupVaults`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `fetchUsableBackupVaultsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchUsableBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('fetchUsableBackupVaults stream %j', request); + return this.descriptors.page.fetchUsableBackupVaults.createStream( + this.innerApiCalls.fetchUsableBackupVaults as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupVault|BackupVault}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.fetch_usable_backup_vaults.js + * region_tag:backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_async + */ + fetchUsableBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1beta.IFetchUsableBackupVaultsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('fetchUsableBackupVaults iterate %j', request); + return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( + this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists DataSources in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.DataSource|DataSource}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataSourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSources( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSource[], + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse, + ] + >; + listDataSources( + request: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSource + >, + ): void; + listDataSources( + request: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSource + >, + ): void; + listDataSources( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSource + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSource + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSource[], + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSource + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataSources values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataSources request %j', request); + return this.innerApiCalls + .listDataSources(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IDataSource[], + protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourcesResponse, + ]) => { + this._log.info('listDataSources values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listDataSources`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.DataSource|DataSource} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataSourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSourcesStream( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listDataSources stream %j', request); + return this.descriptors.page.listDataSources.createStream( + this.innerApiCalls.listDataSources as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listDataSources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.DataSource|DataSource}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_data_sources.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListDataSources_async + */ + listDataSourcesAsync( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourcesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listDataSources iterate %j', request); + return this.descriptors.page.listDataSources.asyncIterate( + this.innerApiCalls['listDataSources'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists Backups in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.Backup|Backup}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackups( + request?: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupsResponse, + ] + >; + listBackups( + request: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): void; + listBackups( + request: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): void; + listBackups( + request?: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackups values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackups request %j', request); + return this.innerApiCalls + .listBackups(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupsResponse, + ]) => { + this._log.info('listBackups values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackups`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.Backup|Backup} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupsStream( + request?: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackups stream %j', request); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.Backup|Backup}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_backups.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBackupsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackups iterate %j', request); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Fetch Backups for a given resource type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * name + * * state + * * backup_type + * * create_time + * * expire_time + * * enforced_retention_end_time + * * gcp_backup_plan_info.backup_plan + * * cloud_sql_instance_backup_properties.instance_tier + * * cloud_sql_instance_backup_properties.database_installed_version + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.Backup|Backup}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `fetchBackupsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupsForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse, + ] + >; + fetchBackupsForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): void; + fetchBackupsForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): void; + fetchBackupsForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackup + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('fetchBackupsForResourceType values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('fetchBackupsForResourceType request %j', request); + return this.innerApiCalls + .fetchBackupsForResourceType(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackup[], + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeResponse, + ]) => { + this._log.info('fetchBackupsForResourceType values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `fetchBackupsForResourceType`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * name + * * state + * * backup_type + * * create_time + * * expire_time + * * enforced_retention_end_time + * * gcp_backup_plan_info.backup_plan + * * cloud_sql_instance_backup_properties.instance_tier + * * cloud_sql_instance_backup_properties.database_installed_version + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.Backup|Backup} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `fetchBackupsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupsForResourceTypeStream( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['fetchBackupsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('fetchBackupsForResourceType stream %j', request); + return this.descriptors.page.fetchBackupsForResourceType.createStream( + this.innerApiCalls.fetchBackupsForResourceType as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `fetchBackupsForResourceType`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Datasources are the parent resource for the backups. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param {string} request.resourceType + * Required. The type of the GCP resource. + * Ex: sqladmin.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of Backups to return. The service may + * return fewer than this value. If unspecified, at most 50 + * Backups will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * name + * * state + * * backup_type + * * create_time + * * expire_time + * * enforced_retention_end_time + * * gcp_backup_plan_info.backup_plan + * * cloud_sql_instance_backup_properties.instance_tier + * * cloud_sql_instance_backup_properties.database_installed_version + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {google.cloud.backupdr.v1beta.BackupView} [request.view] + * Optional. This parameter is used to specify the view of the backup. + * If not specified, the default view is BASIC. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.Backup|Backup}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.fetch_backups_for_resource_type.js + * region_tag:backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_async + */ + fetchBackupsForResourceTypeAsync( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupsForResourceTypeRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['fetchBackupsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('fetchBackupsForResourceType iterate %j', request); + return this.descriptors.page.fetchBackupsForResourceType.asyncIterate( + this.innerApiCalls['fetchBackupsForResourceType'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists BackupPlans in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. To retrieve backup plans for all locations, use "-" for + * the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupPlan|BackupPlan}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupPlansAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlans( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlan[], + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse, + ] + >; + listBackupPlans( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlan + >, + ): void; + listBackupPlans( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlan + >, + ): void; + listBackupPlans( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlan + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlan + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlan[], + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlan + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackupPlans values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackupPlans request %j', request); + return this.innerApiCalls + .listBackupPlans(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlan[], + protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlansResponse, + ]) => { + this._log.info('listBackupPlans values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackupPlans`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. To retrieve backup plans for all locations, use "-" for + * the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlan|BackupPlan} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupPlansAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlansStream( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlans stream %j', request); + return this.descriptors.page.listBackupPlans.createStream( + this.innerApiCalls.listBackupPlans as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackupPlans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. To retrieve backup plans for all locations, use "-" for + * the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupPlan|BackupPlan}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_backup_plans.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBackupPlans_async + */ + listBackupPlansAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlansRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlans iterate %j', request); + return this.descriptors.page.listBackupPlans.asyncIterate( + this.innerApiCalls['listBackupPlans'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists BackupPlanRevisions in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve + * `BackupPlanRevisions` information. Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupPlanRevision|BackupPlanRevision}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupPlanRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlanRevisions( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse, + ] + >; + listBackupPlanRevisions( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision + >, + ): void; + listBackupPlanRevisions( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision + >, + ): void; + listBackupPlanRevisions( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackupPlanRevisions values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackupPlanRevisions request %j', request); + return this.innerApiCalls + .listBackupPlanRevisions(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsResponse, + ]) => { + this._log.info('listBackupPlanRevisions values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackupPlanRevisions`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve + * `BackupPlanRevisions` information. Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlanRevision|BackupPlanRevision} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupPlanRevisionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlanRevisionsStream( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlanRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlanRevisions stream %j', request); + return this.descriptors.page.listBackupPlanRevisions.createStream( + this.innerApiCalls.listBackupPlanRevisions as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackupPlanRevisions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve + * `BackupPlanRevisions` information. Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupPlanRevision|BackupPlanRevision}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_backup_plan_revisions.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_async + */ + listBackupPlanRevisionsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanRevisionsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlanRevisions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlanRevisions iterate %j', request); + return this.descriptors.page.listBackupPlanRevisions.asyncIterate( + this.innerApiCalls['listBackupPlanRevisions'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists BackupPlanAssociations in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR, locations + * map to Google Cloud regions, for example **us-central1**. To retrieve + * backup plan associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBackupPlanAssociationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse, + ] + >; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): void; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): void; + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBackupPlanAssociations values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBackupPlanAssociations request %j', request); + return this.innerApiCalls + .listBackupPlanAssociations(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsResponse, + ]) => { + this._log.info('listBackupPlanAssociations values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBackupPlanAssociations`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR, locations + * map to Google Cloud regions, for example **us-central1**. To retrieve + * backup plan associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBackupPlanAssociationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBackupPlanAssociationsStream( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlanAssociations stream %j', request); + return this.descriptors.page.listBackupPlanAssociations.createStream( + this.innerApiCalls.listBackupPlanAssociations as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR, locations + * map to Google Cloud regions, for example **us-central1**. To retrieve + * backup plan associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_backup_plan_associations.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_async + */ + listBackupPlanAssociationsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBackupPlanAssociationsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBackupPlanAssociations iterate %j', request); + return this.descriptors.page.listBackupPlanAssociations.asyncIterate( + this.innerApiCalls['listBackupPlanAssociations'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * List BackupPlanAssociations for a given resource type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of BackupPlanAssociations to return. The + * service may return fewer than this value. If unspecified, at most 50 + * BackupPlanAssociations will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupPlanAssociationsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupPlanAssociationsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * resource + * * backup_plan + * * state + * * data_source + * * cloud_sql_instance_backup_plan_association_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `fetchBackupPlanAssociationsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupPlanAssociationsForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse, + ] + >; + fetchBackupPlanAssociationsForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): void; + fetchBackupPlanAssociationsForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): void; + fetchBackupPlanAssociationsForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info( + 'fetchBackupPlanAssociationsForResourceType values %j', + values, + ); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info( + 'fetchBackupPlanAssociationsForResourceType request %j', + request, + ); + return this.innerApiCalls + .fetchBackupPlanAssociationsForResourceType( + request, + options, + wrappedCallback, + ) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeResponse, + ]) => { + this._log.info( + 'fetchBackupPlanAssociationsForResourceType values %j', + response, + ); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `fetchBackupPlanAssociationsForResourceType`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of BackupPlanAssociations to return. The + * service may return fewer than this value. If unspecified, at most 50 + * BackupPlanAssociations will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupPlanAssociationsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupPlanAssociationsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * resource + * * backup_plan + * * state + * * data_source + * * cloud_sql_instance_backup_plan_association_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `fetchBackupPlanAssociationsForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchBackupPlanAssociationsForResourceTypeStream( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['fetchBackupPlanAssociationsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info( + 'fetchBackupPlanAssociationsForResourceType stream %j', + request, + ); + return this.descriptors.page.fetchBackupPlanAssociationsForResourceType.createStream( + this.innerApiCalls.fetchBackupPlanAssociationsForResourceType as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `fetchBackupPlanAssociationsForResourceType`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of BackupPlanAssociations to return. The + * service may return fewer than this value. If unspecified, at most 50 + * BackupPlanAssociations will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchBackupPlanAssociationsForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchBackupPlanAssociationsForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * resource + * * backup_plan + * * state + * * data_source + * * cloud_sql_instance_backup_plan_association_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BackupPlanAssociation|BackupPlanAssociation}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.fetch_backup_plan_associations_for_resource_type.js + * region_tag:backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_async + */ + fetchBackupPlanAssociationsForResourceTypeAsync( + request?: protos.google.cloud.backupdr.v1beta.IFetchBackupPlanAssociationsForResourceTypeRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['fetchBackupPlanAssociationsForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info( + 'fetchBackupPlanAssociationsForResourceType iterate %j', + request, + ); + return this.descriptors.page.fetchBackupPlanAssociationsForResourceType.asyncIterate( + this.innerApiCalls[ + 'fetchBackupPlanAssociationsForResourceType' + ] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists DataSourceReferences for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataSourceReferencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSourceReferences( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse, + ] + >; + listDataSourceReferences( + request: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): void; + listDataSourceReferences( + request: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): void; + listDataSourceReferences( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + | protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataSourceReferences values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataSourceReferences request %j', request); + return this.innerApiCalls + .listDataSourceReferences(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest | null, + protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesResponse, + ]) => { + this._log.info('listDataSourceReferences values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listDataSourceReferences`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataSourceReferencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDataSourceReferencesStream( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataSourceReferences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listDataSourceReferences stream %j', request); + return this.descriptors.page.listDataSourceReferences.createStream( + this.innerApiCalls.listDataSourceReferences as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listDataSourceReferences`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListDataSourceReferences` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDataSourceReferences` must match the call that provided the page + * token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. + * + * The following field and operator combinations are supported: + * + * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + * * data_source_gcp_resource_info.type with `=`, `!=` + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_data_source_references.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_async + */ + listDataSourceReferencesAsync( + request?: protos.google.cloud.backupdr.v1beta.IListDataSourceReferencesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDataSourceReferences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listDataSourceReferences iterate %j', request); + return this.descriptors.page.listDataSourceReferences.asyncIterate( + this.innerApiCalls['listDataSourceReferences'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchDataSourceReferencesForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchDataSourceReferencesForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_backup_config_state + * * data_source_backup_count + * * data_source_backup_config_info.last_backup_state + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_gcp_resource_info.type + * * data_source_gcp_resource_info.location + * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `fetchDataSourceReferencesForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchDataSourceReferencesForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse, + ] + >; + fetchDataSourceReferencesForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): void; + fetchDataSourceReferencesForResourceType( + request: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): void; + fetchDataSourceReferencesForResourceType( + request?: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + | protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IDataSourceReference + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info( + 'fetchDataSourceReferencesForResourceType values %j', + values, + ); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info( + 'fetchDataSourceReferencesForResourceType request %j', + request, + ); + return this.innerApiCalls + .fetchDataSourceReferencesForResourceType( + request, + options, + wrappedCallback, + ) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IDataSourceReference[], + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest | null, + protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeResponse, + ]) => { + this._log.info( + 'fetchDataSourceReferencesForResourceType values %j', + response, + ); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `fetchDataSourceReferencesForResourceType`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchDataSourceReferencesForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchDataSourceReferencesForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_backup_config_state + * * data_source_backup_count + * * data_source_backup_config_info.last_backup_state + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_gcp_resource_info.type + * * data_source_gcp_resource_info.location + * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `fetchDataSourceReferencesForResourceTypeAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + fetchDataSourceReferencesForResourceTypeStream( + request?: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['fetchDataSourceReferencesForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info( + 'fetchDataSourceReferencesForResourceType stream %j', + request, + ); + return this.descriptors.page.fetchDataSourceReferencesForResourceType.createStream( + this.innerApiCalls.fetchDataSourceReferencesForResourceType as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `fetchDataSourceReferencesForResourceType`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name. + * Format: projects/{project}/locations/{location} + * @param {string} request.resourceType + * Required. The type of the Google Cloud resource. + * Ex: sql.googleapis.com/Instance + * @param {number} [request.pageSize] + * Optional. The maximum number of DataSourceReferences to return. The service + * may return fewer than this value. If unspecified, at most 50 + * DataSourceReferences will be returned. The maximum value is 100; values + * above 100 will be coerced to 100. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous call of + * `FetchDataSourceReferencesForResourceType`. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `FetchDataSourceReferencesForResourceType` must match + * the call that provided the page token. + * @param {string} [request.filter] + * Optional. A filter expression that filters the results fetched in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. Supported + * fields: + * * data_source + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_backup_config_state + * * data_source_backup_count + * * data_source_backup_config_info.last_backup_state + * * data_source_gcp_resource_info.gcp_resourcename + * * data_source_gcp_resource_info.type + * * data_source_gcp_resource_info.location + * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + * @param {string} [request.orderBy] + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. + * + * Supported fields: + * * name + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.DataSourceReference|DataSourceReference}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.fetch_data_source_references_for_resource_type.js + * region_tag:backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_async + */ + fetchDataSourceReferencesForResourceTypeAsync( + request?: protos.google.cloud.backupdr.v1beta.IFetchDataSourceReferencesForResourceTypeRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['fetchDataSourceReferencesForResourceType']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info( + 'fetchDataSourceReferencesForResourceType iterate %j', + request, + ); + return this.descriptors.page.fetchDataSourceReferencesForResourceType.asyncIterate( + this.innerApiCalls['fetchDataSourceReferencesForResourceType'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists AutoProtectionPolicies for a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy|AutoProtectionPolicy}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAutoProtectionPoliciesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutoProtectionPolicies( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse, + ] + >; + listAutoProtectionPolicies( + request: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy + >, + ): void; + listAutoProtectionPolicies( + request: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy + >, + ): void; + listAutoProtectionPolicies( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAutoProtectionPolicies values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAutoProtectionPolicies request %j', request); + return this.innerApiCalls + .listAutoProtectionPolicies(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesResponse, + ]) => { + this._log.info('listAutoProtectionPolicies values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listAutoProtectionPolicies`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy|AutoProtectionPolicy} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAutoProtectionPoliciesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutoProtectionPoliciesStream( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutoProtectionPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAutoProtectionPolicies stream %j', request); + return this.descriptors.page.listAutoProtectionPolicies.createStream( + this.innerApiCalls.listAutoProtectionPolicies as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listAutoProtectionPolicies`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy|AutoProtectionPolicy}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_auto_protection_policies.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_async + */ + listAutoProtectionPoliciesAsync( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPoliciesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listAutoProtectionPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAutoProtectionPolicies iterate %j', request); + return this.descriptors.page.listAutoProtectionPolicies.asyncIterate( + this.innerApiCalls['listAutoProtectionPolicies'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding|AutoProtectionPolicyBinding}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAutoProtectionPolicyBindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutoProtectionPolicyBindings( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse, + ] + >; + listAutoProtectionPolicyBindings( + request: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding + >, + ): void; + listAutoProtectionPolicyBindings( + request: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding + >, + ): void; + listAutoProtectionPolicyBindings( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + | protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAutoProtectionPolicyBindings values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAutoProtectionPolicyBindings request %j', request); + return this.innerApiCalls + .listAutoProtectionPolicyBindings(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[], + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest | null, + protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsResponse, + ]) => { + this._log.info( + 'listAutoProtectionPolicyBindings values %j', + response, + ); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listAutoProtectionPolicyBindings`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding|AutoProtectionPolicyBinding} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAutoProtectionPolicyBindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAutoProtectionPolicyBindingsStream( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listAutoProtectionPolicyBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAutoProtectionPolicyBindings stream %j', request); + return this.descriptors.page.listAutoProtectionPolicyBindings.createStream( + this.innerApiCalls.listAutoProtectionPolicyBindings as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listAutoProtectionPolicyBindings`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of policies to return in a single page. + * If unspecified, a server-default value will be used. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + * page. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. The following fields are filterable: + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. The + * following fields are sortable: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding|AutoProtectionPolicyBinding}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_auto_protection_policy_bindings.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_async + */ + listAutoProtectionPolicyBindingsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListAutoProtectionPolicyBindingsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listAutoProtectionPolicyBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAutoProtectionPolicyBindings iterate %j', request); + return this.descriptors.page.listAutoProtectionPolicyBindings.asyncIterate( + this.innerApiCalls['listAutoProtectionPolicyBindings'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * applied policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of applied policies to return in a single + * page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAppliedAutoProtectionPolicies` call. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy|AppliedAutoProtectionPolicy}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listAppliedAutoProtectionPoliciesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAppliedAutoProtectionPolicies( + request?: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse, + ] + >; + listAppliedAutoProtectionPolicies( + request: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy + >, + ): void; + listAppliedAutoProtectionPolicies( + request: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy + >, + ): void; + listAppliedAutoProtectionPolicies( + request?: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + | protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listAppliedAutoProtectionPolicies values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listAppliedAutoProtectionPolicies request %j', request); + return this.innerApiCalls + .listAppliedAutoProtectionPolicies(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[], + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest | null, + protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesResponse, + ]) => { + this._log.info( + 'listAppliedAutoProtectionPolicies values %j', + response, + ); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listAppliedAutoProtectionPolicies`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * applied policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of applied policies to return in a single + * page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAppliedAutoProtectionPolicies` call. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy|AppliedAutoProtectionPolicy} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listAppliedAutoProtectionPoliciesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listAppliedAutoProtectionPoliciesStream( + request?: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listAppliedAutoProtectionPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAppliedAutoProtectionPolicies stream %j', request); + return this.descriptors.page.listAppliedAutoProtectionPolicies.createStream( + this.innerApiCalls.listAppliedAutoProtectionPolicies as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listAppliedAutoProtectionPolicies`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve the list of + * applied policies. Format: projects/{project}/locations/{location} + * @param {number} [request.pageSize] + * Optional. The maximum number of applied policies to return in a single + * page. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous + * `ListAppliedAutoProtectionPolicies` call. + * @param {string} [request.filter] + * Optional. A filter expression that filters resources listed in the + * response. + * @param {string} [request.orderBy] + * Optional. An expression that sorts the results in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy|AppliedAutoProtectionPolicy}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_applied_auto_protection_policies.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_async + */ + listAppliedAutoProtectionPoliciesAsync( + request?: protos.google.cloud.backupdr.v1beta.IListAppliedAutoProtectionPoliciesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = + this._defaults['listAppliedAutoProtectionPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listAppliedAutoProtectionPolicies iterate %j', request); + return this.descriptors.page.listAppliedAutoProtectionPolicies.asyncIterate( + this.innerApiCalls['listAppliedAutoProtectionPolicies'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project, location, auto protection policy and binding for + * which to retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BindingMatchingResources` to return in a + * single response. The default page size is 100 and maximum page size is 200. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * received from a previous `ListBindingMatchingResources` call. Provide this + * to retrieve the subsequent page in a multi-page list of results. When + * paginating, all other parameters provided to `ListBindingMatchingResources` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.BindingMatchingResource|BindingMatchingResource}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBindingMatchingResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBindingMatchingResources( + request?: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[], + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse, + ] + >; + listBindingMatchingResources( + request: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource + >, + ): void; + listBindingMatchingResources( + request: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource + >, + ): void; + listBindingMatchingResources( + request?: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[], + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + | protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBindingMatchingResources values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBindingMatchingResources request %j', request); + return this.innerApiCalls + .listBindingMatchingResources(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[], + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest | null, + protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesResponse, + ]) => { + this._log.info('listBindingMatchingResources values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listBindingMatchingResources`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project, location, auto protection policy and binding for + * which to retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BindingMatchingResources` to return in a + * single response. The default page size is 100 and maximum page size is 200. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * received from a previous `ListBindingMatchingResources` call. Provide this + * to retrieve the subsequent page in a multi-page list of results. When + * paginating, all other parameters provided to `ListBindingMatchingResources` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.BindingMatchingResource|BindingMatchingResource} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBindingMatchingResourcesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBindingMatchingResourcesStream( + request?: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBindingMatchingResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBindingMatchingResources stream %j', request); + return this.descriptors.page.listBindingMatchingResources.createStream( + this.innerApiCalls.listBindingMatchingResources as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listBindingMatchingResources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project, location, auto protection policy and binding for + * which to retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for + * example **us-central1**. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BindingMatchingResources` to return in a + * single response. The default page size is 100 and maximum page size is 200. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token|next_page_token} + * received from a previous `ListBindingMatchingResources` call. Provide this + * to retrieve the subsequent page in a multi-page list of results. When + * paginating, all other parameters provided to `ListBindingMatchingResources` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.BindingMatchingResource|BindingMatchingResource}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_d_r.list_binding_matching_resources.js + * region_tag:backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_async + */ + listBindingMatchingResourcesAsync( + request?: protos.google.cloud.backupdr.v1beta.IListBindingMatchingResourcesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listBindingMatchingResources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listBindingMatchingResources iterate %j', request); + return this.descriptors.page.listBindingMatchingResources.asyncIterate( + this.innerApiCalls['listBindingMatchingResources'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions, + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions, + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified appliedAutoProtectionPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} applied_auto_protection_policy + * @returns {string} Resource name string. + */ + appliedAutoProtectionPolicyPath( + project: string, + location: string, + appliedAutoProtectionPolicy: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.render({ + project: project, + location: location, + applied_auto_protection_policy: appliedAutoProtectionPolicy, + }); + } + + /** + * Parse the project from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).project; + } + + /** + * Parse the location from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).location; + } + + /** + * Parse the applied_auto_protection_policy from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the applied_auto_protection_policy. + */ + matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).applied_auto_protection_policy; + } + + /** + * Return a fully-qualified autoProtectionPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @returns {string} Resource name string. + */ + autoProtectionPolicyPath( + project: string, + location: string, + autoProtectionPolicy: string, + ) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + }); + } + + /** + * Parse the project from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoProtectionPolicyName(autoProtectionPolicyName: string) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).project; + } + + /** + * Parse the location from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoProtectionPolicyName(autoProtectionPolicyName: string) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).location; + } + + /** + * Parse the auto_protection_policy from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromAutoProtectionPolicyName( + autoProtectionPolicyName: string, + ) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).auto_protection_policy; + } + + /** + * Return a fully-qualified autoProtectionPolicyBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @param {string} binding + * @returns {string} Resource name string. + */ + autoProtectionPolicyBindingPath( + project: string, + location: string, + autoProtectionPolicy: string, + binding: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + binding: binding, + }); + } + + /** + * Parse the project from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).project; + } + + /** + * Parse the location from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).location; + } + + /** + * Parse the auto_protection_policy from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).auto_protection_policy; + } + + /** + * Parse the binding from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the binding. + */ + matchBindingFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).binding; + } + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + backupvault: string, + datasource: string, + backup: string, + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project: string, location: string, backupPlan: string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath( + project: string, + location: string, + backupPlanAssociation: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName( + backupPlanAssociationName: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName( + backupPlanAssociationName: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).backup_plan_association; + } + + /** + * Return a fully-qualified backupPlanRevision resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @param {string} revision + * @returns {string} Resource name string. + */ + backupPlanRevisionPath( + project: string, + location: string, + backupPlan: string, + revision: string, + ) { + return this.pathTemplates.backupPlanRevisionPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + revision: revision, + }); + } + + /** + * Parse the project from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).project; + } + + /** + * Parse the location from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).location; + } + + /** + * Parse the backup_plan from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).backup_plan; + } + + /** + * Parse the revision from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).revision; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project: string, location: string, backupvault: string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .backupvault; + } + + /** + * Return a fully-qualified bindingMatchingResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @param {string} binding + * @param {string} matching_resource + * @returns {string} Resource name string. + */ + bindingMatchingResourcePath( + project: string, + location: string, + autoProtectionPolicy: string, + binding: string, + matchingResource: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + binding: binding, + matching_resource: matchingResource, + }); + } + + /** + * Parse the project from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).project; + } + + /** + * Parse the location from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).location; + } + + /** + * Parse the auto_protection_policy from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).auto_protection_policy; + } + + /** + * Parse the binding from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the binding. + */ + matchBindingFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).binding; + } + + /** + * Parse the matching_resource from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the matching_resource. + */ + matchMatchingResourceFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).matching_resource; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath( + project: string, + location: string, + backupvault: string, + datasource: string, + ) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .datasource; + } + + /** + * Return a fully-qualified dataSourceReference resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_source_reference + * @returns {string} Resource name string. + */ + dataSourceReferencePath( + project: string, + location: string, + dataSourceReference: string, + ) { + return this.pathTemplates.dataSourceReferencePathTemplate.render({ + project: project, + location: location, + data_source_reference: dataSourceReference, + }); + } + + /** + * Parse the project from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceReferenceName(dataSourceReferenceName: string) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).project; + } + + /** + * Parse the location from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceReferenceName(dataSourceReferenceName: string) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).location; + } + + /** + * Parse the data_source_reference from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the data_source_reference. + */ + matchDataSourceReferenceFromDataSourceReferenceName( + dataSourceReferenceName: string, + ) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).data_source_reference; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified managementServer resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} managementserver + * @returns {string} Resource name string. + */ + managementServerPath( + project: string, + location: string, + managementserver: string, + ) { + return this.pathTemplates.managementServerPathTemplate.render({ + project: project, + location: location, + managementserver: managementserver, + }); + } + + /** + * Parse the project from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the project. + */ + matchProjectFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).project; + } + + /** + * Parse the location from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the location. + */ + matchLocationFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).location; + } + + /** + * Parse the managementserver from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the managementserver. + */ + matchManagementserverFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).managementserver; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified resourceBackupConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} resource_backup_config + * @returns {string} Resource name string. + */ + resourceBackupConfigPath( + project: string, + location: string, + resourceBackupConfig: string, + ) { + return this.pathTemplates.resourceBackupConfigPathTemplate.render({ + project: project, + location: location, + resource_backup_config: resourceBackupConfig, + }); + } + + /** + * Parse the project from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceBackupConfigName(resourceBackupConfigName: string) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).project; + } + + /** + * Parse the location from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceBackupConfigName(resourceBackupConfigName: string) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).location; + } + + /** + * Parse the resource_backup_config from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the resource_backup_config. + */ + matchResourceBackupConfigFromResourceBackupConfigName( + resourceBackupConfigName: string, + ) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).resource_backup_config; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.backupDRStub && !this._terminated) { + return this.backupDRStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.iamClient.close().catch(err => { + throw err; + }); + this.locationsClient.close().catch(err => { + throw err; + }); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client_config.json b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client_config.json new file mode 100644 index 000000000000..5e9c089328c8 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_client_config.json @@ -0,0 +1,252 @@ +{ + "interfaces": { + "google.cloud.backupdr.v1beta.BackupDR": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListManagementServers": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchUsableBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchBackupsForResourceType": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanRevision": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanRevisions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanAssociations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchBackupPlanAssociationsForResourceType": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TriggerBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataSourceReference": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataSourceReferences": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchDataSourceReferencesForResourceType": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InitializeService": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAutoProtectionPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAutoProtectionPolicies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAutoProtectionPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAutoProtectionPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAutoProtectionPolicy": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateAutoProtectionPolicyBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetAutoProtectionPolicyBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAutoProtectionPolicyBindings": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAppliedAutoProtectionPolicies": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InitiateDeleteAutoProtectionPolicyBinding": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBindingMatchingResource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBindingMatchingResources": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_d_r_proto_list.json b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_proto_list.json new file mode 100644 index 000000000000..dbe201ab96fb --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_d_r_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto", + "../../protos/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto", + "../../protos/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto", + "../../protos/google/cloud/backupdr/v1beta/backupdr.proto", + "../../protos/google/cloud/backupdr/v1beta/backupplan.proto", + "../../protos/google/cloud/backupdr/v1beta/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_alloydb.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_disk.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_gce.proto", + "../../protos/google/cloud/backupdr/v1beta/bindingmatchingresource.proto", + "../../protos/google/cloud/backupdr/v1beta/datasourcereference.proto", + "../../protos/google/cloud/backupdr/v1beta/protection_summary.proto" +] diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client.ts b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client.ts new file mode 100644 index 000000000000..d5c9a3af0598 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client.ts @@ -0,0 +1,1850 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1beta/backup_dr_protection_summary_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './backup_dr_protection_summary_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Protection Summary service. + * @class + * @memberof v1beta + */ +export class BackupDrProtectionSummaryClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('backupdr'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + backupDrProtectionSummaryStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BackupDrProtectionSummaryClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new BackupDrProtectionSummaryClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof BackupDrProtectionSummaryClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'backupdr.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts, + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + appliedAutoProtectionPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/appliedAutoProtectionPolicies/{applied_auto_protection_policy}', + ), + autoProtectionPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}', + ), + autoProtectionPolicyBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}', + ), + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}', + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}', + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}', + ), + backupPlanRevisionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}', + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}', + ), + bindingMatchingResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}', + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}', + ), + dataSourceReferencePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}', + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + managementServerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/managementServers/{managementserver}', + ), + resourceBackupConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listResourceBackupConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'resourceBackupConfigs', + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.backupdr.v1beta.BackupDrProtectionSummary', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')}, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.backupDrProtectionSummaryStub) { + return this.backupDrProtectionSummaryStub; + } + + // Put together the "service stub" for + // google.cloud.backupdr.v1beta.BackupDrProtectionSummary. + this.backupDrProtectionSummaryStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.backupdr.v1beta.BackupDrProtectionSummary', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.backupdr.v1beta + .BackupDrProtectionSummary, + this._opts, + this._providedCustomServicePath, + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const backupDrProtectionSummaryStubMethods = ['listResourceBackupConfigs']; + for (const methodName of backupDrProtectionSummaryStubMethods) { + const callPromise = this.backupDrProtectionSummaryStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.backupDrProtectionSummaryStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'backupdr.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'backupdr.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-backupdr', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + + /** + * Lists ResourceBackupConfigs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve resource backup + * configs. Format: 'projects/{project_id}/locations/{location}'. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will use 100 as default. Maximum value is + * 500 and values above 500 will be coerced to 500. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1beta.ResourceBackupConfig|ResourceBackupConfig}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listResourceBackupConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceBackupConfigs( + request?: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[], + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest | null, + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse, + ] + >; + listResourceBackupConfigs( + request: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + | protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig + >, + ): void; + listResourceBackupConfigs( + request: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + | protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig + >, + ): void; + listResourceBackupConfigs( + request?: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + | protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + | protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig + >, + ): Promise< + [ + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[], + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest | null, + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch(err => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + | protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResourceBackupConfigs values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResourceBackupConfigs request %j', request); + return this.innerApiCalls + .listResourceBackupConfigs(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[], + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest | null, + protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsResponse, + ]) => { + this._log.info('listResourceBackupConfigs values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listResourceBackupConfigs`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve resource backup + * configs. Format: 'projects/{project_id}/locations/{location}'. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will use 100 as default. Maximum value is + * 500 and values above 500 will be coerced to 500. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1beta.ResourceBackupConfig|ResourceBackupConfig} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listResourceBackupConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listResourceBackupConfigsStream( + request?: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceBackupConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listResourceBackupConfigs stream %j', request); + return this.descriptors.page.listResourceBackupConfigs.createStream( + this.innerApiCalls.listResourceBackupConfigs as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listResourceBackupConfigs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve resource backup + * configs. Format: 'projects/{project_id}/locations/{location}'. In Google + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will use 100 as default. Maximum value is + * 500 and values above 500 will be coerced to 500. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.backupdr.v1beta.ResourceBackupConfig|ResourceBackupConfig}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/backup_dr_protection_summary.list_resource_backup_configs.js + * region_tag:backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_async + */ + listResourceBackupConfigsAsync( + request?: protos.google.cloud.backupdr.v1beta.IListResourceBackupConfigsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listResourceBackupConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => { + throw err; + }); + this._log.info('listResourceBackupConfigs iterate %j', request); + return this.descriptors.page.listResourceBackupConfigs.asyncIterate( + this.innerApiCalls['listResourceBackupConfigs'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + ): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions, + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified appliedAutoProtectionPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} applied_auto_protection_policy + * @returns {string} Resource name string. + */ + appliedAutoProtectionPolicyPath( + project: string, + location: string, + appliedAutoProtectionPolicy: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.render({ + project: project, + location: location, + applied_auto_protection_policy: appliedAutoProtectionPolicy, + }); + } + + /** + * Parse the project from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).project; + } + + /** + * Parse the location from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).location; + } + + /** + * Parse the applied_auto_protection_policy from AppliedAutoProtectionPolicy resource. + * + * @param {string} appliedAutoProtectionPolicyName + * A fully-qualified path representing AppliedAutoProtectionPolicy resource. + * @returns {string} A string representing the applied_auto_protection_policy. + */ + matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName( + appliedAutoProtectionPolicyName: string, + ) { + return this.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match( + appliedAutoProtectionPolicyName, + ).applied_auto_protection_policy; + } + + /** + * Return a fully-qualified autoProtectionPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @returns {string} Resource name string. + */ + autoProtectionPolicyPath( + project: string, + location: string, + autoProtectionPolicy: string, + ) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + }); + } + + /** + * Parse the project from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoProtectionPolicyName(autoProtectionPolicyName: string) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).project; + } + + /** + * Parse the location from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoProtectionPolicyName(autoProtectionPolicyName: string) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).location; + } + + /** + * Parse the auto_protection_policy from AutoProtectionPolicy resource. + * + * @param {string} autoProtectionPolicyName + * A fully-qualified path representing AutoProtectionPolicy resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromAutoProtectionPolicyName( + autoProtectionPolicyName: string, + ) { + return this.pathTemplates.autoProtectionPolicyPathTemplate.match( + autoProtectionPolicyName, + ).auto_protection_policy; + } + + /** + * Return a fully-qualified autoProtectionPolicyBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @param {string} binding + * @returns {string} Resource name string. + */ + autoProtectionPolicyBindingPath( + project: string, + location: string, + autoProtectionPolicy: string, + binding: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + binding: binding, + }); + } + + /** + * Parse the project from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).project; + } + + /** + * Parse the location from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).location; + } + + /** + * Parse the auto_protection_policy from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).auto_protection_policy; + } + + /** + * Parse the binding from AutoProtectionPolicyBinding resource. + * + * @param {string} autoProtectionPolicyBindingName + * A fully-qualified path representing AutoProtectionPolicyBinding resource. + * @returns {string} A string representing the binding. + */ + matchBindingFromAutoProtectionPolicyBindingName( + autoProtectionPolicyBindingName: string, + ) { + return this.pathTemplates.autoProtectionPolicyBindingPathTemplate.match( + autoProtectionPolicyBindingName, + ).binding; + } + + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + backupvault: string, + datasource: string, + backup: string, + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project: string, location: string, backupPlan: string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath( + project: string, + location: string, + backupPlanAssociation: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName( + backupPlanAssociationName: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName( + backupPlanAssociationName: string, + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName, + ).backup_plan_association; + } + + /** + * Return a fully-qualified backupPlanRevision resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @param {string} revision + * @returns {string} Resource name string. + */ + backupPlanRevisionPath( + project: string, + location: string, + backupPlan: string, + revision: string, + ) { + return this.pathTemplates.backupPlanRevisionPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + revision: revision, + }); + } + + /** + * Parse the project from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).project; + } + + /** + * Parse the location from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).location; + } + + /** + * Parse the backup_plan from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).backup_plan; + } + + /** + * Parse the revision from BackupPlanRevision resource. + * + * @param {string} backupPlanRevisionName + * A fully-qualified path representing BackupPlanRevision resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromBackupPlanRevisionName(backupPlanRevisionName: string) { + return this.pathTemplates.backupPlanRevisionPathTemplate.match( + backupPlanRevisionName, + ).revision; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project: string, location: string, backupvault: string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .backupvault; + } + + /** + * Return a fully-qualified bindingMatchingResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} auto_protection_policy + * @param {string} binding + * @param {string} matching_resource + * @returns {string} Resource name string. + */ + bindingMatchingResourcePath( + project: string, + location: string, + autoProtectionPolicy: string, + binding: string, + matchingResource: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.render({ + project: project, + location: location, + auto_protection_policy: autoProtectionPolicy, + binding: binding, + matching_resource: matchingResource, + }); + } + + /** + * Parse the project from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).project; + } + + /** + * Parse the location from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).location; + } + + /** + * Parse the auto_protection_policy from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the auto_protection_policy. + */ + matchAutoProtectionPolicyFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).auto_protection_policy; + } + + /** + * Parse the binding from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the binding. + */ + matchBindingFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).binding; + } + + /** + * Parse the matching_resource from BindingMatchingResource resource. + * + * @param {string} bindingMatchingResourceName + * A fully-qualified path representing BindingMatchingResource resource. + * @returns {string} A string representing the matching_resource. + */ + matchMatchingResourceFromBindingMatchingResourceName( + bindingMatchingResourceName: string, + ) { + return this.pathTemplates.bindingMatchingResourcePathTemplate.match( + bindingMatchingResourceName, + ).matching_resource; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath( + project: string, + location: string, + backupvault: string, + datasource: string, + ) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .datasource; + } + + /** + * Return a fully-qualified dataSourceReference resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_source_reference + * @returns {string} Resource name string. + */ + dataSourceReferencePath( + project: string, + location: string, + dataSourceReference: string, + ) { + return this.pathTemplates.dataSourceReferencePathTemplate.render({ + project: project, + location: location, + data_source_reference: dataSourceReference, + }); + } + + /** + * Parse the project from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceReferenceName(dataSourceReferenceName: string) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).project; + } + + /** + * Parse the location from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceReferenceName(dataSourceReferenceName: string) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).location; + } + + /** + * Parse the data_source_reference from DataSourceReference resource. + * + * @param {string} dataSourceReferenceName + * A fully-qualified path representing DataSourceReference resource. + * @returns {string} A string representing the data_source_reference. + */ + matchDataSourceReferenceFromDataSourceReferenceName( + dataSourceReferenceName: string, + ) { + return this.pathTemplates.dataSourceReferencePathTemplate.match( + dataSourceReferenceName, + ).data_source_reference; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified managementServer resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} managementserver + * @returns {string} Resource name string. + */ + managementServerPath( + project: string, + location: string, + managementserver: string, + ) { + return this.pathTemplates.managementServerPathTemplate.render({ + project: project, + location: location, + managementserver: managementserver, + }); + } + + /** + * Parse the project from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the project. + */ + matchProjectFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).project; + } + + /** + * Parse the location from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the location. + */ + matchLocationFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).location; + } + + /** + * Parse the managementserver from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the managementserver. + */ + matchManagementserverFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match( + managementServerName, + ).managementserver; + } + + /** + * Return a fully-qualified resourceBackupConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} resource_backup_config + * @returns {string} Resource name string. + */ + resourceBackupConfigPath( + project: string, + location: string, + resourceBackupConfig: string, + ) { + return this.pathTemplates.resourceBackupConfigPathTemplate.render({ + project: project, + location: location, + resource_backup_config: resourceBackupConfig, + }); + } + + /** + * Parse the project from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceBackupConfigName(resourceBackupConfigName: string) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).project; + } + + /** + * Parse the location from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceBackupConfigName(resourceBackupConfigName: string) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).location; + } + + /** + * Parse the resource_backup_config from ResourceBackupConfig resource. + * + * @param {string} resourceBackupConfigName + * A fully-qualified path representing ResourceBackupConfig resource. + * @returns {string} A string representing the resource_backup_config. + */ + matchResourceBackupConfigFromResourceBackupConfigName( + resourceBackupConfigName: string, + ) { + return this.pathTemplates.resourceBackupConfigPathTemplate.match( + resourceBackupConfigName, + ).resource_backup_config; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.backupDrProtectionSummaryStub && !this._terminated) { + return this.backupDrProtectionSummaryStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.iamClient.close().catch(err => { + throw err; + }); + this.locationsClient.close().catch(err => { + throw err; + }); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client_config.json b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client_config.json new file mode 100644 index 000000000000..9a19d9a37571 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_client_config.json @@ -0,0 +1,43 @@ +{ + "interfaces": { + "google.cloud.backupdr.v1beta.BackupDrProtectionSummary": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListResourceBackupConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_proto_list.json b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_proto_list.json new file mode 100644 index 000000000000..dbe201ab96fb --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/backup_dr_protection_summary_proto_list.json @@ -0,0 +1,17 @@ +[ + "../../protos/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto", + "../../protos/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto", + "../../protos/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto", + "../../protos/google/cloud/backupdr/v1beta/backupdr.proto", + "../../protos/google/cloud/backupdr/v1beta/backupplan.proto", + "../../protos/google/cloud/backupdr/v1beta/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_alloydb.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_disk.proto", + "../../protos/google/cloud/backupdr/v1beta/backupvault_gce.proto", + "../../protos/google/cloud/backupdr/v1beta/bindingmatchingresource.proto", + "../../protos/google/cloud/backupdr/v1beta/datasourcereference.proto", + "../../protos/google/cloud/backupdr/v1beta/protection_summary.proto" +] diff --git a/packages/google-cloud-backupdr/src/v1beta/gapic_metadata.json b/packages/google-cloud-backupdr/src/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..fc6b2024a254 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/gapic_metadata.json @@ -0,0 +1,605 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.backupdr.v1beta", + "libraryPackage": "@google-cloud/backupdr", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanRevision": { + "methods": [ + "getBackupPlanRevision" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "GetDataSourceReference": { + "methods": [ + "getDataSourceReference" + ] + }, + "GetAutoProtectionPolicy": { + "methods": [ + "getAutoProtectionPolicy" + ] + }, + "GetAutoProtectionPolicyBinding": { + "methods": [ + "getAutoProtectionPolicyBinding" + ] + }, + "GetBindingMatchingResource": { + "methods": [ + "getBindingMatchingResource" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "updateBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "UpdateBackupPlanAssociation": { + "methods": [ + "updateBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "InitializeService": { + "methods": [ + "initializeService" + ] + }, + "CreateAutoProtectionPolicy": { + "methods": [ + "createAutoProtectionPolicy" + ] + }, + "UpdateAutoProtectionPolicy": { + "methods": [ + "updateAutoProtectionPolicy" + ] + }, + "DeleteAutoProtectionPolicy": { + "methods": [ + "deleteAutoProtectionPolicy" + ] + }, + "CreateAutoProtectionPolicyBinding": { + "methods": [ + "createAutoProtectionPolicyBinding" + ] + }, + "InitiateDeleteAutoProtectionPolicyBinding": { + "methods": [ + "initiateDeleteAutoProtectionPolicyBinding" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "FetchBackupsForResourceType": { + "methods": [ + "fetchBackupsForResourceType", + "fetchBackupsForResourceTypeStream", + "fetchBackupsForResourceTypeAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "listBackupPlanRevisions", + "listBackupPlanRevisionsStream", + "listBackupPlanRevisionsAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetchBackupPlanAssociationsForResourceType", + "fetchBackupPlanAssociationsForResourceTypeStream", + "fetchBackupPlanAssociationsForResourceTypeAsync" + ] + }, + "ListDataSourceReferences": { + "methods": [ + "listDataSourceReferences", + "listDataSourceReferencesStream", + "listDataSourceReferencesAsync" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetchDataSourceReferencesForResourceType", + "fetchDataSourceReferencesForResourceTypeStream", + "fetchDataSourceReferencesForResourceTypeAsync" + ] + }, + "ListAutoProtectionPolicies": { + "methods": [ + "listAutoProtectionPolicies", + "listAutoProtectionPoliciesStream", + "listAutoProtectionPoliciesAsync" + ] + }, + "ListAutoProtectionPolicyBindings": { + "methods": [ + "listAutoProtectionPolicyBindings", + "listAutoProtectionPolicyBindingsStream", + "listAutoProtectionPolicyBindingsAsync" + ] + }, + "ListAppliedAutoProtectionPolicies": { + "methods": [ + "listAppliedAutoProtectionPolicies", + "listAppliedAutoProtectionPoliciesStream", + "listAppliedAutoProtectionPoliciesAsync" + ] + }, + "ListBindingMatchingResources": { + "methods": [ + "listBindingMatchingResources", + "listBindingMatchingResourcesStream", + "listBindingMatchingResourcesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanRevision": { + "methods": [ + "getBackupPlanRevision" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "GetDataSourceReference": { + "methods": [ + "getDataSourceReference" + ] + }, + "GetAutoProtectionPolicy": { + "methods": [ + "getAutoProtectionPolicy" + ] + }, + "GetAutoProtectionPolicyBinding": { + "methods": [ + "getAutoProtectionPolicyBinding" + ] + }, + "GetBindingMatchingResource": { + "methods": [ + "getBindingMatchingResource" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "updateBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "UpdateBackupPlanAssociation": { + "methods": [ + "updateBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "InitializeService": { + "methods": [ + "initializeService" + ] + }, + "CreateAutoProtectionPolicy": { + "methods": [ + "createAutoProtectionPolicy" + ] + }, + "UpdateAutoProtectionPolicy": { + "methods": [ + "updateAutoProtectionPolicy" + ] + }, + "DeleteAutoProtectionPolicy": { + "methods": [ + "deleteAutoProtectionPolicy" + ] + }, + "CreateAutoProtectionPolicyBinding": { + "methods": [ + "createAutoProtectionPolicyBinding" + ] + }, + "InitiateDeleteAutoProtectionPolicyBinding": { + "methods": [ + "initiateDeleteAutoProtectionPolicyBinding" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "FetchBackupsForResourceType": { + "methods": [ + "fetchBackupsForResourceType", + "fetchBackupsForResourceTypeStream", + "fetchBackupsForResourceTypeAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanRevisions": { + "methods": [ + "listBackupPlanRevisions", + "listBackupPlanRevisionsStream", + "listBackupPlanRevisionsAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": [ + "fetchBackupPlanAssociationsForResourceType", + "fetchBackupPlanAssociationsForResourceTypeStream", + "fetchBackupPlanAssociationsForResourceTypeAsync" + ] + }, + "ListDataSourceReferences": { + "methods": [ + "listDataSourceReferences", + "listDataSourceReferencesStream", + "listDataSourceReferencesAsync" + ] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": [ + "fetchDataSourceReferencesForResourceType", + "fetchDataSourceReferencesForResourceTypeStream", + "fetchDataSourceReferencesForResourceTypeAsync" + ] + }, + "ListAutoProtectionPolicies": { + "methods": [ + "listAutoProtectionPolicies", + "listAutoProtectionPoliciesStream", + "listAutoProtectionPoliciesAsync" + ] + }, + "ListAutoProtectionPolicyBindings": { + "methods": [ + "listAutoProtectionPolicyBindings", + "listAutoProtectionPolicyBindingsStream", + "listAutoProtectionPolicyBindingsAsync" + ] + }, + "ListAppliedAutoProtectionPolicies": { + "methods": [ + "listAppliedAutoProtectionPolicies", + "listAppliedAutoProtectionPoliciesStream", + "listAppliedAutoProtectionPoliciesAsync" + ] + }, + "ListBindingMatchingResources": { + "methods": [ + "listBindingMatchingResources", + "listBindingMatchingResourcesStream", + "listBindingMatchingResourcesAsync" + ] + } + } + } + } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "BackupDrProtectionSummaryClient", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "listResourceBackupConfigs", + "listResourceBackupConfigsStream", + "listResourceBackupConfigsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BackupDrProtectionSummaryClient", + "rpcs": { + "ListResourceBackupConfigs": { + "methods": [ + "listResourceBackupConfigs", + "listResourceBackupConfigsStream", + "listResourceBackupConfigsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-backupdr/src/v1beta/index.ts b/packages/google-cloud-backupdr/src/v1beta/index.ts new file mode 100644 index 000000000000..576f9dae2090 --- /dev/null +++ b/packages/google-cloud-backupdr/src/v1beta/index.ts @@ -0,0 +1,20 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {BackupDRClient} from './backup_d_r_client'; +export {BackupDrProtectionSummaryClient} from './backup_dr_protection_summary_client'; diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1beta.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1beta.ts new file mode 100644 index 000000000000..678dcc86504c --- /dev/null +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1beta.ts @@ -0,0 +1,13764 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as backupdrModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error, +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.BackupDRClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new backupdrModule.v1beta.BackupDRClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new backupdrModule.v1beta.BackupDRClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = backupdrModule.v1beta.BackupDRClient.servicePath; + assert.strictEqual(servicePath, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = backupdrModule.v1beta.BackupDRClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new backupdrModule.v1beta.BackupDRClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new backupdrModule.v1beta.BackupDRClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new backupdrModule.v1beta.BackupDRClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = backupdrModule.v1beta.BackupDRClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new backupdrModule.v1beta.BackupDRClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + await client.initialize(); + assert(client.backupDRStub); + }); + + it('has close method for the initialized client', done => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => { + throw err; + }); + assert(client.backupDRStub); + client + .close() + .then(() => { + done(); + }) + .catch(err => { + throw err; + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch(err => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getManagementServer', () => { + it('invokes getManagementServer without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ); + client.innerApiCalls.getManagementServer = + stubSimpleCall(expectedResponse); + const [response] = await client.getManagementServer(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ); + client.innerApiCalls.getManagementServer = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getManagementServer( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IManagementServer | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getManagementServer = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getManagementServer(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects(client.getManagementServer(request), expectedError); + }); + }); + + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ); + client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupVault(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ); + client.innerApiCalls.getBackupVault = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupVault( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupVault | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupVault = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects(client.getBackupVault(request), expectedError); + }); + }); + + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ); + client.innerApiCalls.getDataSource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IDataSource | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSource = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects(client.getDataSource(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.Backup(), + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.Backup(), + ); + client.innerApiCalls.getBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackup | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ); + client.innerApiCalls.getBackupPlan = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlan( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupPlan | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlan = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects(client.getBackupPlan(request), expectedError); + }); + }); + + describe('getBackupPlanRevision', () => { + it('invokes getBackupPlanRevision without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ); + client.innerApiCalls.getBackupPlanRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanRevision(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanRevision without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ); + client.innerApiCalls.getBackupPlanRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupPlanRevision | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanRevision with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanRevision = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getBackupPlanRevision(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanRevision with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getBackupPlanRevision(request), + expectedError, + ); + }); + }); + + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError, + ); + }); + }); + + describe('getDataSourceReference', () => { + it('invokes getDataSourceReference without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ); + client.innerApiCalls.getDataSourceReference = + stubSimpleCall(expectedResponse); + const [response] = await client.getDataSourceReference(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSourceReference without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ); + client.innerApiCalls.getDataSourceReference = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSourceReference( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IDataSourceReference | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSourceReference with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSourceReference = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getDataSourceReference(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSourceReference as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSourceReference with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getDataSourceReference(request), + expectedError, + ); + }); + }); + + describe('getAutoProtectionPolicy', () => { + it('invokes getAutoProtectionPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ); + client.innerApiCalls.getAutoProtectionPolicy = + stubSimpleCall(expectedResponse); + const [response] = await client.getAutoProtectionPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ); + client.innerApiCalls.getAutoProtectionPolicy = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutoProtectionPolicy( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicy with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutoProtectionPolicy = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getAutoProtectionPolicy(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicy with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getAutoProtectionPolicy(request), + expectedError, + ); + }); + }); + + describe('getAutoProtectionPolicyBinding', () => { + it('invokes getAutoProtectionPolicyBinding without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ); + client.innerApiCalls.getAutoProtectionPolicyBinding = + stubSimpleCall(expectedResponse); + const [response] = await client.getAutoProtectionPolicyBinding(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicyBinding without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ); + client.innerApiCalls.getAutoProtectionPolicyBinding = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAutoProtectionPolicyBinding( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicyBinding with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAutoProtectionPolicyBinding = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getAutoProtectionPolicyBinding(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAutoProtectionPolicyBinding with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getAutoProtectionPolicyBinding(request), + expectedError, + ); + }); + }); + + describe('getBindingMatchingResource', () => { + it('invokes getBindingMatchingResource without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ); + client.innerApiCalls.getBindingMatchingResource = + stubSimpleCall(expectedResponse); + const [response] = await client.getBindingMatchingResource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBindingMatchingResource without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ); + client.innerApiCalls.getBindingMatchingResource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBindingMatchingResource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBindingMatchingResource | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBindingMatchingResource with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBindingMatchingResource = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getBindingMatchingResource(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBindingMatchingResource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBindingMatchingResource with closed client', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => { + throw err; + }); + await assert.rejects( + client.getBindingMatchingResource(request), + expectedError, + ); + }); + }); + + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateManagementServerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateManagementServerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IManagementServer, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateManagementServerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createManagementServer(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateManagementServerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateManagementServerProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateManagementServerProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateManagementServerProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateManagementServerProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteManagementServer(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteManagementServerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteManagementServerProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteManagementServerProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteManagementServerProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkDeleteManagementServerProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupVaultRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupVaultRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupVaultRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupVaultRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBackupVaultProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateBackupVaultProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(), + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest', + ['backupVault', 'name'], + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(), + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest', + ['backupVault', 'name'], + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupVault, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(), + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest', + ['backupVault', 'name'], + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(), + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest', + ['backupVault', 'name'], + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateBackupVaultProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateBackupVaultProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteBackupVaultProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkDeleteBackupVaultProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(), + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateDataSourceRequest', + ['dataSource', 'name'], + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(), + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateDataSourceRequest', + ['dataSource', 'name'], + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IDataSource, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(), + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateDataSourceRequest', + ['dataSource', 'name'], + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(), + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateDataSourceRequest', + ['dataSource', 'name'], + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataSourceProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDataSourceProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataSourceProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateDataSourceProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupRequest(), + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupRequest', + ['backup', 'name'], + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkUpdateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackup, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.checkDeleteBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreBackup', () => { + it('invokes restoreBackup without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.RestoreBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.RestoreBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.RestoreBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.RestoreBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.RestoreBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.RestoreBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.restoreBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.RestoreBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.RestoreBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.restoreBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRestoreBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkRestoreBackupProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlan', () => { + it('invokes createBackupPlan without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.createBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBackupPlanProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateBackupPlanProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackupPlan', () => { + it('invokes updateBackupPlan without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(), + ); + request.backupPlan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest', + ['backupPlan', 'name'], + ); + request.backupPlan.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(), + ); + request.backupPlan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest', + ['backupPlan', 'name'], + ); + request.backupPlan.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlan, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlan with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(), + ); + request.backupPlan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest', + ['backupPlan', 'name'], + ); + request.backupPlan.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPlan = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(), + ); + request.backupPlan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest', + ['backupPlan', 'name'], + ); + request.backupPlan.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateBackupPlanProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateBackupPlanProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlan', () => { + it('invokes deleteBackupPlan without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteBackupPlanProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkDeleteBackupPlanProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlanAssociation', () => { + it('invokes createBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createBackupPlanAssociation(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateBackupPlanAssociationProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateBackupPlanAssociationProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackupPlanAssociation', () => { + it('invokes updateBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(), + ); + request.backupPlanAssociation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest', + ['backupPlanAssociation', 'name'], + ); + request.backupPlanAssociation.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan_association.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(), + ); + request.backupPlanAssociation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest', + ['backupPlanAssociation', 'name'], + ); + request.backupPlanAssociation.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan_association.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(), + ); + request.backupPlanAssociation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest', + ['backupPlanAssociation', 'name'], + ); + request.backupPlanAssociation.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan_association.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateBackupPlanAssociation(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(), + ); + request.backupPlanAssociation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest', + ['backupPlanAssociation', 'name'], + ); + request.backupPlanAssociation.name = defaultValue1; + const expectedHeaderRequestParams = `backup_plan_association.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateBackupPlanAssociationProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateBackupPlanAssociationProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlanAssociation', () => { + it('invokes deleteBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteBackupPlanAssociation(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkDeleteBackupPlanAssociationProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkDeleteBackupPlanAssociationProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('triggerBackup', () => { + it('invokes triggerBackup without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.TriggerBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.TriggerBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.triggerBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.TriggerBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.TriggerBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.triggerBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.TriggerBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.TriggerBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.triggerBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.TriggerBackupRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.TriggerBackupRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.triggerBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTriggerBackupProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkTriggerBackupProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTriggerBackupProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkTriggerBackupProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('initializeService', () => { + it('invokes initializeService without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitializeServiceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitializeServiceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.initializeService = + stubLongRunningCall(expectedResponse); + const [operation] = await client.initializeService(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeService without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitializeServiceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitializeServiceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.initializeService = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initializeService( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IInitializeServiceResponse, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeService with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitializeServiceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitializeServiceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeService = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects(client.initializeService(request), expectedError); + const actualRequest = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeService with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitializeServiceRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitializeServiceRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeService = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.initializeService(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeService as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkInitializeServiceProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkInitializeServiceProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkInitializeServiceProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkInitializeServiceProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAutoProtectionPolicy', () => { + it('invokes createAutoProtectionPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAutoProtectionPolicy = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAutoProtectionPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAutoProtectionPolicy = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAutoProtectionPolicy( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicy with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutoProtectionPolicy = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createAutoProtectionPolicy(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicy with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutoProtectionPolicy = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.createAutoProtectionPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAutoProtectionPolicyProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateAutoProtectionPolicyProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAutoProtectionPolicyProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateAutoProtectionPolicyProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateAutoProtectionPolicy', () => { + it('invokes updateAutoProtectionPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(), + ); + request.autoProtectionPolicy ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest', + ['autoProtectionPolicy', 'name'], + ); + request.autoProtectionPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `auto_protection_policy.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAutoProtectionPolicy = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateAutoProtectionPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoProtectionPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(), + ); + request.autoProtectionPolicy ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest', + ['autoProtectionPolicy', 'name'], + ); + request.autoProtectionPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `auto_protection_policy.name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.updateAutoProtectionPolicy = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAutoProtectionPolicy( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoProtectionPolicy with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(), + ); + request.autoProtectionPolicy ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest', + ['autoProtectionPolicy', 'name'], + ); + request.autoProtectionPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `auto_protection_policy.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoProtectionPolicy = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateAutoProtectionPolicy(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAutoProtectionPolicy with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(), + ); + request.autoProtectionPolicy ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest', + ['autoProtectionPolicy', 'name'], + ); + request.autoProtectionPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `auto_protection_policy.name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAutoProtectionPolicy = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.updateAutoProtectionPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateAutoProtectionPolicyProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkUpdateAutoProtectionPolicyProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateAutoProtectionPolicyProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkUpdateAutoProtectionPolicyProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteAutoProtectionPolicy', () => { + it('invokes deleteAutoProtectionPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteAutoProtectionPolicy = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteAutoProtectionPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutoProtectionPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.deleteAutoProtectionPolicy = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAutoProtectionPolicy( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutoProtectionPolicy with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutoProtectionPolicy = stubLongRunningCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteAutoProtectionPolicy(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAutoProtectionPolicy with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAutoProtectionPolicy = stubLongRunningCall( + undefined, + undefined, + expectedError, + ); + const [operation] = await client.deleteAutoProtectionPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAutoProtectionPolicy as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteAutoProtectionPolicyProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkDeleteAutoProtectionPolicyProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteAutoProtectionPolicyProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkDeleteAutoProtectionPolicyProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAutoProtectionPolicyBinding', () => { + it('invokes createAutoProtectionPolicyBinding without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAutoProtectionPolicyBinding = + stubLongRunningCall(expectedResponse); + const [operation] = + await client.createAutoProtectionPolicyBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicyBinding without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.createAutoProtectionPolicyBinding = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAutoProtectionPolicyBinding( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicyBinding with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutoProtectionPolicyBinding = + stubLongRunningCall(undefined, expectedError); + await assert.rejects( + client.createAutoProtectionPolicyBinding(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAutoProtectionPolicyBinding with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAutoProtectionPolicyBinding = + stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = + await client.createAutoProtectionPolicyBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAutoProtectionPolicyBindingProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkCreateAutoProtectionPolicyBindingProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAutoProtectionPolicyBindingProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkCreateAutoProtectionPolicyBindingProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('initiateDeleteAutoProtectionPolicyBinding', () => { + it('invokes initiateDeleteAutoProtectionPolicyBinding without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.initiateDeleteAutoProtectionPolicyBinding = + stubLongRunningCall(expectedResponse); + const [operation] = + await client.initiateDeleteAutoProtectionPolicyBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateDeleteAutoProtectionPolicyBinding without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation(), + ); + client.innerApiCalls.initiateDeleteAutoProtectionPolicyBinding = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initiateDeleteAutoProtectionPolicyBinding( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + > | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding, + protos.google.cloud.backupdr.v1beta.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateDeleteAutoProtectionPolicyBinding with call error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initiateDeleteAutoProtectionPolicyBinding = + stubLongRunningCall(undefined, expectedError); + await assert.rejects( + client.initiateDeleteAutoProtectionPolicyBinding(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateDeleteAutoProtectionPolicyBinding with LRO error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initiateDeleteAutoProtectionPolicyBinding = + stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = + await client.initiateDeleteAutoProtectionPolicyBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .initiateDeleteAutoProtectionPolicyBinding as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkInitiateDeleteAutoProtectionPolicyBindingProgress without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkInitiateDeleteAutoProtectionPolicyBindingProgress( + expectedResponse.name, + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkInitiateDeleteAutoProtectionPolicyBindingProgress with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.checkInitiateDeleteAutoProtectionPolicyBindingProgress(''), + expectedError, + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listManagementServers', () => { + it('invokes listManagementServers without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCall(expectedResponse); + const [response] = await client.listManagementServers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listManagementServers( + request, + ( + err?: Error | null, + result?: + protos.google.cloud.backupdr.v1beta.IManagementServer[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listManagementServers = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listManagementServers(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServersStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + ]; + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.ManagementServer) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request), + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listManagementServersStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.ManagementServer) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request), + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listManagementServers without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ManagementServer(), + ), + ]; + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IManagementServer[] = + []; + const iterable = client.listManagementServersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listManagementServers with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListManagementServersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListManagementServersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listManagementServersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IManagementServer[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBackupVaults', () => { + it('invokes listBackupVaults without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.innerApiCalls.listBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupVault[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupVaults = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listBackupVaults(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupVault) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request), + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupVault) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request), + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupVaults without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupVault[] = []; + const iterable = client.listBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupVaults with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupVault[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('fetchUsableBackupVaults', () => { + it('invokes fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchUsableBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchUsableBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupVault[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.fetchUsableBackupVaults(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupVault) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request), + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes fetchUsableBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupVault) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request), + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupVault(), + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupVault[] = []; + const iterable = client.fetchUsableBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchUsableBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupVault[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listDataSources', () => { + it('invokes listDataSources without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + ]; + client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + ]; + client.innerApiCalls.listDataSources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSources( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IDataSource[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSources = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listDataSources(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourcesStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + ]; + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.DataSource) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request), + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listDataSourcesStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.DataSource) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request), + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDataSources without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSource(), + ), + ]; + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IDataSource[] = []; + const iterable = client.listDataSourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDataSources with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IDataSource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.innerApiCalls.listBackups = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackup[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.descriptors.page.listBackups.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request), + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall( + undefined, + expectedError, + ); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request), + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError, + ); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('fetchBackupsForResourceType', () => { + it('invokes fetchBackupsForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.innerApiCalls.fetchBackupsForResourceType = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchBackupsForResourceType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceType without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.innerApiCalls.fetchBackupsForResourceType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchBackupsForResourceType( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackup[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchBackupsForResourceType = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.fetchBackupsForResourceType(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchBackupsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupsForResourceTypeStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.descriptors.page.fetchBackupsForResourceType.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchBackupsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchBackupsForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes fetchBackupsForResourceTypeStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupsForResourceType.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchBackupsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.Backup) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchBackupsForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchBackupsForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1beta.Backup()), + ]; + client.descriptors.page.fetchBackupsForResourceType.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackup[] = []; + const iterable = client.fetchBackupsForResourceTypeAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchBackupsForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchBackupsForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupsForResourceType.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchBackupsForResourceTypeAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchBackupsForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchBackupsForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBackupPlans', () => { + it('invokes listBackupPlans without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + ]; + client.innerApiCalls.listBackupPlans = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlans( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1beta.IBackupPlan[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlans = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listBackupPlans(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlansStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + ]; + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupPlan) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request), + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBackupPlansStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1beta.BackupPlan) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request), + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlans without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlan(), + ), + ]; + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlan[] = []; + const iterable = client.listBackupPlansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlans with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlansRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlansRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBackupPlanRevisions', () => { + it('invokes listBackupPlanRevisions without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + ]; + client.innerApiCalls.listBackupPlanRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlanRevisions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanRevisions without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + ]; + client.innerApiCalls.listBackupPlanRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlanRevisions( + request, + ( + err?: Error | null, + result?: + protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanRevisions with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlanRevisions = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listBackupPlanRevisions(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanRevisionsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + ]; + client.descriptors.page.listBackupPlanRevisions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlanRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanRevision[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanRevision, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlanRevisions, request), + ); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBackupPlanRevisionsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanRevisions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlanRevisionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanRevision[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanRevision, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlanRevisions, request), + ); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlanRevisions without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanRevision(), + ), + ]; + client.descriptors.page.listBackupPlanRevisions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[] = + []; + const iterable = client.listBackupPlanRevisionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlanRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlanRevisions with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanRevisions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlanRevisionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanRevision[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlanRevisions + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBackupPlanRevisions + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBackupPlanAssociations', () => { + it('invokes listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.innerApiCalls.listBackupPlanAssociations = + stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlanAssociations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.innerApiCalls.listBackupPlanAssociations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlanAssociations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listBackupPlanAssociations(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlanAssociations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociationsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.descriptors.page.listBackupPlanAssociations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request), + ); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBackupPlanAssociationsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request), + ); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.descriptors.page.listBackupPlanAssociations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] = + []; + const iterable = client.listBackupPlanAssociationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlanAssociations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlanAssociationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlanAssociations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBackupPlanAssociations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('fetchBackupPlanAssociationsForResourceType', () => { + it('invokes fetchBackupPlanAssociationsForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.innerApiCalls.fetchBackupPlanAssociationsForResourceType = + stubSimpleCall(expectedResponse); + const [response] = + await client.fetchBackupPlanAssociationsForResourceType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupPlanAssociationsForResourceType without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.innerApiCalls.fetchBackupPlanAssociationsForResourceType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchBackupPlanAssociationsForResourceType( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupPlanAssociationsForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchBackupPlanAssociationsForResourceType = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.fetchBackupPlanAssociationsForResourceType(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchBackupPlanAssociationsForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchBackupPlanAssociationsForResourceTypeStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.descriptors.page.fetchBackupPlanAssociationsForResourceType.createStream = + stubPageStreamingCall(expectedResponse); + const stream = + client.fetchBackupPlanAssociationsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchBackupPlanAssociationsForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes fetchBackupPlanAssociationsForResourceTypeStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupPlanAssociationsForResourceType.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = + client.fetchBackupPlanAssociationsForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BackupPlanAssociation, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchBackupPlanAssociationsForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchBackupPlanAssociationsForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BackupPlanAssociation(), + ), + ]; + client.descriptors.page.fetchBackupPlanAssociationsForResourceType.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] = + []; + const iterable = + client.fetchBackupPlanAssociationsForResourceTypeAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchBackupPlanAssociationsForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchBackupPlanAssociationsForResourceType.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = + client.fetchBackupPlanAssociationsForResourceTypeAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBackupPlanAssociation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchBackupPlanAssociationsForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listDataSourceReferences', () => { + it('invokes listDataSourceReferences without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.innerApiCalls.listDataSourceReferences = + stubSimpleCall(expectedResponse); + const [response] = await client.listDataSourceReferences(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferences without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.innerApiCalls.listDataSourceReferences = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSourceReferences( + request, + ( + err?: Error | null, + result?: + protos.google.cloud.backupdr.v1beta.IDataSourceReference[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferences with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSourceReferences = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listDataSourceReferences(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSourceReferences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourceReferencesStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.descriptors.page.listDataSourceReferences.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourceReferencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSourceReference[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.DataSourceReference, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listDataSourceReferences + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSourceReferences, request), + ); + assert( + ( + client.descriptors.page.listDataSourceReferences + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listDataSourceReferencesStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSourceReferences.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourceReferencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSourceReference[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.DataSourceReference, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDataSourceReferences + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSourceReferences, request), + ); + assert( + ( + client.descriptors.page.listDataSourceReferences + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDataSourceReferences without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.descriptors.page.listDataSourceReferences.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IDataSourceReference[] = + []; + const iterable = client.listDataSourceReferencesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSourceReferences + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listDataSourceReferences + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDataSourceReferences with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSourceReferences.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourceReferencesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IDataSourceReference[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSourceReferences + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listDataSourceReferences + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('fetchDataSourceReferencesForResourceType', () => { + it('invokes fetchDataSourceReferencesForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.innerApiCalls.fetchDataSourceReferencesForResourceType = + stubSimpleCall(expectedResponse); + const [response] = + await client.fetchDataSourceReferencesForResourceType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDataSourceReferencesForResourceType without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.innerApiCalls.fetchDataSourceReferencesForResourceType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchDataSourceReferencesForResourceType( + request, + ( + err?: Error | null, + result?: + protos.google.cloud.backupdr.v1beta.IDataSourceReference[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDataSourceReferencesForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchDataSourceReferencesForResourceType = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.fetchDataSourceReferencesForResourceType(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .fetchDataSourceReferencesForResourceType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDataSourceReferencesForResourceTypeStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.descriptors.page.fetchDataSourceReferencesForResourceType.createStream = + stubPageStreamingCall(expectedResponse); + const stream = + client.fetchDataSourceReferencesForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSourceReference[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.DataSourceReference, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchDataSourceReferencesForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes fetchDataSourceReferencesForResourceTypeStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchDataSourceReferencesForResourceType.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = + client.fetchDataSourceReferencesForResourceTypeStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.DataSourceReference[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.DataSourceReference, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.fetchDataSourceReferencesForResourceType, + request, + ), + ); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchDataSourceReferencesForResourceType without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.DataSourceReference(), + ), + ]; + client.descriptors.page.fetchDataSourceReferencesForResourceType.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IDataSourceReference[] = + []; + const iterable = + client.fetchDataSourceReferencesForResourceTypeAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with fetchDataSourceReferencesForResourceType with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchDataSourceReferencesForResourceType.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = + client.fetchDataSourceReferencesForResourceTypeAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IDataSourceReference[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.fetchDataSourceReferencesForResourceType + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listAutoProtectionPolicies', () => { + it('invokes listAutoProtectionPolicies without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + ]; + client.innerApiCalls.listAutoProtectionPolicies = + stubSimpleCall(expectedResponse); + const [response] = await client.listAutoProtectionPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPolicies without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + ]; + client.innerApiCalls.listAutoProtectionPolicies = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAutoProtectionPolicies( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPolicies with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAutoProtectionPolicies = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listAutoProtectionPolicies(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPoliciesStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + ]; + client.descriptors.page.listAutoProtectionPolicies.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAutoProtectionPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listAutoProtectionPolicies, request), + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listAutoProtectionPoliciesStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutoProtectionPolicies.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutoProtectionPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listAutoProtectionPolicies, request), + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAutoProtectionPolicies without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicy(), + ), + ]; + client.descriptors.page.listAutoProtectionPolicies.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[] = + []; + const iterable = client.listAutoProtectionPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAutoProtectionPolicies + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAutoProtectionPolicies with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutoProtectionPolicies.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAutoProtectionPoliciesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicy[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAutoProtectionPolicies + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicies + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listAutoProtectionPolicyBindings', () => { + it('invokes listAutoProtectionPolicyBindings without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + ]; + client.innerApiCalls.listAutoProtectionPolicyBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.listAutoProtectionPolicyBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPolicyBindings without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + ]; + client.innerApiCalls.listAutoProtectionPolicyBindings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAutoProtectionPolicyBindings( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPolicyBindings with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAutoProtectionPolicyBindings = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listAutoProtectionPolicyBindings(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAutoProtectionPolicyBindings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAutoProtectionPolicyBindingsStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + ]; + client.descriptors.page.listAutoProtectionPolicyBindings.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAutoProtectionPolicyBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listAutoProtectionPolicyBindings, + request, + ), + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listAutoProtectionPolicyBindingsStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutoProtectionPolicyBindings.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAutoProtectionPolicyBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listAutoProtectionPolicyBindings, + request, + ), + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAutoProtectionPolicyBindings without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(), + ), + ]; + client.descriptors.page.listAutoProtectionPolicyBindings.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[] = + []; + const iterable = client.listAutoProtectionPolicyBindingsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAutoProtectionPolicyBindings with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAutoProtectionPolicyBindings.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAutoProtectionPolicyBindingsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IAutoProtectionPolicyBinding[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAutoProtectionPolicyBindings + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listAppliedAutoProtectionPolicies', () => { + it('invokes listAppliedAutoProtectionPolicies without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + ]; + client.innerApiCalls.listAppliedAutoProtectionPolicies = + stubSimpleCall(expectedResponse); + const [response] = + await client.listAppliedAutoProtectionPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppliedAutoProtectionPolicies without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + ]; + client.innerApiCalls.listAppliedAutoProtectionPolicies = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAppliedAutoProtectionPolicies( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppliedAutoProtectionPolicies with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAppliedAutoProtectionPolicies = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listAppliedAutoProtectionPolicies(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAppliedAutoProtectionPolicies as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAppliedAutoProtectionPoliciesStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + ]; + client.descriptors.page.listAppliedAutoProtectionPolicies.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAppliedAutoProtectionPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listAppliedAutoProtectionPolicies, + request, + ), + ); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listAppliedAutoProtectionPoliciesStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAppliedAutoProtectionPolicies.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAppliedAutoProtectionPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listAppliedAutoProtectionPolicies, + request, + ), + ); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAppliedAutoProtectionPolicies without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(), + ), + ]; + client.descriptors.page.listAppliedAutoProtectionPolicies.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[] = + []; + const iterable = client.listAppliedAutoProtectionPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listAppliedAutoProtectionPolicies with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAppliedAutoProtectionPolicies.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAppliedAutoProtectionPoliciesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IAppliedAutoProtectionPolicy[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listAppliedAutoProtectionPolicies + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listBindingMatchingResources', () => { + it('invokes listBindingMatchingResources without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + ]; + client.innerApiCalls.listBindingMatchingResources = + stubSimpleCall(expectedResponse); + const [response] = await client.listBindingMatchingResources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBindingMatchingResources without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + ]; + client.innerApiCalls.listBindingMatchingResources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBindingMatchingResources( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBindingMatchingResources with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBindingMatchingResources = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listBindingMatchingResources(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBindingMatchingResources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBindingMatchingResourcesStream without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + ]; + client.descriptors.page.listBindingMatchingResources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBindingMatchingResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BindingMatchingResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BindingMatchingResource, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listBindingMatchingResources, + request, + ), + ); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listBindingMatchingResourcesStream with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBindingMatchingResources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBindingMatchingResourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.BindingMatchingResource[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.BindingMatchingResource, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listBindingMatchingResources, + request, + ), + ); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBindingMatchingResources without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.BindingMatchingResource(), + ), + ]; + client.descriptors.page.listBindingMatchingResources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[] = + []; + const iterable = client.listBindingMatchingResourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBindingMatchingResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listBindingMatchingResources with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBindingMatchingResources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBindingMatchingResourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IBindingMatchingResource[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBindingMatchingResources + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listBindingMatchingResources + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions, + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError, + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation(), + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient + .getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest(), + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient + .cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest(), + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest(), + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient + .deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest(), + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request), + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest(), + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse(), + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse(), + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse(), + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest(), + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + }); + }); + + describe('Path templates', () => { + describe('appliedAutoProtectionPolicy', async () => { + const fakePath = '/rendered/path/appliedAutoProtectionPolicy'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + applied_auto_protection_policy: 'appliedAutoProtectionPolicyValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('appliedAutoProtectionPolicyPath', () => { + const result = client.appliedAutoProtectionPolicyPath( + 'projectValue', + 'locationValue', + 'appliedAutoProtectionPolicyValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchProjectFromAppliedAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchLocationFromAppliedAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName( + fakePath, + ); + assert.strictEqual(result, 'appliedAutoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('autoProtectionPolicy', async () => { + const fakePath = '/rendered/path/autoProtectionPolicy'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.autoProtectionPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.autoProtectionPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('autoProtectionPolicyPath', () => { + const result = client.autoProtectionPolicyPath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAutoProtectionPolicyName', () => { + const result = + client.matchProjectFromAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAutoProtectionPolicyName', () => { + const result = + client.matchLocationFromAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromAutoProtectionPolicyName', () => { + const result = + client.matchAutoProtectionPolicyFromAutoProtectionPolicyName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('autoProtectionPolicyBinding', async () => { + const fakePath = '/rendered/path/autoProtectionPolicyBinding'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + binding: 'bindingValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.autoProtectionPolicyBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.autoProtectionPolicyBindingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('autoProtectionPolicyBindingPath', () => { + const result = client.autoProtectionPolicyBindingPath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + 'bindingValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchProjectFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchLocationFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBindingFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchBindingFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'bindingValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backup', async () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + backup: 'backupValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + 'backupValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlan', async () => { + const fakePath = '/rendered/path/backupPlan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath( + 'projectValue', + 'locationValue', + 'backupPlanValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlanAssociation', async () => { + const fakePath = '/rendered/path/backupPlanAssociation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan_association: 'backupPlanAssociationValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath( + 'projectValue', + 'locationValue', + 'backupPlanAssociationValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = + client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = + client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = + client.matchBackupPlanAssociationFromBackupPlanAssociationName( + fakePath, + ); + assert.strictEqual(result, 'backupPlanAssociationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlanRevision', async () => { + const fakePath = '/rendered/path/backupPlanRevision'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + revision: 'revisionValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupPlanRevisionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanRevisionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanRevisionPath', () => { + const result = client.backupPlanRevisionPath( + 'projectValue', + 'locationValue', + 'backupPlanValue', + 'revisionValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanRevisionName', () => { + const result = client.matchProjectFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanRevisionName', () => { + const result = client.matchLocationFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanFromBackupPlanRevisionName', () => { + const result = + client.matchBackupPlanFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchRevisionFromBackupPlanRevisionName', () => { + const result = client.matchRevisionFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'revisionValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupVault', async () => { + const fakePath = '/rendered/path/backupVault'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('bindingMatchingResource', async () => { + const fakePath = '/rendered/path/bindingMatchingResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + binding: 'bindingValue', + matching_resource: 'matchingResourceValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.bindingMatchingResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.bindingMatchingResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('bindingMatchingResourcePath', () => { + const result = client.bindingMatchingResourcePath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + 'bindingValue', + 'matchingResourceValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBindingMatchingResourceName', () => { + const result = + client.matchProjectFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBindingMatchingResourceName', () => { + const result = + client.matchLocationFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromBindingMatchingResourceName', () => { + const result = + client.matchAutoProtectionPolicyFromBindingMatchingResourceName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBindingFromBindingMatchingResourceName', () => { + const result = + client.matchBindingFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'bindingValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchMatchingResourceFromBindingMatchingResourceName', () => { + const result = + client.matchMatchingResourceFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'matchingResourceValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('dataSource', async () => { + const fakePath = '/rendered/path/dataSource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('dataSourceReference', async () => { + const fakePath = '/rendered/path/dataSourceReference'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_source_reference: 'dataSourceReferenceValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataSourceReferencePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourceReferencePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourceReferencePath', () => { + const result = client.dataSourceReferencePath( + 'projectValue', + 'locationValue', + 'dataSourceReferenceValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromDataSourceReferenceName', () => { + const result = client.matchProjectFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromDataSourceReferenceName', () => { + const result = + client.matchLocationFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDataSourceReferenceFromDataSourceReferenceName', () => { + const result = + client.matchDataSourceReferenceFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'dataSourceReferenceValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('managementServer', async () => { + const fakePath = '/rendered/path/managementServer'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + managementserver: 'managementserverValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.managementServerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.managementServerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('managementServerPath', () => { + const result = client.managementServerPath( + 'projectValue', + 'locationValue', + 'managementserverValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.managementServerPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromManagementServerName', () => { + const result = client.matchProjectFromManagementServerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromManagementServerName', () => { + const result = client.matchLocationFromManagementServerName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchManagementserverFromManagementServerName', () => { + const result = + client.matchManagementserverFromManagementServerName(fakePath); + assert.strictEqual(result, 'managementserverValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('project', async () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('resourceBackupConfig', async () => { + const fakePath = '/rendered/path/resourceBackupConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + resource_backup_config: 'resourceBackupConfigValue', + }; + const client = new backupdrModule.v1beta.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourceBackupConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.resourceBackupConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('resourceBackupConfigPath', () => { + const result = client.resourceBackupConfigPath( + 'projectValue', + 'locationValue', + 'resourceBackupConfigValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromResourceBackupConfigName', () => { + const result = + client.matchProjectFromResourceBackupConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromResourceBackupConfigName', () => { + const result = + client.matchLocationFromResourceBackupConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchResourceBackupConfigFromResourceBackupConfigName', () => { + const result = + client.matchResourceBackupConfigFromResourceBackupConfigName( + fakePath, + ); + assert.strictEqual(result, 'resourceBackupConfigValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-backupdr/test/gapic_backup_dr_protection_summary_v1beta.ts b/packages/google-cloud-backupdr/test/gapic_backup_dr_protection_summary_v1beta.ts new file mode 100644 index 000000000000..94256e40581d --- /dev/null +++ b/packages/google-cloud-backupdr/test/gapic_backup_dr_protection_summary_v1beta.ts @@ -0,0 +1,2458 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as backupdrprotectionsummaryModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta.BackupDrProtectionSummaryClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient + .servicePath; + assert.strictEqual(servicePath, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient + .apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + {universeDomain: 'example.com'}, + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + {universe_domain: 'example.com'}, + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + {universeDomain: 'configured.example.com'}, + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + {universe_domain: 'example.com', universeDomain: 'example.net'}, + ); + }); + }); + + it('has port', () => { + const port = + backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + fallback: true, + }, + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + assert.strictEqual(client.backupDrProtectionSummaryStub, undefined); + await client.initialize(); + assert(client.backupDrProtectionSummaryStub); + }); + + it('has close method for the initialized client', done => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + client.initialize().catch(err => { + throw err; + }); + assert(client.backupDrProtectionSummaryStub); + client + .close() + .then(() => { + done(); + }) + .catch(err => { + throw err; + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + assert.strictEqual(client.backupDrProtectionSummaryStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch(err => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('listResourceBackupConfigs', () => { + it('invokes listResourceBackupConfigs without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + ]; + client.innerApiCalls.listResourceBackupConfigs = + stubSimpleCall(expectedResponse); + const [response] = await client.listResourceBackupConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceBackupConfigs without error using callback', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + ]; + client.innerApiCalls.listResourceBackupConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listResourceBackupConfigs( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceBackupConfigs with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listResourceBackupConfigs = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listResourceBackupConfigs(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listResourceBackupConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceBackupConfigsStream without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + ]; + client.descriptors.page.listResourceBackupConfigs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listResourceBackupConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.ResourceBackupConfig[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.ResourceBackupConfig, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listResourceBackupConfigs, request), + ); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listResourceBackupConfigsStream with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceBackupConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourceBackupConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1beta.ResourceBackupConfig[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.backupdr.v1beta.ResourceBackupConfig, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listResourceBackupConfigs, request), + ); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listResourceBackupConfigs without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ResourceBackupConfig(), + ), + ]; + client.descriptors.page.listResourceBackupConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[] = + []; + const iterable = client.listResourceBackupConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listResourceBackupConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listResourceBackupConfigs with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceBackupConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourceBackupConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1beta.IResourceBackupConfig[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listResourceBackupConfigs + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listResourceBackupConfigs + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy(), + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions, + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse(), + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client + .testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ) + .catch(err => { + throw err; + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest(), + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError, + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError, + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('Path templates', () => { + describe('appliedAutoProtectionPolicy', async () => { + const fakePath = '/rendered/path/appliedAutoProtectionPolicy'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + applied_auto_protection_policy: 'appliedAutoProtectionPolicyValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('appliedAutoProtectionPolicyPath', () => { + const result = client.appliedAutoProtectionPolicyPath( + 'projectValue', + 'locationValue', + 'appliedAutoProtectionPolicyValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchProjectFromAppliedAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchLocationFromAppliedAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName', () => { + const result = + client.matchAppliedAutoProtectionPolicyFromAppliedAutoProtectionPolicyName( + fakePath, + ); + assert.strictEqual(result, 'appliedAutoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.appliedAutoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('autoProtectionPolicy', async () => { + const fakePath = '/rendered/path/autoProtectionPolicy'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.autoProtectionPolicyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.autoProtectionPolicyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('autoProtectionPolicyPath', () => { + const result = client.autoProtectionPolicyPath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAutoProtectionPolicyName', () => { + const result = + client.matchProjectFromAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAutoProtectionPolicyName', () => { + const result = + client.matchLocationFromAutoProtectionPolicyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromAutoProtectionPolicyName', () => { + const result = + client.matchAutoProtectionPolicyFromAutoProtectionPolicyName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('autoProtectionPolicyBinding', async () => { + const fakePath = '/rendered/path/autoProtectionPolicyBinding'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + binding: 'bindingValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.autoProtectionPolicyBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.autoProtectionPolicyBindingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('autoProtectionPolicyBindingPath', () => { + const result = client.autoProtectionPolicyBindingPath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + 'bindingValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchProjectFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchLocationFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchAutoProtectionPolicyFromAutoProtectionPolicyBindingName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBindingFromAutoProtectionPolicyBindingName', () => { + const result = + client.matchBindingFromAutoProtectionPolicyBindingName(fakePath); + assert.strictEqual(result, 'bindingValue'); + assert( + ( + client.pathTemplates.autoProtectionPolicyBindingPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backup', async () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + backup: 'backupValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + 'backupValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlan', async () => { + const fakePath = '/rendered/path/backupPlan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath( + 'projectValue', + 'locationValue', + 'backupPlanValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlanAssociation', async () => { + const fakePath = '/rendered/path/backupPlanAssociation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan_association: 'backupPlanAssociationValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath( + 'projectValue', + 'locationValue', + 'backupPlanAssociationValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = + client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = + client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = + client.matchBackupPlanAssociationFromBackupPlanAssociationName( + fakePath, + ); + assert.strictEqual(result, 'backupPlanAssociationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupPlanRevision', async () => { + const fakePath = '/rendered/path/backupPlanRevision'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + revision: 'revisionValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.backupPlanRevisionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanRevisionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanRevisionPath', () => { + const result = client.backupPlanRevisionPath( + 'projectValue', + 'locationValue', + 'backupPlanValue', + 'revisionValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupPlanRevisionName', () => { + const result = client.matchProjectFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupPlanRevisionName', () => { + const result = client.matchLocationFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupPlanFromBackupPlanRevisionName', () => { + const result = + client.matchBackupPlanFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchRevisionFromBackupPlanRevisionName', () => { + const result = client.matchRevisionFromBackupPlanRevisionName(fakePath); + assert.strictEqual(result, 'revisionValue'); + assert( + ( + client.pathTemplates.backupPlanRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('backupVault', async () => { + const fakePath = '/rendered/path/backupVault'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('bindingMatchingResource', async () => { + const fakePath = '/rendered/path/bindingMatchingResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + auto_protection_policy: 'autoProtectionPolicyValue', + binding: 'bindingValue', + matching_resource: 'matchingResourceValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.bindingMatchingResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.bindingMatchingResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('bindingMatchingResourcePath', () => { + const result = client.bindingMatchingResourcePath( + 'projectValue', + 'locationValue', + 'autoProtectionPolicyValue', + 'bindingValue', + 'matchingResourceValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromBindingMatchingResourceName', () => { + const result = + client.matchProjectFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromBindingMatchingResourceName', () => { + const result = + client.matchLocationFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchAutoProtectionPolicyFromBindingMatchingResourceName', () => { + const result = + client.matchAutoProtectionPolicyFromBindingMatchingResourceName( + fakePath, + ); + assert.strictEqual(result, 'autoProtectionPolicyValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBindingFromBindingMatchingResourceName', () => { + const result = + client.matchBindingFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'bindingValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchMatchingResourceFromBindingMatchingResourceName', () => { + const result = + client.matchMatchingResourceFromBindingMatchingResourceName(fakePath); + assert.strictEqual(result, 'matchingResourceValue'); + assert( + ( + client.pathTemplates.bindingMatchingResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('dataSource', async () => { + const fakePath = '/rendered/path/dataSource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('dataSourceReference', async () => { + const fakePath = '/rendered/path/dataSourceReference'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_source_reference: 'dataSourceReferenceValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.dataSourceReferencePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourceReferencePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourceReferencePath', () => { + const result = client.dataSourceReferencePath( + 'projectValue', + 'locationValue', + 'dataSourceReferenceValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromDataSourceReferenceName', () => { + const result = client.matchProjectFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromDataSourceReferenceName', () => { + const result = + client.matchLocationFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDataSourceReferenceFromDataSourceReferenceName', () => { + const result = + client.matchDataSourceReferenceFromDataSourceReferenceName(fakePath); + assert.strictEqual(result, 'dataSourceReferenceValue'); + assert( + ( + client.pathTemplates.dataSourceReferencePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('managementServer', async () => { + const fakePath = '/rendered/path/managementServer'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + managementserver: 'managementserverValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.managementServerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.managementServerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('managementServerPath', () => { + const result = client.managementServerPath( + 'projectValue', + 'locationValue', + 'managementserverValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.managementServerPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromManagementServerName', () => { + const result = client.matchProjectFromManagementServerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromManagementServerName', () => { + const result = client.matchLocationFromManagementServerName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchManagementserverFromManagementServerName', () => { + const result = + client.matchManagementserverFromManagementServerName(fakePath); + assert.strictEqual(result, 'managementserverValue'); + assert( + (client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('resourceBackupConfig', async () => { + const fakePath = '/rendered/path/resourceBackupConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + resource_backup_config: 'resourceBackupConfigValue', + }; + const client = + new backupdrprotectionsummaryModule.v1beta.BackupDrProtectionSummaryClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }, + ); + await client.initialize(); + client.pathTemplates.resourceBackupConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.resourceBackupConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('resourceBackupConfigPath', () => { + const result = client.resourceBackupConfigPath( + 'projectValue', + 'locationValue', + 'resourceBackupConfigValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromResourceBackupConfigName', () => { + const result = + client.matchProjectFromResourceBackupConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromResourceBackupConfigName', () => { + const result = + client.matchLocationFromResourceBackupConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchResourceBackupConfigFromResourceBackupConfigName', () => { + const result = + client.matchResourceBackupConfigFromResourceBackupConfigName( + fakePath, + ); + assert.strictEqual(result, 'resourceBackupConfigValue'); + assert( + ( + client.pathTemplates.resourceBackupConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/release-please-config.json b/release-please-config.json index 09822b879190..1ad52fe0195d 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -368,4 +368,4 @@ ], "release-type": "node-librarian", "separate-pull-requests": false -} +} \ No newline at end of file